This is an attempt to create a high performance API (core) for an imaginary stock market with as many users as possible.
- I wanted to create something to learn more about Go and challenge my knowledge.
- I wanted to add a well-documented and well-tested project to my resume, and I hope that this would be it!.
- Iran's Stock market has suffered so many outages and is still performing poorly, so I wonder if I can create something better.
- Go Programming Language is the language of choice for this project
- PostgreSQL is used as the RDBMS
- Follow this guide to install Go.
- install
sql-migrate
:$ go get -v github.com/rubenv/sql-migrate/...
- set required environment variables for the database connection. These variables are:
POSTGRES_PORT
,POSTGRES_USER
,POSTGRES_PASSWORD
,DATABASE_NAME
- make sure you have docker installed and run:
$ make db
. this will create the postgres database. $ make
this will apply the migrations and try to start the server on portPORT
if it is set, otherwise on port8080
- use
$ make destroy
to delete the database - use
$ make clean
to rollback all the migrations
Nic Jackson's amazing tutorial about microservices
Florin Patan's talk about microservices at GopherCon UK 2018