tackling a legacy codebase with (micro)services

Download Tackling A Legacy Codebase With (Micro)Services

If you can't read please download the document

Upload: john-chandler

Post on 13-Apr-2017

514 views

Category:

Software


2 download

TRANSCRIPT

Tackling A Legacy CodebaseWith (Micro)services

John Chandler@john_chandler

Nevermind the Monolith,Here's the Microservices

Amazing Scalability!

Revolutionises Development!

Eliminates Poverty!

Resolves EMACS vs VI!

Continuous Deployment

Containers

Bounding Contexts

12 Factor Apps

Unicorns

Continuous Deployment

Containers

Bounding Contexts

12 Factor Apps

Unicorns

Encourages loose coupling

Encourages smaller codebases

Encourages better "devops"

One way to tackle a legacy monolith

Part I: In The Beginning

https://www.flickr.com/photos/shutterbc/420672735/

(Not The Actual Developer)

https://www.flickr.com/photos/40726522@N02/4811009710/

(Not The Actual Pizza)

(Not The Actual Product)

https://commons.wikimedia.org/wiki/File:Taj_Mahal_in_March_2004.jpg

https://www.flickr.com/photos/digitalsadhu/2627835068/

(Actual Product)

Part II: The Rewrite

Web Framework (PHP Zend - don't ask)

REST API(Piston)Message Queueing(RabbitMQ)

ORM (SQLAlchemy)

Database (Postgresql)

Web Framework (PHP Zend)

REST API(Piston)Message Queueing(RabbitMQ)

ORM (SQLAlchemy)

Database (Postgresql)

Is It Done Yet?

(Not Yet)

Web Framework (PHP Zend)

REST API(Piston)Message Queueing(RabbitMQ)

ORM (SQLAlchemy)

Database (Postgresql)

Is It Done Yet?

(No, Not Yet)

Web Framework (PHP Zend)

REST API(Piston)Message Queueing(RabbitMQ)

ORM (SQLAlchemy)

Database (Postgresql)

Okay, that's enough.

(90% done!)

(It's just missing a few things...)

Part III: Salvage Rights

Web Framework (Django + AngularJS)

REST API(Piston, then Django REST Framework)Message Queueing(RabbitMQ)

ORM (SQLAlchemy)

Database (Postgresql)

Web Framework (Django + AngularJS)

REST API(Django REST Framework)

Database (Postgresql)

Web Framework (Django + AngularJS)

REST API(Piston, then Django REST Framework)Message Queueing(RabbitMQ)

ORM (SQLAlchemy)

Database (Postgresql)

https://www.flickr.com/photos/nasahqphoto/7986344024/

Part IV: A New Hope

(Apologies. I couldn't resist)

It's a shame you can't just swap bits out

SearchMediaEmails

UsersPDF GenerationForums

DragonsSpidersWTF

(Gross oversimplification)

Find A Feature

SearchMediaEmails

UsersPDF GenerationForums

DragonsSpidersWTF

https://www.flickr.com/photos/armymedicine/6300225700/

SearchEmails

UsersPDF GenerationForums

DragonsSpidersWTF

Media API

Then Scale Up

Media API

Media API

Load Balancer + Cache

(IT can deliver!)

Repeat Until Done

Not everything will be perfect first time

But it will improve over time

And small services are cheap to discard

Small Steps

Consider Value

Minimise Technology

Monitor Complexity

Go tackle that monolith!