I still don't understand one thing: my previous understanding of Datomic was that there could be only one transactor; now it appears that each cluster node can perform transactions? Is there some new locking mechanism or other way to serialize transactions, or am I just missing something entirely?
I can see that there's multiple nodes in the TX group ... are they for fast failover, or are they all processing TXs? If the latter, it underscores my confusion, since (as I said) I've always been under the impression that only a single TX could be active.
It's not exactly failover/transfer. At any point in time one node is preferred to transact (per db, and can differ), and in normal operation all txes for a db will flow to/through that node. If for any reason (e.g. a temporary network partition) that node can't be reached, any node can and will handle txes. Consistency is ensured by CAS at the DynamoDB level. This situation increases contention for DynamoDB and decreases throughput, so if the condition persists (or in the case where the preferred node disappears) a different node will become preferred. This is all immediate, there are no transfer/recovery intervals etc. Thus it is not like the mastership transfer and failover of Datomic On-Prem (and many other dbs). But neither should it be confused with parallel multi-writer (a la Cassandra).
2
u/hlship Jan 18 '18
I still don't understand one thing: my previous understanding of Datomic was that there could be only one transactor; now it appears that each cluster node can perform transactions? Is there some new locking mechanism or other way to serialize transactions, or am I just missing something entirely?