Your SlideShare is downloading. ×
0
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Science of mongodb
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Science of mongodb

1,794

Published on

Published in: Technology, Education
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
1,794
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
19
Comments
0
Likes
3
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • A system is consistent if an update is applied to all nodes at the same time. This pretty much means that standard database replication is not strongly consistent. Any system using a replica for reads runs the risk of using stale data.\n
  • A system in available if all clients can access some form of the data even during a partial failure.\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Since we need to maintain partition tolerance, what are we willing to sacrifice?\n
  • In the case of choosing consistency over availability, the cluster will maintain integrity by refusing some requests. It may shut down, refuse writes, or refuse reads/writes for the chunks of data that are unavailable. (hint: This is what Mongo does)\n
  • If a cluster chooses availability over consistency during a failure, it will still respond to all requests. Stale reads and conflicting writes are often the outcome of this.\n
  • \n
  • This means during times of failure, we are sacrificing availability\n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • Mongo handles this in a pretty simple way, avoid complex transactions.\n
  • \n
  • Once again, without complex transactions, this really isn’t a problem\n
  • \n
  • \n
  • \n
  • \n
  • Transcript

    • 1. The Science ofMongoDB @ethangunderson MongoDC 2011
    • 2. Hiring
    • 3. 1)CAP?2)What does MongoDB do about it?3)Compare and Contrast4)ACID?5)How it relates to MongoDB
    • 4. Questions?Comments?Shout Out!
    • 5. CAP Theorem
    • 6. Eric Brewer
    • 7. ConsistencyAvailabilityPartition Tolerance
    • 8. Consistency All clients have thesame view of the data
    • 9. AvailabilityAll clients have access to all data
    • 10. Partition Tolerance The system’s properties hold true in the case of partitions
    • 11. Pick Two
    • 12. CAThis is not a real option.
    • 13. You Canʼt SacrificePartition Tolerance http://codahale.com/you- cant-sacrifice-partition- tolerance/
    • 14. When a failure happens, what am I sacrificing? Consistency or Availability?
    • 15. CP The system sacrifices availability in order tomaintain data consistency
    • 16. AP The system sacrificesconsistency to ensure the most uptime as possible
    • 17. What is Mongo?
    • 18. CPSince, by default, Mongo routes all requests to a master, it is strongly consistent
    • 19. MasterSlave Slave
    • 20. MasterSlave Slave
    • 21. MasterSlave Slave
    • 22. Replica Set Replica Set
    • 23. Replica Set Replica Set
    • 24. Optionally AP
    • 25. Master Client:slaveOK Slave Slave
    • 26. (Amazon Dynamo)
    • 27. AP As long as one node isup, the cluster can service read/write requests
    • 28. foo: 12foo: nil foo: 35
    • 29. ACID
    • 30. AtomicityAll transactions are “all or nothing”
    • 31. Consistency All transactions takethe database from onevalid state to the next
    • 32. Isolation Transactions cannotaccess data modified in another uncompleted transaction
    • 33. DurabilityThe ability to recovercommitted transaction updates
    • 34. Consistency !=Consistency
    • 35. Thanks!

    ×