- the main goal is to make everything scalable
- multiple api server talking to engine
- horizontal scalling of each component other than engine
we created the application to auction players so anywhere u see player that is actually an auctionable item
- /getCurrentPlayer
- /bid
- /admin/addPlayer
- /admin/banUser
- /admin/sellPlayer
- /admin/chageNextPrice
- /admin/contorls
in order to talk to the engine we needed the RedisManager which puts the request to the queue
type Message =
| AddPlayerMsg
| AddUserMsg
| BanUserMsg
| PlaceBidMsg
| SellPlayerMsg
| GetCurrentPlayerMsg
| SetControlMsg
| ChangeNextPriceMsg;listens redis queue for any new db operation
- NEW_PLAYER_LISTED -> this is item listed for auction
- BID_PLACED
- PLAYER_SOLD -> this is the item sold
- USER_BANNED
to orchestrate everything
- take snapshots
- publish to api
- descision making
this is the item we are auctioning
- maintaining base price
- maintaining current price
- maintaining next price
- maintaining increments
- selling and listing
- pull/push to/from queue
- use pub sub
- track all users
- track banned users
- singleton class
- listens to redis pub-sub and waits for sub
- forwards pub-sub messages to appropriate user groups (user manager)
- NEW_PLAYER_LISTED
- BID_PLACED
- NEW_BID_PRIC
- PLAYER_SOLD
- USER_BANNED
- CONTROL
- singleton class
- maps admins and players to their socket connections and pushes messages
Being on a budget we tested all the services in a single ec2
this is a project manager which lets u run multiple projects in a single machine and allow u to see their logs , basically a multiplexer
for reverse proxy in ec2 as our build will be running in ports 3000 ,3003 and 3002 but we will be acessing from 80 config
free domain name is pretty easy to get
go to duckdns
use certbot and python3-certbot-nginx
uses let's encrypt certification authority under the hood to provide certs