- labstack/echo - as client gateway
- grpc/grpc-go - as protobuf transport layer
- segmentio/kafka-go - as message broker, Kafka cluster with 3 node for scaling calculation
- redis/go-redis - as data store
- spf13/viper - as .env configuration
- uber-go/zap - as logger
- go-playground/validator - as struct validator
- stretchr/testify - as unit testing
Run docker-compose.yaml
$ make docker-compose
After run this, don't forget to check all container are successfully started. Kafka GUI tools http://localhost:8080/
- Run Order Service
$ make run-order-service
- Run Worker Service
$ make run-worker-service
- Run Summary Service
$ make run-summary-service
- Run Client
$ make run-client
To create order transaction
POST /order
Example Request
{
"stock_code" : "BBCA",
"order_number" : "123",
"type" : "E",
"quantity": "200",
"price" : "8100"
}
To create order transaction from .ndjson file
GET /bulk-order
To get summary result
GET /summary/:stock-code