- service-front: webapp
- generate rest, websocket models from swagger spec using swagger-codegen
- written in Angular 5+
- service-gateway: serving Websocket and REST endpoints
- generate rest, websocket model + server stub using go-swagger
- while working as a gRPC client
- provides scalable realtime metric servers using etcd
- service-location: serving gRPC endpoints
- provides location service sharding (e.g location server 1 handles requests from US, ..)
+---------------+ WS (50001) +-----------------+ +------------------+
| | REST (50002) | | gRPC (50003) | |
| service-front |<--------------->| service-gateway |<---------------->| service-location |
| | (swagger-gen) | | (protobuf) | |
+---------------+ +-----------------+ +------------------+
(webapp) (server) (server)
< storage >
+--------------+ +-------------+
| | | |
| etcd cluster | | mysql |
| | | |
+--------------+ +-------------+
(distributed kv) (transactional)
name | version | description |
---|---|---|
go | 1.10+ | use gvm |
dep | go get -u github.com/golang/dep/cmd/dep |
|
protobuf | 3.5.0+ | brew install protobuf |
nodejs | 9.8.0+ | use nvm |
Please check make prepare command for more description.
# start dockerized storages: etcd, mysql, ...
$ docker-compose up
# start gateway service
$ cd service-gateway
$ make prepare install
$ make run
# start front (webapp) service
$ cd service-front
$ npm install; npm run server:local;
# visit: https://localhost:3000