r/Clojure • • Jan 17 '18

Datomic Cloud

http://blog.datomic.com/2018/01/datomic-cloud.html
73 Upvotes

18 comments sorted by

View all comments

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?

2

u/yogthos Jan 18 '18

Here are the topology docs for the cloud version.

3

u/hlship Jan 19 '18

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.

9

u/richhickey Jan 19 '18

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).

1

u/yogthos Jan 19 '18

I'm guessing /u/alexdmiller can answer that one better. :)