For a database, we chose to use Redis for its scalaiblity, fault tolerance and low overhead. In addition, in an iterative course such as this, we value being able to change the schema on the fly. Since Redis is a key/value store we kept the schema light. The documentation has key in the header, with a description of the params in the body. Our redis instance is fully Docker containerized and runs well with the default settings.
Contains the balance of the user ID. Stored as a floating point number for now, however Redis does offer some accuracy guarantees.
- AddFunds
- GetFunds
- RemoveFunds
Redis hash of the stocks a user owns. Stocks are stored as integers.
- AddStock
- GetStock
- RemoveFunds
Keeps tracks of user's uncomitted sell orders.
- PushSell
- PopSell
Keeps tracks of user's uncomitted buy orders.
- PushBuy
- PopBuy
Keeps tracks of user's running triggers.
- AddSellTrigger
- RemoveSellTrigger
- GetSellTrigger
Keeps tracks of user's running triggers.
- AddBuyTrigger
- RemoveBuyTrigger
- GetBuyTrigger
Keeps tracks of user's reserve account balance. This holds funds offset for triggers
Keeps tracks of user's waiting sell triggers balance.
Keeps tracks of all user's account transactions.
Not implemented yet
Returns as user's account information
- Build the docker container
- Expose the proper ports when running (-p exposed:6397)
- Good to go!