MongoDB - An Agile NoSQL Database

5,758 views
5,297 views

Published on

The slides pertain to the talk delivered in Agile NCR 2013 conference at New Delhi

Published in: Technology
1 Comment
11 Likes
Statistics
Notes
  • Excellent slides
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
No Downloads
Views
Total views
5,758
On SlideShare
0
From Embeds
0
Number of Embeds
469
Actions
Shares
0
Downloads
60
Comments
1
Likes
11
Embeds 0
No embeds

No notes for slide
  • Show the Accessory Shop site and explain the functionality in brief
  • MongoDB - An Agile NoSQL Database

    1. An Agile NoSQL DatabaseGaurav AwasthiTechnology Evangelistgawasthi@equalexperts.com
    2. Big Data - The New World Order• A massive volume of both structured and unstructured data that its difficult to process using traditional database and software techniques• As of 2012, every day 2.5 quintillion bytes of data were created• Data Source: – Climate sensors – Social media – Digital pictures and videos – Purchase transaction records – Cell phone GPS signals• Characteristics : Volume, Velocity and Variety• Key Usage: leverage data-driven strategies to innovate, compete, and capture value from deep and up-to-real-time information
    3. NoSQLDefining Characteristics– Scaling out on commodity hardware– Aggregate structure– Schema-less attitude– Impedance Mismatch : Relational model in-memory data structures– Big Data : Massive data being stored and transacted– Reduced Data Management and Tuning Requirements– Eventually consistent / BASE (not ACID)
    4. Mongo DB• Open-source, Document-oriented, popular for its agile and scalable approach• Notable Features : – JSON/BSON data model with dynamic schema – Auto-sharding for horizontal scalability – Built-in replication with automated fail-overs – Full, flexible index support including secondary indexes – Rich document-based queries – Aggregation framework and Map / Reduce – GridFS for large file storage
    5. Agile & MongoDBCharacteristics supporting Agility – Allows dynamic schema (schemaless) – JSON format, which maps well to object-style data. – Simplified db tuning – Cost Effective and Simple replica sets – Easy scale out due to simplified sharding mechanism – Rich content using GridFS
    6. A Demo for Schema-less way
    7. A Demo Query Plan and DB Tuning
    8. Replication• Replica set – a mongod cluster• Ensures High Availability, Redundancy, Automated Fail- over• Writes to the Primary, Reads from all• Asynchronous replication• In conventional terms, more like Master/Slave replication• Members can be configured to be: Secondary only / Non- Voting / Hidden / Arbiters / Delayed
    9. Elastic Architecture
    10. A Demo for Replica Set• Run the 3 mongod processes• Demo that they are running on different ports using ps –ef• Initiate the repl set and add members• Demo which ones are primary and secondary using rs.status()• Now insert docs into a collection in primary• Demo that its replicated to secondary• Thereby proving how straight fwd is replication• Briefly touch upon the steps for sharding too
    11. Case Study – E-Commerce Shop Architecture DiagramProduct supplier catalog App External Feeds (container) Mongo Payment Gateway
    12. Domain model
    13. JSON structure{"_id" : "compatibleHandsets" : [{ ObjectId("5082626144ae3a6879 "manufacturer" : { 19c094"), "name" : "Apple","name" : "iPhone 5 Pop Blue Case", "canonicalName" : "apple" },"canonicalName" : "iphone-5-pop- blue-case", "model" : "iPhone 5 16GB", "name" :"retailPrice" : 19.99, "Apple_iPhone_5_16GB","productCode" : "G4IC542G", "canonicalName" :"category" : { "apple_iphone_5_16gb" }], "categoryCode" : "CAS", "name" : "Cases", review_ids : ["review_id1", "canonicalName" : "cases" "review_id2"]}, }
    14. Design decisions with Mongo• Agile incremental releases• Unstructured data from multiple suppliers• GridFS : Stores large binary objects• Spring Data Services• Embedding and linking documents• Easy replication set up for AWS
    15. Conclusion and ThanksMongoDB: the right persistence tool for Agile Development for multitude ofbusiness problems in the new world order References: • Mongodb.org

    ×