- It should be written as several microservices, so we can horizontally scale when needed.
- These microservices should be combinable into native binaries for ease of use locally.
This should be abstracted so we can replace the datastore with an in ram db, S3, or other, depending on usage. The storage models would be:
GameConfiguration:
width int
height int
food_count int
snake_ids list<string>
snake_timeout_ms int
InitialGameState:
snake_coords map<string, coord>
food_coords list<coord>
GameStateDelta:
new_food_coords list<coord>
sname_moves list<enum> (UP, DOWN, LEFT, RIGHT, DEAD, ERROR)
Game:
config GameConfiguration
initial IntialGameState
deltas list<GameStateDelta>
state string (COMPLETE, RUNNING, PAUSED)
A game should not be able to be paused in the production system, only on a local debugging system.
This should be written to handle a single game tick. This allows the freedome to distribute each tick, or run the full game locally, then save.
this should be where we serve:
- CRUD games, including
- all game deltas
- full board states