MongoDB is finally getting support for multi-document ACID (atomicity, consistency, isolation, durability) transactions. That’s something the MongoDB community has been asking for for years and MongoDB Inc, the company behind the project, is now about to make this a reality.
As the company announced at an event earlier today, support for ACID transactions will launch when it ships version 4.0 of its NoSQL database in the summer. Until then, developers can use a beta, though, to see how they can make use of this new feature.
At its core, MongoDB is a document database and — almost by default — these kind of databases aren’t ACID compliant, especially when it comes to multi-document transactions (at the document level, MongoDB already supports ACID transactions). For the most part, that’s not a big deal for companies that use database systems like MongoDB because they are not trying to write to multiple documents at the same time.
Because of this, though, many MongoDB users still run relational databases in parallel with their document database.
Indeed, as MongoDB co-founder and CTO Eliot Horowitz told me, that was one of the main motivations behind this project. “The reason we didn’t need this is because the document model negates the need for ACID transactions — not for all of them, but for most of them,” he told me. But at the same time, there are clearly use cases where developers wants transactions for their mission critical use cases. Horowitz also argues that some developers who start working with MongoDB “have this nagging fear that they may need it in the future.” This launch obvious takes that fear away.
“Transactional guarantees have been a critical feature for relational databases for decades, but have typically been absent from non-relational alternatives, which has meant that users have been forced to choose between transactions and the flexibility and versatility that non-relational databases offer,” said Stephen O’Grady, Principal Analyst with RedMonk. “With its support for multi-document ACID transactions, MongoDB is built for customers that want to have their cake and eat it too.”
Horowitz stressed that he doesn’t believe developers will simply turn this feature on by default and that most will only enable it for very specific use cases. “I don’t expect this to be a common way to write to MongoDB,” he told me.
Building this new feature was a multi-year effort that started with the acquisition of WiredTiger and that company’s database storage engine three years ago. To enable it, the team touched virtually every component of the database system.
If you want to give a try yourself, you can join the beta program here.
Featured Image: Smith Collection/Gado/Getty Images