-
Notifications
You must be signed in to change notification settings - Fork 10
Send Item
Tom Larkworthy edited this page Jan 22, 2014
·
12 revisions
Sends an item from user account to another, with the following features:
- either user can abort
- no deadlocks exists, even if one player goes offline
- formally verified, items can never be created nor destroyed
source hsm
the ordered stages of a successful transfer is is:
- IDLE: both players start in the idle state
- TX: A states they want to send their item to B
- RX: B states they want to receive the item from A
- ACK_RX: A acknowledges B
- ACK_TX: B acknowledges A
- Boom, commit inventory updates
However, we allow either user to rollback the transition before the ACK_TX.
The complete deadlock free with rollback:-
Client side code for executing a transaction is in the unit tests