Skip to content

Bringing transactional guarantees to MongoDB - Paul Robinson

Photo of Paul Robinson
Hosted By
Paul R.
Bringing transactional guarantees to MongoDB - Paul Robinson

Details

MongoDB and similar document-based NoSQL datastores, tend to offer limited transaction support. This is with good reason, as using an ACID transaction to make updates to multiple documents (potentially over multiple resources) can limit scalability. However, there are alternative transaction models that can be used in favour of removing transactions altogether. In this presentation I'll show how a compensating-transaction approach can be used to provide many of the ACID guarantees, without the scalability limitations that an ACID approach could bring.

The talk will highlight cases in which ACID transactions may not be appropriate. In particular I'll be focusing on why ACID transaction support, for multiple document updates, is rarely offered in a NoSQL datastore. I'll then show how a compensating-transaction can be used as an alternative.

The main body of this talk will comprise of a code example. Here I will show how to develop applications that make transactional updates to multiple documents in a MongoDB datastore. The code example uses the Narayana compensating-transactions API, which greatly simplifies the development of applications that need this transaction model. I'll also show how reliability can be built upon the primitives provided by MongoDB and how the middleware can abstract this from the developer.

Photo of Newcastle JBoss User Group group
Newcastle JBoss User Group
See more events
Nanotechnology Building (Next to Herschel Building)
Newcastle University, NE1 7RU · Newcastle Upon Tyne