Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

MongoDB 3.4: Deep Dive on Views, Zones, and MongoDB Compass

1,149 views

Published on

Thomas Boyd, Principal Solutions Architect, MongoDB
MongoDB Evenings San Francisco
March 21, 2017

MongoDB 3.4 was released in November 2016 and contains a wealth of new features that allow developers, DBAs, architects, and data scientists to tackle a wide variety of use cases. After an overview of 3.4, Thomas will provide a deep dive on using MongoDB views to encapsulate complex aggregation logic and to enhance MongoDB security, using zones to create a cross-continent, multi-master MongoDB cluster, and using MongoDB Compass to browse and interact with the data stored in your cluster.

  • Be the first to comment

MongoDB 3.4: Deep Dive on Views, Zones, and MongoDB Compass

  1. 1. MongoDB 3.4: Deep Dive on Views, Zones, and MongoDB Compass Thomas Boyd Principal Solutions Architect, MongoDB thomas.boyd@mongodb.com MongoDB Evenings San Francisco, March 21, 2017
  2. 2. • Overview of new features in MongoDB 3.4 • Deeper Dive • Views • Zones • MongoDB Compass • Code Samples & Demos Throughout • Learn how and when to use on your projects • Ideas for further learning Learning Objectives
  3. 3. MongoDB 3.4 Delivers K-V SQL DOC Multimodel Done Right • Other vendors sell you multiple products • MongoDB brings you multiple models in a single database Mission Critical Apps • Run larger clusters more efficiently, extend tunable consistency • Extended security controls to address new threat classes Modernized Tooling • Native integration with enterprise standards • Improve productivity of IT teams & data engineers
  4. 4. Hash-Based Sharding Roles Kerberos On-Prem Monitoring 2.4 2.6 3.0 3.2 Headline Features by Release $out Index Intersection Text Search Field-Level Redaction LDAP & x509 Auditing Document Validation $lookup Fast Failover Simpler Scalability Aggregation ++ Encryption At Rest In-Memory Storage Engine BI Connector MongoDB Compass APM Integration Profiler Visualization Auto Index Builds Backups to File System Doc-Level Concurrency Compression Storage Engine API ≤50 replicas Auditing ++ Ops Manager Views Zones ++ Compass ++ Intra-cluster compression Log Redaction Linearizable Reads Graph Processing Decimal Collations Faceted Navigation Spark Connector ++ Aggregation ++ Auto-balancing ++ ARM, Power, zSeries BI Connector ++ Hardware Monitoring Server Pool LDAP Authorization Encrypted Backups Cloud Foundry Integration 3.4 MongoDB Atlas The Evolution of MongoDB
  5. 5. MongoDB 3.4 allows administrators to define dynamically generated views that encapsulate business or security logic • Hide complexity – increase productivity • Reduces risk of sensitive data exposure • Separately specified permissions levels • Allows organizations to more easily meet compliance standards in regulated industries Read-Only Views
  6. 6. Model of the Aggregation Framework
  7. 7. • $graphLookup • $bucket • $bucketAuto • $facet • $sortByCount • $addFields • $replaceRoot • $count • $in • $indexOfArray • $range • $reverseArray • $reduce • $zip New Operators • $indexOfBytes • $indexOfCP • $split • $strLenBytes • $strLenCP • $substrBytes • $substrCP • $switch • $isoDayOfWeek • $isoWeek • $isoWeekYear • $collStats • $type • $project (enhanced)
  8. 8. Fun Building Views
  9. 9. • Performance? • Session or User Variables? • What about $redact? • More? Final Thoughts on Views
  10. 10. MongoDB Compass • Visualize & explore your schema with an intuitive GUI • Gain quick insights about your data with easy-to-read histograms • Build queries with a few clicks • Drill down to view individual documents in your collection • Understand and resolve performance issues with visual explain plans • Check index utilization Debug & Optimize Visualize & Explore The GUI for MongoDB Visual explain plans and full CRUD functionality are currently in beta. • Insert new documents or clone existing documents • Modify documents in place using the powerful visual editor • Delete documents in just a few clicks Insert, Modify, & Delete
  11. 11. • Schema and query optimization • MongoDB Compass enhancements • Modify documents • Create document validation rules • Optimize query performance with visual explain plans, index usage, and real-time statistics • All controlled from a single intuitive and sophisticated GUI MongoDB Compass
  12. 12. Navigating Around with Compass
  13. 13. Partition data across distributed clusters based on data locality policies • Support distributed local writes • Easily adhere to data sovereignty requirements • Enable deployment patterns such as tiered storage MongoDB Zones can now be configured visually from Ops Manager Zones
  14. 14. 14 But First: Flexible Deployment Options
  15. 15. 15 Multi-Data Center Writes
  16. 16. { "_id" : ObjectId("56f08c447fe58b2e96f595fa"), “region" : “usa", “datacenter" : 1, “userid" : 123, “company" : “adobe", “message" : “Hello there", “date" : ISODate(..) } Zone Sharding
  17. 17. mongos > sh.enableSharding( “chat_app" ) mongos > sh.shardCollection( “chat_app.msgs", { “region" : 1, “userid" : 1 } ) mongos > sh.addShardToZone("shard0000", "usa") mongos > sh.addShardToZone("shard0001", "europe") Zone Sharding
  18. 18. mongos > sh.updateZoneKeyRange( "chat_app.msgs", { "region" : “usa” , “userid” : MinKey }, { "region" : “usa” , “userid” : MaxKey } , "usa") mongos > sh.updateZoneKeyRange( "chat_app.msgs", { "region" : “europe” , “userid” : MinKey }, { "region" : “europe” , “userid” : MaxKey } , "europe") Zone Sharding
  19. 19. • Time-based • Distributed Local Writes • Conflict Resolution & Read Repair • More? Final Thoughts on Zones
  20. 20. Thomas Boyd thomas.boyd@mongodb.com Questions & Contact Info
  21. 21. • Read the What’s New in MongoDB 3.4 Whitepaper • Download the Release Candidate • Register for the What’s New in 3.4 Webinar 3.4 Next Steps

×