4 ms·
For some things it is relatively easy. Charging for a booking would include the booking id and the amount, perhaps even the credit card number. This allows the
by spockz 8y ago
For some things it is relatively easy. Charging for a booking would include the booking id and the amount, perhaps even the credit card number. This allows the customer/seller to hit charge multiple times but it will happen only once.
But more importantly, as far as I can tell, the ID generation happens in the preRPC phase and is commuted to the database. The RPC call is only done after the ID is persisted so if any crashes occur the pre and post logs can be automatically reconciled.
This system looks a lot like a combination of command and event sourcing with a nice library for putting the right actions in pre, rpc, and post.