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
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. 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. 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. 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