Dank Stocks Inc is a toy day trading system, built as part of a higher year distributed systems class at school. It's essentially a REST API, written in Golang
accompanied by postgres
,redis
, rabbitmq
, and docker
. The picture below was the final architecture for the system by the end of the term. It's not perfect, but we scaled it to about ~15k transactions per second, for a 1.2 million transaction test file.
The core business logic lives of transaction server lives here.
- Add local user cache
- Shard user database
- Convert REST structure to a completely asynchronous system. Expose an API, which issues requests as messages on rabbit, which gets picked up by a worker. Use websockets to send data back.
git submodules init
git submodules update
cd ./src
docker-compose build
docker-compose up
cd ./src
- docker-compose exec test go test .
- docker-compose exec test go run workload_generator/generator.go