|
|
|
|
|
by lugg
2694 days ago
|
|
The two phases in the ATM scenario would be, Phase 1 ATM Request to withdraw funds secures a lock Phase 2 Gets the all clear, writes the new balance to the ledger, distributes funds. Anything trying to modify the ledger at that same time should be blocked for the short time it takes to process the transaction. This is how these systems work. The reconciliation is what happens when you can't do 2pc or when it fails. Re it being a network protocol, no, its been around d since the dark ages. https://link.springer.com/content/pdf/10.1007/s10619-008-702... |
|
> Phase 1 ATM Request to withdraw funds secures a lock
> Phase 2 Gets the all clear, writes the new balance to the ledger, distributes funds.
> Anything trying to modify the ledger at that same time should be blocked for the short time it takes to process the transaction.
So you're saying 2PC is basically just "acquire a lock... do two things... release lock"?