Mechanism 4: Shared State
Use 2-phase commit to ensure consistency and atomicity of updates.
Cluster Hash Table (CHT):
- atomic put operation, which implements swap function. Can be
used to implement synchronization primitives (like test-and-set instruction)
- build apply operation, which allows a function to be applied at
each replica node.
- weak apply does not ensure updates applied in same order at all
nodes (but better performance).
- potential of livelock.