|
|
|
|
|
by lmorris84
3956 days ago
|
|
We solved this in a roughly similar way to a real stock exchange: the order book is persisted entirely in memory, in Go. What happens if your process crashes? how do you rebuild the order book? Great work btw guys, can't wait to get started! |
|
After we can do that reliably, then I will strongly consider making an advanced mode level where a crash / market reset / rollback of trades is a planned feature of the level (they are absolutely a thing which happens in real life) and dealing with it from the player's perspective is the main task. (e.g. What would you do if you got a message from the stock exchange saying, basically, "We lost data. How much? Umm, not sure, the last orderId we have is X. Orders after X are no longer on our books but, um, I guess there exists the possibility that they will nonetheless settle successfully if they matched before we went down. ... Good luck to you!")