Webinar: MongoDB Migration Patterns - How Customers Start Using MongoDB

2,290 views

Published on

Now that you've chosen MongoDB, how should you migrate your deployment? In this webinar, we'll discuss the different ways companies migrate to MongoDB including hybrid solutions, where only new or certain features are migrated, and all-in migrations, where everything is migrated. We'll use real customer examples to discuss the pros and cons of each so you can decide what strategy will work best for your deployment.

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

  • Be the first to like this

No Downloads
Views
Total views
2,290
On SlideShare
0
From Embeds
0
Number of Embeds
1,648
Actions
Shares
0
Downloads
32
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide
  • Here we have greatly reduced the relational data model for this application to two tables. In reality no database has two tables. It is much more common to have hundreds or thousands of tables. And as a developer where do you begin when you have a complex data model?? If you’re building an app you’re really thinking about just a hand full of common things, like products, and these can be represented in a document much more easily that a complex relational model where the data is broken up in a way that doesn’t really reflect the way you think about the data or write an application.
  • Webinar: MongoDB Migration Patterns - How Customers Start Using MongoDB

    1. 1. Migrating data to MongoDB
    2. 2. 2Agenda• Why move your data• Considerations for migration• Techniques for implementing migration• Case study: How Shutterfly migrated 20TB ofproduction meta data with no downtime
    3. 3. 3Why move your data?• Improve development agility with documents• Reduce cost of data management• Scale to handle large data sets & transactionvolumes
    4. 4. Considerations
    5. 5. 5Does your schema need to change?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, … }]}
    6. 6. 6How does the Application moveover?Source DatabaseApplication
    7. 7. 7How does data get moved?Source DatabaseSnapshotContinuous SyncBatchMigrationApplicationApplication Managed
    8. 8. 8Can you have downtime?Source DatabaseMaster ExportingImporting MasterAvailable Degraded Down AvailableApplication ViewTime
    9. 9. Data MigrationTechnique
    10. 10. 10Mongoimportjsr@bruford:/tmp$ mongoimport --collection import_example < import.jsonconnected to: 127.0.0.1Tue Jun 18 00:02:12.553 imported 1 objectsjsr@bruford:/tmp$ mongoMongoDB shell version: 2.4.3connecting to: test> db.import_example.findOne(){"_id" : ObjectId("51bfdbc438b61619a4f2a12b"),"first" : "Jared","last" : "Rosoff","twitter" : "@forjared"}>
    11. 11. 11Extract, Transform & LoadSource DatabaseETL
    12. 12. 12HadoopSource Databasejobjobjobjob
    13. 13. 13App Driven MigrationSource DatabaseApplication
    14. 14. Case Study
    15. 15. 15Case StudyUses MongoDB to safeguard over 6 billion imagesserved to millions of customersProblem Why MongoDB Results• 6B images, 20TB ofdata• Brittle code base on topof Oracle database –hard to scale, addfeatures• High SW and HW costs• JSON-based datamodel• Agile, highperformance, scalable• Alignment withShutterfly’s services-based architecture• 80% cost reduction• 900% performanceimprovement• Faster time-to-market• Dev. cycles in weeksvs. tens of months
    16. 16. 16• Meta data stored in XML Blobs• App responsible for content of blobShutterflyOraclePhoto ID XML Blob1 <xml><meta-data>…</xml>2 <xml><meta-data>…</xml>3 <xml><meta-data>…</xml>
    17. 17. 171. Request for photo2. Try to read fromMongoDB3. If cache miss, readfrom Oracle4. Translate document &write to MongoDB5. Return to clientMigrating records on demandSource DatabaseApplication12345
    18. 18. 18Schema Migration – Initial<?xml version="1.0" encoding="utf16"?><votes><voteItem user="00000000" vote="1" /><voteItem user="11111111" vote="1" /><voteItem user="22222222" vote="1" /></votes>
    19. 19. 19Schema Migration – Phase 2<?xml version="1.0" encoding="utf16"?><votes><voteItem user="00000000" vote="1" /><voteItem user="11111111" vote="1" /><voteItem user="22222222" vote="1" /></votes>{ _id : "site/the3colbys/3326/_votes","V" : 0,"cD" : "Thu Sep 23 2010 20:38:54 GMT-0700 (PDT)","wD" : "Thu Sep 23 2010 20:38:54 GMT-0700 (PDT)","md5" : "71199d82ee730f271feface722a74d30","data" : "<?xml version="1.0" encoding="utf16"?><votes><voteItem user="00000000" vote="1" /><voteItem user="11111111" vote="1" /><voteItem user="22222222" vote="1" /></votes>"}
    20. 20. 20Schema Migration – Phase 2<?xml version="1.0" encoding="utf16"?><votes><voteItem user="00000000" vote="1" /><voteItem user="11111111" vote="1" /><voteItem user="22222222" vote="1" /></votes>{ _id : "site/the3colbys/3326/_votes","V" : 0,"cD" : "Thu Sep 23 2010 20:38:54 GMT-0700 (PDT)","wD" : "Thu Sep 23 2010 20:38:54 GMT-0700 (PDT)","md5" : "71199d82ee730f271feface722a74d30","data" : "<?xml version="1.0" encoding="utf16"?><votes><voteItem user="00000000" vote="1" /><voteItem user="11111111" vote="1" /><voteItem user="22222222" vote="1" /></votes>"}{ _id : "site/the3colbys/3326/_votes","V" : 0,"cD" : "Thu Sep 23 2010 20:38:54 GMT-0700 (PDT)","wD" : "Thu Sep 23 2010 20:38:54 GMT-0700 (PDT)","md5" : "71199d82ee730f271feface722a74d30","votes" : { 000000000:1, 111111111:1, 222222222:1 }}

    ×