title: MongoDB use-case inventory
body: <p>I am building an online retail store that has a fixed amount of clothes to sell obviously before its marked "sold-out". Assuming the traffic might get really high with clothes and other items selling out rapidly, I wanted to use MongoDB to track the inventory. However is this the best use-case for MongoDb. </p>
  
  <p>How does MongoDB handle multiple updates to a single document.</p>
  
  <p>In my case say there are 10 t-shirts, and 11 people come to the smae page to buy it. Now as there buying it, I check if the inventory is avaiable then perform an update decreasing the count. Will mongoDB queue the operations so that the update from a previous user is made and then the count is called? </p>