440 likes | 692 Views
MongoDB : What, why, when. Massimo Brignoli . # mongodb. Solutions Architect, MongoDB Inc. Who Am I?. Solutions Architect/Evangelist in MongoDB Inc. 24 years of experience in databases and software development Former MySQL employee Previous life: web, web, web. Innovation.
E N D
MongoDB: What, why, when. Massimo Brignoli #mongodb Solutions Architect, MongoDB Inc.
Who Am I? • Solutions Architect/Evangelist in MongoDB Inc. • 24 years of experience in databases and software development • Former MySQL employee • Previous life: web, web, web
Understanding Big Data – It’s Not Very “Big” 64% - Ingest diverse, new data in real-time 15% - More than 100TB of data 20% - Less than 100TB (average of all? <20TB) from Big Data Executive Summary – 50+ top executives from Government and F500 firms
“I have not failed. I've just found 10,000 ways that won't work.” ― Thomas A. Edison
For whichcomputers the relational model hasbeendesigned for?
RDBMS Makes Development Hard Code XML Config DB Schema Application Object Relational Mapping Relational Database
And Even Harder To Iterate New Table New Column New Table Name Pet Phone Email New Column 3 months later…
From Complexity to Simplicity RDBMS MongoDB { _id : ObjectId("4c4ba5e5e8aabf3"), employee_name: "Dunham, Justin", department : "Marketing", title : "Product Manager, Web", report_up: "Neray, Graham", pay_band: “C", benefits : [ { type : "Health", plan : "PPO Plus" }, { type : "Dental", plan : "Standard" } ] }
MongoDB The leading NoSQL database Document Database General Purpose Open-Source
Global Community 7,000,000+ MongoDB Downloads 150,000+ Online Education Registrants 25,000+ MongoDB User Group Members 25,000+ MongoDB Days Attendees 20,000+ MongoDB Management Service (MMS) Users
MongoDB Vision To provide the best database for how we build and run apps today Build • New and complex data • Flexible • New languages • Faster development Run • Big Data scalability • Real-time • Commodity hardware • Cloud
Enterprise Big Data Stack Applications CRM, ERP, Collaboration, Mobile, BI Data Management Management & Monitoring Security & Auditing Hadoop EDW Online Data Offline Data RDBMS RDBMS Infrastructure OS & Virtualization, Compute, Storage, Network
MongoDB Overview Agile Scalable
Document Data Model Relational MongoDB { first_name: ‘Paul’, surname: ‘Miller’, city: ‘London’, location: [45.123,47.232], cars: [ { model: ‘Bentley’, year: 1973, value: 100000, … }, {model: ‘Rolls Royce’, year: 1965, value: 330000, … } ] }
Document Model Benefits • Agility and flexibility • Data models can evolve easily • Companies can adapt to changes quickly • Intuitive, natural data representation • Developers are more productive • Many types of applications are a good fit • Reduces the need for joins, disk seeks • Programming is more simple • Performance can be delivered at scale
Automatic Sharding • Three types of sharding: hash-based, range-based, tag-aware • Increase or decrease capacity as you go • Automatic balancing
Query Routing • Multiple query optimization models • Each sharding option appropriate for different apps
Availability Considerations High Availability – Ensure application availability during many types of failures Disaster Recovery – Address the RTO and RPO goals for business continuity Maintenance – Perform upgrades and other maintenance operations with no application downtime
Replica Sets • Replica Set – two or more copies • “Self-healing” shard • Addresses many concerns: • High Availability • Disaster Recovery • Maintenance
Single Data Center • Automated failover • Tolerates server failures • Tolerates rack failures • Number of replicas defines failure tolerance Primary – B Primary – C Primary – A Secondary – B Secondary – A Secondary – A Secondary – B Secondary – C Secondary – C
Active/Standby Data Center Primary – B Primary – C Primary – A Secondary – B Secondary – A Secondary – C Secondary – B Secondary – C Secondary – A Data Center - West Data Center - East • Tolerates server and rack failure • Standby data center
Active/Active Data Center Primary – B Secondary – B Secondary – C Primary – C Primary – A Secondary – A Secondary – C Secondary – A Secondary – B Secondary – A Secondary – C Secondary – B Arbiter – B Arbiter – C Arbiter – A Data Center - West Data Center - Central Data Center - East • Tolerates server, rack, data center failures, network partitions
Global Data Distribution Real-time Real-time Secondary Secondary Secondary Real-time Real-time Primary Secondary Real-time Secondary Real-time Secondary Real-time Secondary
Read Global/Write Local Primary:LON Secondary:NYC Secondary:SYD Primary:NYC Secondary:LON Secondary:SYD Primary:SYD Secondary:LON Secondary:NYC
Machine Generated Data • More machine forms, sensors & data • Variably structured High Volume Data Feeds • Securities Data • High frequency trading • Daily closing price • Social Media / • General Public • Multiple data sources • Each changes their format consistently • Student Scores, ISP logs
Ad Targeting • Large volume of users • Very strict latency requirements • Sentiment Analysis Operational Intelligence Real time dashboards • Expose data to millions of customers • Reports on large volumes of data • Reports that update in real time • Social Media Monitoring • Join the conversation • Catered Games • Customized Surveys
Product Catalogue • Diverse product portfolio • Complex querying and filtering • Multi-faceted product attributes Metadata Data analysis • Data mining • Call records • Insurance Claims • Biometric • Retina Scans • Fingerprints
News Site • Comments and user generated content • Personalization of content and layout Content Management Multi-device rendering • Generate layout on the fly • No need to cache static pages • Sharing • Store large objects • Simpler modeling of metadata
Thanks! Massimo Brignoli #MongoDB @massimobrignoli Solutions Architect, MongoDB Inc. massimo@mongodb.com