Difference between batch and transaction? #138
-
|
There are now two different sets of API in fjall, What's the difference between them? As a new user, should I consider the batch API legacy and focus on the new transactional one? |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment
-
|
A batch is simply an atomic set of changes (inserts or removals), but there are no transactional semantics. If you concurrently run update operations (e.g. incrementing a counter), you could run into lost updates, Transactions are batches, but provide serializable transactional semantics. Generally, I'd go for |
Beta Was this translation helpful? Give feedback.
A batch is simply an atomic set of changes (inserts or removals), but there are no transactional semantics. If you concurrently run update operations (e.g. incrementing a counter), you could run into lost updates,
and in general there is no notion of repeatable reads.Transactions are batches, but provide serializable transactional semantics. Generally, I'd go for
TransactionalKeyspace, unless you know that your workload does not need transactions (e.g. metrics, event logging, etc).