Ce diaporama a bien été signalé.
Le téléchargement de votre SlideShare est en cours. ×

Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB

Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Publicité
Chargement dans…3
×

Consultez-les par la suite

1 sur 47 Publicité

Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB

Télécharger pour lire hors ligne

This webinar will guide you through the best practices for migrating off of a relational database. Whether you are migrating an existing application, or considering using MongoDB in place of your traditional relational database for a new project, this webinar will get you to production faster, with less effort, cost and risk.

This webinar will guide you through the best practices for migrating off of a relational database. Whether you are migrating an existing application, or considering using MongoDB in place of your traditional relational database for a new project, this webinar will get you to production faster, with less effort, cost and risk.

Publicité
Publicité

Plus De Contenu Connexe

Diaporamas pour vous (20)

Similaire à Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB (20)

Publicité

Plus par MongoDB (20)

Plus récents (20)

Publicité

Webinar: “ditch Oracle NOW”: Best Practices for Migrating to MongoDB

  1. 1. “Ditch Oracle Now” Migration Best Practices Mat Keep MongoDB Product Team mat.keep@mongodb.com @matkeep
  2. 2. Migrations & New Apps UK Public Sector Agencies Ahead of the “Edict”
  3. 3. Migration is Rarely Just Cost-Driven….. Enabling New & Evolving Existing Apps Transforming Customer Experience Lowering TCOInnovating Faster than Competitors €
  4. 4. 5 Relational Database Challenges Data Types Unstructured data Semi-structured data Polymorphic data Agile Development Iterative Short development cycles New workloads Volume of Data Petabytes of data Trillions of records Millions of queries/sec New Architectures Horizontal scaling Commodity servers Cloud computing
  5. 5. 6 Expressive Query Language Strong Consistency Secondary Indexes Flexibility Scalability Performance Relational
  6. 6. 7 NoSQL Expressive Query Language Strong Consistency Secondary Indexes Flexibility Scalability Performance
  7. 7. 8 Expressive Query Language Strong Consistency Secondary Indexes Flexibility Scalability Performance Nexus Architecture
  8. 8. 9 • Migration Roadmap • Schema Design • Application Integration • Data Migration • Operational Considerations • Resources to Get Started What We’ll Cover
  9. 9. Migration Steps
  10. 10. Migration Roadmap • Backed by Free, Online MongoDB Training • 350k+ registrations to date • Consulting and Support also available
  11. 11. Schema Design
  12. 12. Definitions RDBMS MongoDB Database Database Table Collection Row Document Index Index JOIN Embedded Document or Reference
  13. 13. Data Models: Relational to Document 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, … } ] }
  14. 14. 15 Anatomy of a BSON Document { first_name: ‘Paul’, surname: ‘Miller’, cell: ‘+447557505611’ city: ‘London’, location: [45.123,47.232], Profession: [banking, finance, trader], cars: [ { model: ‘Bentley’, year: 1973, value: 100000, … }, { model: ‘Rolls Royce’, year: 1965, value: 330000, … } ] } Fields can contain an array of sub-documents Fields Typed field values Fields can contain arrays
  15. 15. 16 RDBMS Document Model Benefits 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" } ] }
  16. 16. 17 An Example
  17. 17. 18 Defining the Data Model Application RDBMS Action MongoDB Action Create Product Record INSERT to (n) tables (product description, price, manufacturer, etc.) insert() to 1 document with sub-documents, arrays Display Product Record SELECT and JOIN (n) product tables find() aggregated document Add Product Review INSERT to “review” table, foreign key to product record insert() to “review” collection, reference to product document More actions….. …… …… • Analyze data access patterns of the application – Identify data that is accessed together, model within a document • Identify most common queries from logs
  18. 18. 19 • Embedding – For 1:1 or 1:Many (where “many” viewed with the parent) – Ownership and containment – Document limit of 16MB, consider document growth – Atomicity of updates • Referencing – _id field is referenced in the related document – Application runs 2nd query to retrieve the data – Data duplication vs performance gain – Object referenced by many different sources – Models complex Many : Many & hierarchical structures Modeling Relationships: Embedding and Referencing
  19. 19. Referencing Publisher ID in Book  publisher = {  _id: "oreilly",  name: "O’Reilly Media",  founded: "1980",  location: "CA"  }  book = {  title: "MongoDB: The Definitive Guide",  authors: [ "Kristina Chodorow", "Mike Dirolf" ],  published_date: ISODate("2010-09-24"),  pages: 216,  language: "English",  publisher_id: "oreilly"  }
  20. 20. Further Reading http://docs.mongodb.org/manual/data-modeling/
  21. 21. 22 • MongoDB indexing will be familiar to DBAs – B-Tree Indexes, Secondary Indexes • Single biggest tunable performance factor – Define indexes by identifying common queries – Use MongoDB explain to ensure index coverage – MongoDB profiler logs all slow queries Indexing in MongoDB • Compound • Unique • Array • TTL • Geospatial • Hash • Sparse • Text Search
  22. 22. Application Integration
  23. 23. Drivers & Ecosystem Morphia MEAN Stack Python PerlRuby Support for the most popular languages and frameworks
  24. 24. Mapping MongoDB Query Language to SQL Mapping Chart: http://docs.mongodb.org/manual/reference/sql-comparison/
  25. 25. 26 • Ad-hoc reporting, grouping and aggregations, without the complexity of MapReduce – Max, Min, Averages, Sum, Union, Redact, GeoNear • Similar functionality to SQL GROUP_BY • Processes a stream of documents • Series of operators – Filter or transform data – Input/output chain • Supports single servers & shards Application Integration MongoDBAggregation Framework
  26. 26. SQL to Aggregation Mapping Mapping Chart: http://docs.mongodb.org/manual/reference/sql-aggregation-comparison/
  27. 27. 28 BI Integration
  28. 28. Data Integrity
  29. 29. Document Level ACID Compliance • “All or Nothing” updates • Extends to embedded documents and arrays • Consistent view to application • Transaction-like semantics for multi-doc updates with findandmodify() or 2PC { 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, … } ] }
  30. 30. 31 Maintaining Strong Consistency • By default, all reads and writes sent to Primary • Reads to secondary replicas will be eventually consistent • Scale by sharding • Read Preferences control how reads are routed
  31. 31. Data Durability: Single Node & Multi-Node • Journaling by default • Write Concerns Give More Guarantees • Configurable per operation
  32. 32. Migration and Operations
  33. 33. 34 Traditional ETL Source Database ETL
  34. 34. Incremental Migration, Live Legacy Database MongoDB Database
  35. 35. 36 • Configuration, Provisioning, Monitoring and Backup • High Availability & Disaster Recovery • Scalability • Hardware selection – Commodity Servers: Prioritize RAM, Fast CPUs & SSD • Security – Access Control, Authentication, Encryption Operations Download the Whitepaper MongoDB Operations Best Practices
  36. 36. High Availability: Replica Sets Replica Set – 2 to 50 copies Self-healing shard Data Center Aware Addresses availability considerations: High Availability Disaster Recovery Maintenance Workload Isolation: operational & analytics
  37. 37. 38 Scalability: Auto-Sharding Multiple query optimization models Each sharding option appropriate for different apps Elastic and self-balancing Shard Key Selection: http://docs.mongodb.org/manual/tutorial/choose-a-shard-key/
  38. 38. 39 Ops Manager & Cloud Manager Single-click provisioning, scaling & upgrades, admin tasks Monitoring, with charts, dashboards and alerts on 100+ metrics Backup and restore, with point-in-time recovery, support for sharded clusters The Best Way to Manage MongoDB Up to 95% Reduction in Operational Overhead
  39. 39. Getting Started
  40. 40. MongoDB Enablement Consulting, training, and professional services throughout your project lifecycle Design & Development Rapid Start Database Modernization Private Training Test / QA Production Readiness Prototype T&M Pre-Production Performance Evaluation & Tuning Health Check Production & Expansion Ops Optimization Training for Expanded Team
  41. 41. 42 Enablement: Database Modernization Receive a thorough assessment of whether MongoDB will better support your application than your current database Deliverables A summary of your application requirements The results of the fit assessment If applicable, recommendations for a migration to MongoDB, including an estimation of the effort required Details A MongoDB consulting engineer will spend at least 3 consecutive days working with your team, typically on site Within 10 business days, the MongoDB consulting engineer will deliver to you a comprehensive written report
  42. 42. 43 MongoDB Enterprise Advanced The best way to run MongoDB Supported. Secured. Certified. What’s included? 24 x 7 Support Ops Manager Advanced Security Commercial License Platform Certification On-Demand Training Free for evaluation & development https://www.mongodb.com/lp/download/ mongodb-enterprise
  43. 43. 44 • Benefits of migration are well understood • Many successful projects • Largest differences in data model and query language – Invest time in schema design…don’t think in tables! • Many principles of RDBMS apply to MongoDB Summary Download the Guide https://www.mongodb.com/collateral/rdbms-mongodb-migration-guide
  44. 44. http://cl.jroo.me/z3/v/D/C/e/a.baa-Too-many-bicycles-on-the-van.jpg Questions? @matkeep mat.keep@mongodb.com
  45. 45. Migration in Action Content Management • Migration from Oracle • Open APIs to federate access to data • Introduced search to allow content discovery • Lower latency • Faster dev cycles Subscriber Data Mgmt • Migration from Oracle • 4x faster time to market • 50% reduction in development costs • 67% reduction in storage costs • 10x reduction in latency Customer Data Mgmt & Analytics • RDBMS Migration • 95% faster in identifying matches • 50% increase in paying subscribers • 60% increase in unique web site visits.

Notes de l'éditeur

  • This doesn’t mean to say RDBMS are bad – one of most successful tech categories ever, still growing, and will around long after most of us
     
    For this reason, key things we believe are truly valuable:
    Expressive Query lang, strong consistency and secondary indexes allow us to build applications that are highly functional – we can query and analyze data in many different ways, ie more than just simple K/V.
  • On the the hand we want to take the best of innovation from NoSQL – data model flexibility, coupled with auto-sharding and localized data structures – allows develppers to build apps fast and ops team to scale them out on commodity hardware
  • MongoDB was built to address the way the world has changed while preserving the core database capabilities required to build functional apps

    MongoDB is the only database that harnesses the innovations of NoSQL and maintains the foundation of relational databases

×