Object-Oriented Programming · Coinbase · Medium
In-Memory Order State Manager Using a Transition Table The entire lifecycle of an order is a small finite-state machine. The only information that changes over time is the current status of each order. Since orderId values are unique but not necessarily small contiguous integers, the natural structure is a dictionary / hash map from orderId to status. This gives constant-time lookup and update for every operation. Instead of writing nested if-else logic for every…
Checking your access…