Distributed System support
Current blocker: Need to figure out how to make Transactions and AtomicOperations implicitly implement 2PC. Current thought is to refactor these constructs to internally use some sort of 2PC mechanism by default. There would need to be some sort of listener that awaits confirmation that the txn could proceed when a user goes to commit.
So the flow would be like
- user calls commit()
- internally there is an initial PREPARE (grab locks) step that waits to be informed that it is good to go
- once informed that it is good to go internally there is a FINALIZE step (apply changes and release locks)
In the case of Ensemble, the PREPARE phase would need to wait to be informed based on input from the other participants in the cluster
Concourse.connect methods need to take in cluster configuration and either
- connect to a random node
- connect to all nodes and do round robin
- have some location awareness and connect to the closest node?
maybe all of the above? Have some logic to detect when a node is down and try to connect to another one?