Skip to content

Day trading system backend written in Golang!

Notifications You must be signed in to change notification settings

therafatm/Dank-Stocks-Inc

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dank Stocks Inc

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.

Architecture

The core business logic lives of transaction server lives here.

Things we could add

  • 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.

Running Dev

  • git submodules init
  • git submodules update
  • cd ./src
  • docker-compose build
  • docker-compose up

Running Tests

  • cd ./src
  • docker-compose exec test go test .
  • docker-compose exec test go run workload_generator/generator.go

About

Day trading system backend written in Golang!

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 77.6%
  • Python 10.8%
  • Shell 9.4%
  • PLpgSQL 2.2%