Expand contract pattern - Continuous Delivery and Databases

833 views 37 slides May 12, 2018
Slide 1
Slide 1 of 37
Slide 1
1
Slide 2
2
Slide 3
3
Slide 4
4
Slide 5
5
Slide 6
6
Slide 7
7
Slide 8
8
Slide 9
9
Slide 10
10
Slide 11
11
Slide 12
12
Slide 13
13
Slide 14
14
Slide 15
15
Slide 16
16
Slide 17
17
Slide 18
18
Slide 19
19
Slide 20
20
Slide 21
21
Slide 22
22
Slide 23
23
Slide 24
24
Slide 25
25
Slide 26
26
Slide 27
27
Slide 28
28
Slide 29
29
Slide 30
30
Slide 31
31
Slide 32
32
Slide 33
33
Slide 34
34
Slide 35
35
Slide 36
36
Slide 37
37

About This Presentation

Modifying the schema of a production database is *hard*. If something goes wrong, the impact on both customers and the team can be enormous. And it can be hard or even impossible to rollback a database schema change if things go wrong. And the same is true for any architectural change for a producti...


Slide Content

Expand Contract
Pattern
Continuous Delivery for Databases
@leenasn

A few years back

https://pixabay.com/en/change-new-beginning-renewal-673006/

https://martinfowler.com/bliki/BranchByAbstraction.html
Branch by Abstraction

Database?

Slow

High risk
https://pixabay.com/en/balance-risk-courage-risky-3062272/

Less risky?

Database Refactoring

https://martinfowler.com/books/refactoring.html
Refactoring is a controlled technique for improving
the design of an existing code base. Its essence is
applying a series of small behavior-preserving
transformations, each of which "too small to be worth
doing".
However the cumulative effect of each of these
transformations is quite significant.

Split Column
customer
booking_date
status

trial_bookings

Migration

New Schema

Refactoring Process

Split table

Migration Time

New Schema

Refactoring Process

https://martinfowler.com/articles/evodb.html
Expand Contract

Expand

Contract

Basics

Versioning

Golden gate bridge safety first
Tests

https://pixabay.com/en/strategy-arrows-building-startup-3224515/

Principles of low risk releases

Incremental

Done

Decouple deploy from release

Small Batches

References
https://medium.com/continuousdelivery/split-table-a-database-refactoring-techni
que-5dec00449e51
https://medium.com/@leenasn/continuous-delivery-for-database-eabd7f280019
https://medium.com/@leenasn/expand-contract-pattern-and-continuous-delivery
-of-databases-4cfa00c23d2e
http://databaserefactoring.com/
http://www.informit.com/articles/article.aspx?p=1833567

Leena S N
@leenasn / [email protected]

https://medium.com/@leenasn