Skip to content

Latest commit

 

History

History
47 lines (31 loc) · 2.05 KB

README.md

File metadata and controls

47 lines (31 loc) · 2.05 KB

diagram

"TODO List" experiment project

This repository is an example project which demonstrates the use of microservices for a fictional TODO list application. The TODO backend is powered by 3 microservices, all of which happen to be written in Go, using MongoDB for manage the database and Docker to isolate and deploy the ecosystem.

In real world each service should live in a separate repository, so teams can work separately and don't overlap each other, however in this demo project they just located in separate folders for easy use.

Services organization

The application consists of the following application services:

Service Port Description Methods
users 50000 Provides users information CreateUser
list 50001 Manages items in todo lists CreateItem, GetUserItems, DeleteItem
notifier 50002 Send email notifications Email

Client web application is working on http://localhost:3030.

diagram2

Requirements

Run

docker-compose pull
docker-compose up

Go to http://localhost:3030 to test gRPC from webapp.

Generate source code for the gRPC client from .proto files

  • Install Go
  • Install Protocol Buffers
  • Install protoc plugin: go get github.com/golang/protobuf/proto github.com/golang/protobuf/protoc-gen-go
protoc --go_out=plugins=grpc:. proto/users/service.proto
protoc --go_out=plugins=grpc:. proto/list/service.proto
protoc --go_out=plugins=grpc:. proto/notifier/service.proto