O'Reilly logo

Secure Your Node.js Web Application by Karl Duuna

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Concurrency with MongoDB Explained

Let’s move back to practical usage and look at MongoDB since it’s the most used NoSQL database for Node.js applications.

MongoDB doesn’t guarantee ACID compliance[40] in all cases. For example, MongoDB doesn’t have transactions and atomic functions that cover multiple documents. So if you have a database model where you need to avoid concurrency issues with multiple documents at the same time, you’re in trouble. For example, you might have an e-commerce application that needs to decrement the number of products in the warehouse inventory while at the same time withdrawing money from the user’s wallet.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required