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.

Healthy Code Magazine June-2014 Issue Midas-Touch-Article

409 views

Published on

On-the-fly-Schema Migration for MongoDB. If you want to download without logging into slideshare, please do so from http://healthycodemagazine.com/articles/download?fileName=MidasTouch_Dhaval_June2014

Published in: Technology
  • Be the first to comment

  • Be the first to like this

Healthy Code Magazine June-2014 Issue Midas-Touch-Article

  1. 1. Healthy Code June 201424 So what does Midas do? Zero downtime deployment and only one of the sites is active at any given time. Give your Mongo docs a Midas Touch! roll their own schema migration infrastructure or use data without downtime (unacceptable from SLA stand- introduces you to Midas and talks about the runtime Figure 01: Midas at work
  2. 2. Healthy CodeJune 2014 25 Let’s the new schema . Article As we ar use transactions db.orders. (‘dispatch’:{ status : }) use users db.customers.remove(‘[“address.line3”]’)
  3. 3. Healthy Code June 201426 . When date, etc. use transactions db.orders. (“dispatch.date”, ”{$date:[‘dd-MMM-yy’,’15-Aug-14’]}”) a convention for naming change set directory. // 03_upperCaseCatalogItemNameAndModifyDescrip- tion.delta use db.items. (‘itemName’,’{$toUpper: “$itemName” }’) db.items. (‘description’,’$concat: [“$itemName”, “Description”, $description”]’) No Leaky Abstractions on evolving the domain model and free them from Caveats
  4. 4. Healthy CodeJune 2014 27 move forward in time . 3. Why not rollback the database? not bomb. with? release. . . FAQ 1. What happens if a bug is discovered in the deployed application? 2. How can documents that never got requested by the application be migrated? establishing environments, transitioning and orienting within teams. software-artisan.com. artisan.com. versions at the same time

×