SlideShare a Scribd company logo
1 of 46
Download to read offline
Midas
On-the-fly-Schema-Migration Tool
For
Schema Migration Problems
Applications have to hand-roll their own schema
migration infrastructure or use some third-party tool
!

Difficult to migrate TBs of data without downtime
unacceptable from SLA stand-point!
!

How about: on-the-fly schema migration - a Midas
Touch?
Zero-downtime Deployment
Expansion Scripts
Apply changes to the documents safely that do not
break backwards compatibility with existing version
of the application.
e.g Adding, copying, merging, splitting fields in a
document.
Contraction Scripts
Clean up any database schema that is not needed
after the upgrade.
e.g. removing fields from a document.
The Mechanics
Run Expansion scripts before upgrading the application
Upgrade the cluster, a node at a time
Run Contraction Scripts
Once the system has been completely upgraded and
deemed stable.
Typically, contractions can be run, say days/weeks
after complete validation.
Do we need DB rollback?
Short Answer
No
!

Long Answer
Reversing DB changes can lead to potential loss of
data or leave it in an inconsistent state.
Its safer to rollback application without needing to
rollback DB changes as expansions are backward
compatible.
How it works?
An Architectural Overview
Application
How it works?
An Architectural Overview
Application

Midas

Intercepts Responses at Protocol Level
Upgrades/Downgrades Document
schema in-transit
Protocol Level brings
Transparency
From the App perspective
Midas is Agnostic of Language specific drivers and versions
within those languages
Works with versions of Ruby, Python, C# and Java drivers.

From MongoDB perspective
Midas is Agnostic of the MongoDB configurations
Works with Standalone, Replica Sets, Sharded
environments.
Deep Dive

I’m just a decorating
proxy!

Configurer

Parser

Delta Files
(written in a DSL)

Res

Res

Transformer

Req

Req

Application

Midas
Delta scripts
Group ChangeSet as Directories
Group deltas as Expansion and/
or Contraction deltas as
Directories within ChangeSet
Write delta scripts using
the .delta extension
Midas relies on the order
specified by you
Ordering info is embedded by you
within the change set directory
name and delta files
Delta Scripts - Convention
Must begin change set directories with a number and
subsequent change set directories are numbered in
ascending order.
Example: use <changesetNumber>-<featureName> as
convention for naming change set directory.

Within a change set, expansion and contraction scripts are
grouped by folders - expansions and contractions.
Always begin delta scripts with a number and subsequent
delta scripts are numbered in ascending order.
Example: use <changeNumber>_<WhatTheChangeIs>.delta
as convention for naming delta files
Sample Delta Script
Each Delta script is written using a DSL
Very close to MongoDB lingo, virtually no learning
curve.
use users
db.customers.remove(‘["address.line1"]')
db.customers.merge([“lname”, “fname”], “ “, “name”)
!
!
use transactions
db.orders.add(‘dispatch : { status: ‘NOT DELIVERED’}’)
Agile App Delivery & DevOps
Inject Midas into Architecture
Start or Middle of project

Supports Development of Application in small-steps
Add Application ChangeSets/Deltas on-the-fly

Copes with Load
Add/Remove Application Nodes on-the-fly

Supports Multiple Applications
Add/Remove Application(s) on-the-fly
No Leaky Abstractions
Does not expect the Domain Model to be aware of
versioning.
Allows developers to focus on the domain while freeing
them from versioning concerns.
If you wish to take charge, Midas will not come in your way.

Midas maintains versioning information within the
document itself.
_expansionVersion and _contractionVersion fields are part
of the documents “touched” by Midas.
Updates them during request and response.
Caveats
Never ever change a delta that has been applied to
production.
Always move forward in time.
Reverse a change by a counter-change.

Force-update migration on documents that are not
expanded by App demand, and then proceed to
contraction.
contracted by App demand, and then proceed to next Appupgrade cycle.
Currently Midas supports Zero Downtime Configuration - 1
(see later slides), others will be supported in subsequent
releases.
Midas Domain Model
Configuration
1
*

ResponseInterceptor
Node

*
1

Application

RequestInterceptor

1
1

Transformer
Parsed and Injected in

<<Folder>> 1
ChangeSet

*

<<File>>
Delta

1

*

<<Verb>>
Transformation
Zero-Downtime Deployment
Configuration - 1
!

Injecting and Using Midas
Deployment config - 1
Site A
App v0
App v0
Load
Balancer

Site B
App v0
0

App v0

Offline does not mean
node is physically taken
down or is off

Online
Offline
Deployment config - 1
Site A
App v0

1. Inject Midas in to the architecture with
app configured in Expansion Mode
2. Start with all Sites, having changeSet = 0
(no change) for all nodes

App v0
Load
Balancer

Midas
Site B
App v0

1

App v0

Offline does not mean
node is physically taken
down or is off

Online
Offline
Deployment config - 1
Site A

4. For all nodes in Site B - v1, Apply
new change set, say changeSet = 3

App v0
App v0
Load
Balancer

Midas
Site B
App v1

2

App v1

3. Upgrade Site B to App v1.

Offline does not mean
node is physically taken
down or is off

Online
Offline
Deployment config - 1
Site A
App v0
App v0
Load
Balancer

Midas
Site B
App v1

5. Flip to Site B

3

App v1

Offline does not mean
node is physically taken
down or is off

Online
Offline
Deployment config - 1
Site A
App v0
App v0
Load
Balancer

Midas
Site B
App v1

4

App v1

6. Confirm that App v1 is stable, in case it is
not, bug fix and re-deploy it.
7. Once deemed stable, Make sure that
expansion of all documents is complete. This
can be currently achieved by writing a simple
script, that does a find and save thru’ Midas.

Online
Offline
Deployment config - 1
Site A
App v0

8. Change Application mode to Contraction.

App v0
Load
Balancer

Midas
Site B
App v1

5

App v1

Online
Offline
Deployment config - 1
Site A
App v0
App v0
Load
Balancer

Midas
Site B
App v1

6

App v1

9. Make Sure that Contraction of all
documents is complete. This can be
achieved by writing a simple script that does
find and save through Midas.

Online
Offline
Deployment config - 1
Site A
App v0

10. Prepare for next Release and Repeat
steps from #1.

App v0
Load
Balancer

Midas
Site B
App v1

7

App v1

Offline does not mean
node is physically taken
down or is off

Online
Offline
Zero-Downtime Deployment
Configuration - 1
!

Node Removal at Runtime
2. Remove Node0 from
app.midas

!
Say, due to some problems, you want to
remove Node0 from service:

!

1. Remove Node0 from LB.

Site A
Load
Balancer

Node0

demoAppV1 {!
mode = contraction!
// siteANode0 {!
//
ip = x.x.x.x!
//
changeSet = 3!
// }!
siteANode1 {!
ip = y.y.y.y!
changeSet = 3!
}!
}

Midas

Node1
Online
0

Offline
2. Midas will sever all connections
with Node0

Site A
Load
Balancer

Node0

Midas

Node1

1

Offline does not mean
node is physically taken
down or is off

Online
Offline
Zero-Downtime Deployment
Configuration - 1
!

Node Injection at Runtime
You want to inject new node for App
in service
1. Add Node2 to app.midas.

Site A
Load
Balancer

Node0
Node1
Node2

0

demoAppV1 {!
mode = expansion!
siteANode0 {!
ip = x.x.x.x!
changeSet = 3!
}!
siteANode1 {!
ip = y.y.y.y!
changeSet = 3!
}!
siteANode2 {!
ip = z.z.z.z!
changeSet = 3!
}!
}

Midas
2. Midas is ready to receive
connections from Node2

Offline does not mean
node is physically taken
down or is off

Online
Offline
3. Add Node2 to LB.

Site A
Load
Balancer

Node0
Node1

Midas

Node2
Online
1

Offline
Zero-Downtime Deployment
Configuration - 1
!

App Removal at Runtime
Deployment config - 1
Site A

App1
Load
Balancer

2. Stop App2 LB so
that it stops receiving
requests

App2
Load
Balancer

0

Site B

Midas
Site A

Site B

1. Say, you want to
remove App2 from
Midas.

Online
Offline
1. Remove App2 from midas.config

!
Site A

App1
Load
Balancer

apps {!
demoApp1!
// demoApp2!
}!

!
Site B

Note: You don’t have to remove demoApp2 dir or
demoApp2.midas to remove the application from
Midas (this allows you to re-inject App2 should the
need be)

Midas
Site A

App2
Load
Balancer

2. Midas will sever all connections
from App2

Site B
3. You can now take down App2

1

Online
Offline
Zero-Downtime Deployment
Configuration - 1
!

App Injection at Runtime
Site A

App1
Load
Balancer

Site B

1. Say, you want to add App2
to Midas.

Midas
Site A

App2
Load
Balancer

Site B

2. Setup the infrastructure for
App2 (Sites and Nodes).

Online
0

Offline
3. Create App2 dir within deltas dir
4. Set-up change sets with expansions
and contractions in App2 dir.

Site A

App1
Load
Balancer

Site B

Midas
Site A

App2
Load
Balancer

Site B

Online
1

Offline
5. Add demoApp2.midas (with
mode and nodes configured)

Site A

App1
Load
Balancer

Site B

demoApp2Ver1_0 {!
mode = expansion!
siteANode1 {!
ip = a.a.a.a!
changeSet = 2!
}!
…!
…!
siteBNode1 {!
ip = p.p.p.p!
changeSet = 2!
}!
}

Midas
Site A

App2
Load
Balancer

Site B

Online
2

Offline
Site A

App1
Load
Balancer

9. Start the LB so that
App2 is live

App2
Load
Balancer

6. Add App2 to midas.config
apps {!
demoApp1!
demoApp2!
}!

!
Site B

7. Midas is ready to receive
connections from App2

Midas
Site A

Site B
8. Start any Site that can
go-live, say Site A here

2

Online
Offline
Zero-Downtime Deployment
Configuration - 2
Not Supported in this Release
Deployment config - 2
Node A
App v1
Load
Balancer

Node B
App v1
Node C
App v1

0

Online
Offline
Zero-Downtime Deployment
Configuration - 3
AWS
Not Supported in this Release
Deployment config - 3
Node A
App v1
Load
Balancer

Node B
App v1
Node C
App v1

0

Online
Offline
The Team
Brian Blignaut
bblignaut@equalexperts.com

Dhaval Dalal [@softwareartisan]
ddalal@equalexperts.com

Vivek Dhapola
vdhapola@equalexperts.com

Komal Jain
kjain@equalexperts.com
References

Owen Rogers
http://exortech.com/blog/2009/02/01/weeklyrelease-blog-11-zero-downtime-databasedeployment/
Thank-You

More Related Content

What's hot

IBM Think Session 3249 Watson Work Services Java SDK
IBM Think Session 3249 Watson Work Services Java SDKIBM Think Session 3249 Watson Work Services Java SDK
IBM Think Session 3249 Watson Work Services Java SDKPaul Withers
 
Debugging IE Performance Issues with xperf, ETW and NavigationTiming
Debugging IE Performance Issues with xperf, ETW and NavigationTimingDebugging IE Performance Issues with xperf, ETW and NavigationTiming
Debugging IE Performance Issues with xperf, ETW and NavigationTimingNicholas Jansma
 
AWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineAWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineJulien SIMON
 
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Ajeet Singh Raina
 
Exploring the GitHub Service Universe
Exploring the GitHub Service UniverseExploring the GitHub Service Universe
Exploring the GitHub Service UniverseBjörn Kimminich
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassPaul Withers
 
不只自動化而且更敏捷的Android開發工具 gradle mopcon
不只自動化而且更敏捷的Android開發工具 gradle mopcon不只自動化而且更敏捷的Android開發工具 gradle mopcon
不只自動化而且更敏捷的Android開發工具 gradle mopconsam chiu
 
Cloud and Ubiquitous Computing manual
Cloud and Ubiquitous Computing manual Cloud and Ubiquitous Computing manual
Cloud and Ubiquitous Computing manual Sonali Parab
 
Mete Atamel
Mete AtamelMete Atamel
Mete AtamelCodeFest
 
Going Serverless Using the Spring Framework Ecosystem
Going Serverless Using the Spring Framework EcosystemGoing Serverless Using the Spring Framework Ecosystem
Going Serverless Using the Spring Framework EcosystemVMware Tanzu
 
Continuous Integration With Jenkins
Continuous Integration With JenkinsContinuous Integration With Jenkins
Continuous Integration With JenkinsEdureka!
 
Administration for Oracle ADF Applications
Administration for Oracle ADF ApplicationsAdministration for Oracle ADF Applications
Administration for Oracle ADF ApplicationsAndreas Koop
 
Walking Through Spring Cloud Data Flow
Walking Through Spring Cloud Data FlowWalking Through Spring Cloud Data Flow
Walking Through Spring Cloud Data FlowVMware Tanzu
 
Advanced Debugging Techniques
Advanced Debugging TechniquesAdvanced Debugging Techniques
Advanced Debugging TechniquesDavid Szöke
 
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...VMware Tanzu
 

What's hot (20)

IBM Think Session 3249 Watson Work Services Java SDK
IBM Think Session 3249 Watson Work Services Java SDKIBM Think Session 3249 Watson Work Services Java SDK
IBM Think Session 3249 Watson Work Services Java SDK
 
Debugging IE Performance Issues with xperf, ETW and NavigationTiming
Debugging IE Performance Issues with xperf, ETW and NavigationTimingDebugging IE Performance Issues with xperf, ETW and NavigationTiming
Debugging IE Performance Issues with xperf, ETW and NavigationTiming
 
AWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipelineAWS CodeCommit, CodeDeploy & CodePipeline
AWS CodeCommit, CodeDeploy & CodePipeline
 
Test Policy and Practices
Test Policy and PracticesTest Policy and Practices
Test Policy and Practices
 
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
Accelerate Your Automation Testing Effort using TestProject & Docker | Docker...
 
Agility Requires Safety
Agility Requires SafetyAgility Requires Safety
Agility Requires Safety
 
Exploring the GitHub Service Universe
Exploring the GitHub Service UniverseExploring the GitHub Service Universe
Exploring the GitHub Service Universe
 
IBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClassIBM Think Session 8598 Domino and JavaScript Development MasterClass
IBM Think Session 8598 Domino and JavaScript Development MasterClass
 
DevOps for Azure
DevOps for AzureDevOps for Azure
DevOps for Azure
 
不只自動化而且更敏捷的Android開發工具 gradle mopcon
不只自動化而且更敏捷的Android開發工具 gradle mopcon不只自動化而且更敏捷的Android開發工具 gradle mopcon
不只自動化而且更敏捷的Android開發工具 gradle mopcon
 
Cloud and Ubiquitous Computing manual
Cloud and Ubiquitous Computing manual Cloud and Ubiquitous Computing manual
Cloud and Ubiquitous Computing manual
 
Mete Atamel
Mete AtamelMete Atamel
Mete Atamel
 
Going Serverless Using the Spring Framework Ecosystem
Going Serverless Using the Spring Framework EcosystemGoing Serverless Using the Spring Framework Ecosystem
Going Serverless Using the Spring Framework Ecosystem
 
React native
React nativeReact native
React native
 
Continuous Integration With Jenkins
Continuous Integration With JenkinsContinuous Integration With Jenkins
Continuous Integration With Jenkins
 
Administration for Oracle ADF Applications
Administration for Oracle ADF ApplicationsAdministration for Oracle ADF Applications
Administration for Oracle ADF Applications
 
Walking Through Spring Cloud Data Flow
Walking Through Spring Cloud Data FlowWalking Through Spring Cloud Data Flow
Walking Through Spring Cloud Data Flow
 
Advanced Debugging Techniques
Advanced Debugging TechniquesAdvanced Debugging Techniques
Advanced Debugging Techniques
 
Continuous integration
Continuous integrationContinuous integration
Continuous integration
 
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...
Continuous Delivery for Microservice Architectures with Concourse & Cloud Fou...
 

Similar to Midas - on-the-fly schema migration tool for MongoDB.

Twelve-Factor App: Software Application Architecture
Twelve-Factor App: Software Application ArchitectureTwelve-Factor App: Software Application Architecture
Twelve-Factor App: Software Application ArchitectureSigfred Balatan Jr.
 
Get over the Cloud with Bluemix
Get over the Cloud with BluemixGet over the Cloud with Bluemix
Get over the Cloud with BluemixCodemotion
 
SHARE 2014 Pittsburgh, Managing multi version applications in cics
SHARE 2014 Pittsburgh, Managing multi version applications in cicsSHARE 2014 Pittsburgh, Managing multi version applications in cics
SHARE 2014 Pittsburgh, Managing multi version applications in cicsnick_garrod
 
How to implement Micro-frontends using Qiankun
How to implement Micro-frontends using QiankunHow to implement Micro-frontends using Qiankun
How to implement Micro-frontends using QiankunFibonalabs
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 serversMark Myers
 
Cloud Foundry a Developer's Perspective
Cloud Foundry a Developer's PerspectiveCloud Foundry a Developer's Perspective
Cloud Foundry a Developer's PerspectiveDave McCrory
 
Laurentiu macovei meteor. a better way of building apps
Laurentiu macovei   meteor. a better way of building appsLaurentiu macovei   meteor. a better way of building apps
Laurentiu macovei meteor. a better way of building appsCodecamp Romania
 
N-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and SecurityN-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and SecurityPeter Gfader
 
Managing multi-version applications in cics
Managing multi-version applications in cicsManaging multi-version applications in cics
Managing multi-version applications in cicsMatthew Webster
 
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...DigitalOcean
 
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...azuredayit
 
Datasheet weblogic midvisionextensionforibmraf
Datasheet weblogic midvisionextensionforibmrafDatasheet weblogic midvisionextensionforibmraf
Datasheet weblogic midvisionextensionforibmrafMidVision
 
Monoliths to microservices workshop
Monoliths to microservices workshopMonoliths to microservices workshop
Monoliths to microservices workshopJudy Breedlove
 
Google I/O 2016 replay - Android N Development
Google I/O 2016 replay - Android N DevelopmentGoogle I/O 2016 replay - Android N Development
Google I/O 2016 replay - Android N DevelopmentTowhidul Haque Roni
 
Intro to Cloud Native _ v1.0en (2021/01)
Intro to Cloud Native _ v1.0en (2021/01)Intro to Cloud Native _ v1.0en (2021/01)
Intro to Cloud Native _ v1.0en (2021/01)Young Suk Ahn Park
 
Leaning into Server to Cloud App Migration
Leaning into Server to Cloud App MigrationLeaning into Server to Cloud App Migration
Leaning into Server to Cloud App MigrationAtlassian
 

Similar to Midas - on-the-fly schema migration tool for MongoDB. (20)

Twelve-Factor App: Software Application Architecture
Twelve-Factor App: Software Application ArchitectureTwelve-Factor App: Software Application Architecture
Twelve-Factor App: Software Application Architecture
 
Get over the Cloud with Bluemix
Get over the Cloud with BluemixGet over the Cloud with Bluemix
Get over the Cloud with Bluemix
 
SHARE 2014 Pittsburgh, Managing multi version applications in cics
SHARE 2014 Pittsburgh, Managing multi version applications in cicsSHARE 2014 Pittsburgh, Managing multi version applications in cics
SHARE 2014 Pittsburgh, Managing multi version applications in cics
 
How to implement Micro-frontends using Qiankun
How to implement Micro-frontends using QiankunHow to implement Micro-frontends using Qiankun
How to implement Micro-frontends using Qiankun
 
1 app 2 developers 3 servers
1 app 2 developers 3 servers1 app 2 developers 3 servers
1 app 2 developers 3 servers
 
Cloud Foundry a Developer's Perspective
Cloud Foundry a Developer's PerspectiveCloud Foundry a Developer's Perspective
Cloud Foundry a Developer's Perspective
 
Laurentiu macovei meteor. a better way of building apps
Laurentiu macovei   meteor. a better way of building appsLaurentiu macovei   meteor. a better way of building apps
Laurentiu macovei meteor. a better way of building apps
 
N-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and SecurityN-Tier Application with Windows Forms - Deployment and Security
N-Tier Application with Windows Forms - Deployment and Security
 
Managing multi-version applications in cics
Managing multi-version applications in cicsManaging multi-version applications in cics
Managing multi-version applications in cics
 
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
Combining Cloud Native & PaaS: Building a Fully Managed Application Platform ...
 
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
Azure Day Rome 2019 Reloaded - Strangle(r pattern) your legacy application ru...
 
Datasheet weblogic midvisionextensionforibmraf
Datasheet weblogic midvisionextensionforibmrafDatasheet weblogic midvisionextensionforibmraf
Datasheet weblogic midvisionextensionforibmraf
 
Monoliths to microservices workshop
Monoliths to microservices workshopMonoliths to microservices workshop
Monoliths to microservices workshop
 
Google I/O 2016 replay - Android N Development
Google I/O 2016 replay - Android N DevelopmentGoogle I/O 2016 replay - Android N Development
Google I/O 2016 replay - Android N Development
 
Intro to Cloud Native _ v1.0en (2021/01)
Intro to Cloud Native _ v1.0en (2021/01)Intro to Cloud Native _ v1.0en (2021/01)
Intro to Cloud Native _ v1.0en (2021/01)
 
Opening Up Your Network with SDN
Opening Up Your Network with SDNOpening Up Your Network with SDN
Opening Up Your Network with SDN
 
Leaning into Server to Cloud App Migration
Leaning into Server to Cloud App MigrationLeaning into Server to Cloud App Migration
Leaning into Server to Cloud App Migration
 
Twelve factor apps
Twelve factor appsTwelve factor apps
Twelve factor apps
 
Dvwkbm lab2 cli1
Dvwkbm lab2 cli1Dvwkbm lab2 cli1
Dvwkbm lab2 cli1
 
[TestWarez 2017] Behavior Driven Development in a complex environment - Consu...
[TestWarez 2017] Behavior Driven Development in a complex environment - Consu...[TestWarez 2017] Behavior Driven Development in a complex environment - Consu...
[TestWarez 2017] Behavior Driven Development in a complex environment - Consu...
 

More from Dhaval Dalal

Test Pyramid in Microservices Context
Test Pyramid in Microservices ContextTest Pyramid in Microservices Context
Test Pyramid in Microservices ContextDhaval Dalal
 
Booting into functional programming
Booting into functional programmingBooting into functional programming
Booting into functional programmingDhaval Dalal
 
Currying and Partial Function Application (PFA)
Currying and Partial Function Application (PFA)Currying and Partial Function Application (PFA)
Currying and Partial Function Application (PFA)Dhaval Dalal
 
Creating Lazy stream in CSharp
Creating Lazy stream in CSharpCreating Lazy stream in CSharp
Creating Lazy stream in CSharpDhaval Dalal
 
Json Viewer Stories
Json Viewer StoriesJson Viewer Stories
Json Viewer StoriesDhaval Dalal
 
Mars rover-extension
Mars rover-extensionMars rover-extension
Mars rover-extensionDhaval Dalal
 
How Is Homeopathy Near To Yoga?
How Is Homeopathy Near To Yoga?How Is Homeopathy Near To Yoga?
How Is Homeopathy Near To Yoga?Dhaval Dalal
 
Approaching ATDD/BDD
Approaching ATDD/BDDApproaching ATDD/BDD
Approaching ATDD/BDDDhaval Dalal
 
Paradigms Code jugalbandi
Paradigms Code jugalbandiParadigms Code jugalbandi
Paradigms Code jugalbandiDhaval Dalal
 
Data Reconciliation
Data ReconciliationData Reconciliation
Data ReconciliationDhaval Dalal
 
DRYing to Monad in Java8
DRYing to Monad in Java8DRYing to Monad in Java8
DRYing to Monad in Java8Dhaval Dalal
 
4-Code-Jugalbandi-destructuring-patternmatching-healthycode#apr2015
4-Code-Jugalbandi-destructuring-patternmatching-healthycode#apr20154-Code-Jugalbandi-destructuring-patternmatching-healthycode#apr2015
4-Code-Jugalbandi-destructuring-patternmatching-healthycode#apr2015Dhaval Dalal
 
Jumping-with-java8
Jumping-with-java8Jumping-with-java8
Jumping-with-java8Dhaval Dalal
 
3-CodeJugalbandi-currying-pfa-healthycodemagazine#mar2015
3-CodeJugalbandi-currying-pfa-healthycodemagazine#mar20153-CodeJugalbandi-currying-pfa-healthycodemagazine#mar2015
3-CodeJugalbandi-currying-pfa-healthycodemagazine#mar2015Dhaval Dalal
 
CodeJugalbandi-Sequencing-HealthyCode-Magazine-Feb-2015
CodeJugalbandi-Sequencing-HealthyCode-Magazine-Feb-2015CodeJugalbandi-Sequencing-HealthyCode-Magazine-Feb-2015
CodeJugalbandi-Sequencing-HealthyCode-Magazine-Feb-2015Dhaval Dalal
 
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-IssueCodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-IssueDhaval Dalal
 
The tao-of-transformation-workshop
The tao-of-transformation-workshopThe tao-of-transformation-workshop
The tao-of-transformation-workshopDhaval Dalal
 

More from Dhaval Dalal (20)

Test Pyramid in Microservices Context
Test Pyramid in Microservices ContextTest Pyramid in Microservices Context
Test Pyramid in Microservices Context
 
Code Retreat
Code RetreatCode Retreat
Code Retreat
 
Booting into functional programming
Booting into functional programmingBooting into functional programming
Booting into functional programming
 
Currying and Partial Function Application (PFA)
Currying and Partial Function Application (PFA)Currying and Partial Function Application (PFA)
Currying and Partial Function Application (PFA)
 
Creating Lazy stream in CSharp
Creating Lazy stream in CSharpCreating Lazy stream in CSharp
Creating Lazy stream in CSharp
 
Json Viewer Stories
Json Viewer StoriesJson Viewer Stories
Json Viewer Stories
 
Value Objects
Value ObjectsValue Objects
Value Objects
 
Mars rover-extension
Mars rover-extensionMars rover-extension
Mars rover-extension
 
How Is Homeopathy Near To Yoga?
How Is Homeopathy Near To Yoga?How Is Homeopathy Near To Yoga?
How Is Homeopathy Near To Yoga?
 
Approaching ATDD/BDD
Approaching ATDD/BDDApproaching ATDD/BDD
Approaching ATDD/BDD
 
Paradigms Code jugalbandi
Paradigms Code jugalbandiParadigms Code jugalbandi
Paradigms Code jugalbandi
 
Data Reconciliation
Data ReconciliationData Reconciliation
Data Reconciliation
 
DRYing to Monad in Java8
DRYing to Monad in Java8DRYing to Monad in Java8
DRYing to Monad in Java8
 
CodeRetreat
CodeRetreatCodeRetreat
CodeRetreat
 
4-Code-Jugalbandi-destructuring-patternmatching-healthycode#apr2015
4-Code-Jugalbandi-destructuring-patternmatching-healthycode#apr20154-Code-Jugalbandi-destructuring-patternmatching-healthycode#apr2015
4-Code-Jugalbandi-destructuring-patternmatching-healthycode#apr2015
 
Jumping-with-java8
Jumping-with-java8Jumping-with-java8
Jumping-with-java8
 
3-CodeJugalbandi-currying-pfa-healthycodemagazine#mar2015
3-CodeJugalbandi-currying-pfa-healthycodemagazine#mar20153-CodeJugalbandi-currying-pfa-healthycodemagazine#mar2015
3-CodeJugalbandi-currying-pfa-healthycodemagazine#mar2015
 
CodeJugalbandi-Sequencing-HealthyCode-Magazine-Feb-2015
CodeJugalbandi-Sequencing-HealthyCode-Magazine-Feb-2015CodeJugalbandi-Sequencing-HealthyCode-Magazine-Feb-2015
CodeJugalbandi-Sequencing-HealthyCode-Magazine-Feb-2015
 
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-IssueCodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
CodeJugalbandi-Expression-Problem-HealthyCode-Magazine#Jan-2015-Issue
 
The tao-of-transformation-workshop
The tao-of-transformation-workshopThe tao-of-transformation-workshop
The tao-of-transformation-workshop
 

Recently uploaded

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity PlanDatabarracks
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfLoriGlavin3
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxBkGupta21
 

Recently uploaded (20)

Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
How to write a Business Continuity Plan
How to write a Business Continuity PlanHow to write a Business Continuity Plan
How to write a Business Continuity Plan
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate AgentsRyan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
Ryan Mahoney - Will Artificial Intelligence Replace Real Estate Agents
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Moving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdfMoving Beyond Passwords: FIDO Paris Seminar.pdf
Moving Beyond Passwords: FIDO Paris Seminar.pdf
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
unit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptxunit 4 immunoblotting technique complete.pptx
unit 4 immunoblotting technique complete.pptx
 

Midas - on-the-fly schema migration tool for MongoDB.

  • 2. Schema Migration Problems Applications have to hand-roll their own schema migration infrastructure or use some third-party tool ! Difficult to migrate TBs of data without downtime unacceptable from SLA stand-point! ! How about: on-the-fly schema migration - a Midas Touch?
  • 3. Zero-downtime Deployment Expansion Scripts Apply changes to the documents safely that do not break backwards compatibility with existing version of the application. e.g Adding, copying, merging, splitting fields in a document. Contraction Scripts Clean up any database schema that is not needed after the upgrade. e.g. removing fields from a document.
  • 4. The Mechanics Run Expansion scripts before upgrading the application Upgrade the cluster, a node at a time Run Contraction Scripts Once the system has been completely upgraded and deemed stable. Typically, contractions can be run, say days/weeks after complete validation.
  • 5. Do we need DB rollback? Short Answer No ! Long Answer Reversing DB changes can lead to potential loss of data or leave it in an inconsistent state. Its safer to rollback application without needing to rollback DB changes as expansions are backward compatible.
  • 6. How it works? An Architectural Overview Application
  • 7. How it works? An Architectural Overview Application Midas Intercepts Responses at Protocol Level Upgrades/Downgrades Document schema in-transit
  • 8. Protocol Level brings Transparency From the App perspective Midas is Agnostic of Language specific drivers and versions within those languages Works with versions of Ruby, Python, C# and Java drivers. From MongoDB perspective Midas is Agnostic of the MongoDB configurations Works with Standalone, Replica Sets, Sharded environments.
  • 9. Deep Dive I’m just a decorating proxy! Configurer Parser Delta Files (written in a DSL) Res Res Transformer Req Req Application Midas
  • 10. Delta scripts Group ChangeSet as Directories Group deltas as Expansion and/ or Contraction deltas as Directories within ChangeSet Write delta scripts using the .delta extension Midas relies on the order specified by you Ordering info is embedded by you within the change set directory name and delta files
  • 11. Delta Scripts - Convention Must begin change set directories with a number and subsequent change set directories are numbered in ascending order. Example: use <changesetNumber>-<featureName> as convention for naming change set directory. Within a change set, expansion and contraction scripts are grouped by folders - expansions and contractions. Always begin delta scripts with a number and subsequent delta scripts are numbered in ascending order. Example: use <changeNumber>_<WhatTheChangeIs>.delta as convention for naming delta files
  • 12. Sample Delta Script Each Delta script is written using a DSL Very close to MongoDB lingo, virtually no learning curve. use users db.customers.remove(‘["address.line1"]') db.customers.merge([“lname”, “fname”], “ “, “name”) ! ! use transactions db.orders.add(‘dispatch : { status: ‘NOT DELIVERED’}’)
  • 13. Agile App Delivery & DevOps Inject Midas into Architecture Start or Middle of project Supports Development of Application in small-steps Add Application ChangeSets/Deltas on-the-fly Copes with Load Add/Remove Application Nodes on-the-fly Supports Multiple Applications Add/Remove Application(s) on-the-fly
  • 14. No Leaky Abstractions Does not expect the Domain Model to be aware of versioning. Allows developers to focus on the domain while freeing them from versioning concerns. If you wish to take charge, Midas will not come in your way. Midas maintains versioning information within the document itself. _expansionVersion and _contractionVersion fields are part of the documents “touched” by Midas. Updates them during request and response.
  • 15. Caveats Never ever change a delta that has been applied to production. Always move forward in time. Reverse a change by a counter-change. Force-update migration on documents that are not expanded by App demand, and then proceed to contraction. contracted by App demand, and then proceed to next Appupgrade cycle. Currently Midas supports Zero Downtime Configuration - 1 (see later slides), others will be supported in subsequent releases.
  • 16. Midas Domain Model Configuration 1 * ResponseInterceptor Node * 1 Application RequestInterceptor 1 1 Transformer Parsed and Injected in <<Folder>> 1 ChangeSet * <<File>> Delta 1 * <<Verb>> Transformation
  • 17. Zero-Downtime Deployment Configuration - 1 ! Injecting and Using Midas
  • 18. Deployment config - 1 Site A App v0 App v0 Load Balancer Site B App v0 0 App v0 Offline does not mean node is physically taken down or is off Online Offline
  • 19. Deployment config - 1 Site A App v0 1. Inject Midas in to the architecture with app configured in Expansion Mode 2. Start with all Sites, having changeSet = 0 (no change) for all nodes App v0 Load Balancer Midas Site B App v0 1 App v0 Offline does not mean node is physically taken down or is off Online Offline
  • 20. Deployment config - 1 Site A 4. For all nodes in Site B - v1, Apply new change set, say changeSet = 3 App v0 App v0 Load Balancer Midas Site B App v1 2 App v1 3. Upgrade Site B to App v1. Offline does not mean node is physically taken down or is off Online Offline
  • 21. Deployment config - 1 Site A App v0 App v0 Load Balancer Midas Site B App v1 5. Flip to Site B 3 App v1 Offline does not mean node is physically taken down or is off Online Offline
  • 22. Deployment config - 1 Site A App v0 App v0 Load Balancer Midas Site B App v1 4 App v1 6. Confirm that App v1 is stable, in case it is not, bug fix and re-deploy it. 7. Once deemed stable, Make sure that expansion of all documents is complete. This can be currently achieved by writing a simple script, that does a find and save thru’ Midas. Online Offline
  • 23. Deployment config - 1 Site A App v0 8. Change Application mode to Contraction. App v0 Load Balancer Midas Site B App v1 5 App v1 Online Offline
  • 24. Deployment config - 1 Site A App v0 App v0 Load Balancer Midas Site B App v1 6 App v1 9. Make Sure that Contraction of all documents is complete. This can be achieved by writing a simple script that does find and save through Midas. Online Offline
  • 25. Deployment config - 1 Site A App v0 10. Prepare for next Release and Repeat steps from #1. App v0 Load Balancer Midas Site B App v1 7 App v1 Offline does not mean node is physically taken down or is off Online Offline
  • 26. Zero-Downtime Deployment Configuration - 1 ! Node Removal at Runtime
  • 27. 2. Remove Node0 from app.midas ! Say, due to some problems, you want to remove Node0 from service: ! 1. Remove Node0 from LB. Site A Load Balancer Node0 demoAppV1 {! mode = contraction! // siteANode0 {! // ip = x.x.x.x! // changeSet = 3! // }! siteANode1 {! ip = y.y.y.y! changeSet = 3! }! } Midas Node1 Online 0 Offline
  • 28. 2. Midas will sever all connections with Node0 Site A Load Balancer Node0 Midas Node1 1 Offline does not mean node is physically taken down or is off Online Offline
  • 29. Zero-Downtime Deployment Configuration - 1 ! Node Injection at Runtime
  • 30. You want to inject new node for App in service 1. Add Node2 to app.midas. Site A Load Balancer Node0 Node1 Node2 0 demoAppV1 {! mode = expansion! siteANode0 {! ip = x.x.x.x! changeSet = 3! }! siteANode1 {! ip = y.y.y.y! changeSet = 3! }! siteANode2 {! ip = z.z.z.z! changeSet = 3! }! } Midas 2. Midas is ready to receive connections from Node2 Offline does not mean node is physically taken down or is off Online Offline
  • 31. 3. Add Node2 to LB. Site A Load Balancer Node0 Node1 Midas Node2 Online 1 Offline
  • 32. Zero-Downtime Deployment Configuration - 1 ! App Removal at Runtime
  • 33. Deployment config - 1 Site A App1 Load Balancer 2. Stop App2 LB so that it stops receiving requests App2 Load Balancer 0 Site B Midas Site A Site B 1. Say, you want to remove App2 from Midas. Online Offline
  • 34. 1. Remove App2 from midas.config ! Site A App1 Load Balancer apps {! demoApp1! // demoApp2! }! ! Site B Note: You don’t have to remove demoApp2 dir or demoApp2.midas to remove the application from Midas (this allows you to re-inject App2 should the need be) Midas Site A App2 Load Balancer 2. Midas will sever all connections from App2 Site B 3. You can now take down App2 1 Online Offline
  • 35. Zero-Downtime Deployment Configuration - 1 ! App Injection at Runtime
  • 36. Site A App1 Load Balancer Site B 1. Say, you want to add App2 to Midas. Midas Site A App2 Load Balancer Site B 2. Setup the infrastructure for App2 (Sites and Nodes). Online 0 Offline
  • 37. 3. Create App2 dir within deltas dir 4. Set-up change sets with expansions and contractions in App2 dir. Site A App1 Load Balancer Site B Midas Site A App2 Load Balancer Site B Online 1 Offline
  • 38. 5. Add demoApp2.midas (with mode and nodes configured) Site A App1 Load Balancer Site B demoApp2Ver1_0 {! mode = expansion! siteANode1 {! ip = a.a.a.a! changeSet = 2! }! …! …! siteBNode1 {! ip = p.p.p.p! changeSet = 2! }! } Midas Site A App2 Load Balancer Site B Online 2 Offline
  • 39. Site A App1 Load Balancer 9. Start the LB so that App2 is live App2 Load Balancer 6. Add App2 to midas.config apps {! demoApp1! demoApp2! }! ! Site B 7. Midas is ready to receive connections from App2 Midas Site A Site B 8. Start any Site that can go-live, say Site A here 2 Online Offline
  • 40. Zero-Downtime Deployment Configuration - 2 Not Supported in this Release
  • 41. Deployment config - 2 Node A App v1 Load Balancer Node B App v1 Node C App v1 0 Online Offline
  • 42. Zero-Downtime Deployment Configuration - 3 AWS Not Supported in this Release
  • 43. Deployment config - 3 Node A App v1 Load Balancer Node B App v1 Node C App v1 0 Online Offline
  • 44. The Team Brian Blignaut bblignaut@equalexperts.com Dhaval Dalal [@softwareartisan] ddalal@equalexperts.com Vivek Dhapola vdhapola@equalexperts.com Komal Jain kjain@equalexperts.com