Microservices: a journey of an eternal improvement

60
MICROSERVICES: A JOURNEY OF AN ETERNAL IMPROVEMENT Levi9 Meetup 04.2016 Anton Udovychenko

Transcript of Microservices: a journey of an eternal improvement

Page 1: Microservices: a journey of an eternal improvement

MICROSERVICES:A JOURNEY OF AN ETERNAL IMPROVEMENT

Levi9 Meetup 04.2016

Anton Udovychenko

Page 2: Microservices: a journey of an eternal improvement

ABOUT ME

Software Architect @ Levi9

8+ years of Java experience

Passionate about agile methodology and clean code

http://ua.linkedin.com/in/antonudovychenko

http://www.slideshare.net/antonudovychenko

Page 3: Microservices: a journey of an eternal improvement

Amsterdam

Levi9 HQAmsterdam – 2005

25 people

Novi Sad

SerbiaNovi Sad – 2005

320+ people

Zrenjanin

SerbiaZrenjanin– 2014

30+ people

Iasi

RomaniaIasi – 200780+ people

Kiev

UkraineKiev – 2008130+ people

http://www.levi9.com/

Page 4: Microservices: a journey of an eternal improvement

AGENDA

• Monolith development

• Reflections about Scale cube

• Microservices to the rescue

• Spotify Scrum

• Employ Continuous delivery

• Q&A

Page 5: Microservices: a journey of an eternal improvement
Page 6: Microservices: a journey of an eternal improvement

MONOLITH DEVELOPMENT

• Widely known and described

• Simple development

• Straightforward testing

• Easy deployment

Benefits:

Page 7: Microservices: a journey of an eternal improvement

MONOLITH DEVELOPMENT

• Grows to be tightly coupled

• Difficult to make changes

• Obstacle for scaling

• Complex to analyze

• Frightens developers

• Hard to change technology stack

Disadvantages:

Page 8: Microservices: a journey of an eternal improvement

MONOLITH DEVELOPMENT

• Grows to be tightly coupled

• Difficult to make changes

•Obstacle for scaling

• Complex to analyze

• Frightens developers

• Hard to change technology stack

Disadvantages:

Page 9: Microservices: a journey of an eternal improvement

REFLECTIONS ABOUT SCALE CUBE

X axis – horizontal duplication

Scale by cloning

Page 10: Microservices: a journey of an eternal improvement

REFLECTIONS ABOUT SCALE CUBE

X axis – horizontal duplication

Scale by cloning

Page 11: Microservices: a journey of an eternal improvement

REFLECTIONS ABOUT SCALE CUBE

Y axis – functional

decomposition

Scale by splitting

different things

X axis – horizontal duplication

Scale by cloning

Page 12: Microservices: a journey of an eternal improvement

REFLECTIONS ABOUT SCALE CUBE

Y axis – functional

decomposition

Scale by splitting

different things

X axis – horizontal duplication

Scale by cloning

Near infinite scale

Starting point

Page 13: Microservices: a journey of an eternal improvement
Page 14: Microservices: a journey of an eternal improvement

MICROSERVICES TO THE RESCUE

Page 15: Microservices: a journey of an eternal improvement

MICROSERVICES TO THE RESCUE

Page 16: Microservices: a journey of an eternal improvement

MICROSERVICES TO THE RESCUE

Small autonomous services

that work together,

modelled around a business domain

Page 17: Microservices: a journey of an eternal improvement

MICROSERVICES TO THE RESCUE

Page 18: Microservices: a journey of an eternal improvement

MICROSERVICES TO THE RESCUE

• Scalability

• Independent deployments

• Polyglot services

• Easier to understand a service

• Decoupling

• Fast development

Benefits:

Page 19: Microservices: a journey of an eternal improvement

MICROSERVICES TO THE RESCUE

• Distribution performance

• Eventual consistency

• Network security

• Orchestration complexity

• Monitoring and testing

• Code duplication

Disadvantages:

Page 20: Microservices: a journey of an eternal improvement
Page 21: Microservices: a journey of an eternal improvement

CONWAY’S LAW

Organizations which design systems ... are constrained

to produce designs which are copies of the

communication structures of these organizations

Melvin Conway

Page 22: Microservices: a journey of an eternal improvement

SPOTIFY SCRUM

PO

Squad

Page 23: Microservices: a journey of an eternal improvement

SPOTIFY SCRUM

PO

Squad

PO

Squad

PO

Squad

PO

Squad

Page 24: Microservices: a journey of an eternal improvement

SPOTIFY SCRUMTribe

PO

Squad

PO

Squad

PO

Squad

PO

Squad

Lead

Page 25: Microservices: a journey of an eternal improvement

SPOTIFY SCRUMTribe

PO

Squad

PO

Squad

PO

Squad

PO

Squad

Lead

Tribe

PO

Squad

PO

Squad

PO

Squad

PO

Squad

Lead

Page 26: Microservices: a journey of an eternal improvement

Chapter

SPOTIFY SCRUMTribe

PO

Squad

PO

Squad

PO

Squad

PO

Squad

Lead

Tribe

PO

Squad

PO

Squad

PO

Squad

PO

Squad

Lead

Chapter

Page 27: Microservices: a journey of an eternal improvement

Chapter

SPOTIFY SCRUMTribe

PO

Squad

PO

Squad

PO

Squad

PO

Squad

Lead

Tribe

PO

Squad

PO

Squad

PO

Squad

PO

Squad

Lead

Chapter

Guild

Page 28: Microservices: a journey of an eternal improvement

CONTINUOUS INTEGRATION

Build

Deploy

Test

Page 29: Microservices: a journey of an eternal improvement

CONTINUOUS DELIVERY

Build

Deploy

TestManual

Acceptance

Release

Page 30: Microservices: a journey of an eternal improvement

CONTINUOUS DEPLOYMENT

Build

Deploy

Test

Release

Page 31: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

Version control

Page 32: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

Version control Continuous delivery

pipeline

Page 33: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

Version control Continuous delivery

pipeline

Services

v6

v37

v12

v5

Page 34: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

Version control Continuous delivery

pipeline

Services

v37

v12

v5

Code

changes

v7

Page 35: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY - PIPELINE

BUILD TEST RELEASEFeatures:

• Pipeline as code

Page 36: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY - PIPELINE

BUILD TEST RELEASEFeatures:

• Pipeline as code

• Auto build versioning

• Manual contracts versioning• Compile

• Version

• Unit test

• Static code

analysis

• Static security

code analysis

Page 37: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY - PIPELINE

BUILD TEST RELEASEFeatures:

• Pipeline as code

• Auto build versioning

• Manual contracts versioning• Compile

• Version

• Unit test

• Static code

analysis

• Static security

code analysis

• e2e

• Performance

• Integration

• Penetration

• Contracts

Page 38: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY - PIPELINE

BUILD TEST RELEASEFeatures:

• Pipeline as code

• Auto build versioning

• Manual contracts versioning• Compile

• Version

• Unit test

• Static code

analysis

• Static security

code analysis

• e2e

• Performance

• Integration

• Penetration

• Contracts

Page 39: Microservices: a journey of an eternal improvement
Page 40: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY - PIPELINE

BUILD TEST RELEASEFeatures:

• Pipeline as code

• Auto build versioning

• Manual contracts versioning

• Immutable infrastructure

• Compile

• Version

• Unit test

• Static code

analysis

• Static security

code analysis

• e2e

• Performance

• Integration

• Penetration

• Contracts

Create

envRun tests

Dispose

env

Page 41: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY - PIPELINE

BUILD TEST RELEASEFeatures:

• Pipeline as code

• Auto build versioning

• Manual contracts versioning

• Immutable infrastructure

• Compile

• Version

• Unit test

• Static code

analysis

• Static security

code analysis

• e2e

• Performance

• Integration

• Penetration

• Contracts

• Make available

downstream

• Trigger

integration build

Create

envRun tests

Dispose

env

Page 42: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

B T Rgit

B T Rgit

B T Rgit

B T Rgit

B T R+

53

6

36

11

5

Release

6

36

11

5

53

Page 43: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

B T Rgit

B T Rgit

B T Rgit

B T Rgit

B T R+

53

6

36

11

5

Release

6

36

11

5

53

37 37

Page 44: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

B T Rgit

B T Rgit

B T Rgit

B T Rgit

B T R+

53

6

36

11

5

Release

6

36

11

5

53

38 38

Page 45: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

B T Rgit

B T Rgit

B T Rgit

B T Rgit

B T R+

53

6

36

11

5

Release

6

36

11

5

53

38

12 12

Page 46: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

B T Rgit

B T Rgit

B T Rgit

B T Rgit

B T R+

53 54

6 6

36 36

11 12

5 5

Release

6

36

12

5

54

38

12

Page 47: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

B T Rgit

B T Rgit

B T Rgit

B T Rgit

B T R+

53 54

6 6

36 36

11 12

5 5

Release

6

36

12

5

54

3939

Page 48: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

B T Rgit

B T Rgit

B T Rgit

B T Rgit

B T R+

53 54 55

6 6 6

36 36 39

11 12 12

5 5 5

Release

6

39

12

5

55

39

Page 49: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

B T Rgit

B T Rgit

B T Rgit

B T Rgit

B T R+

Release

6

39

12

5

55

39

5555

5656

5757

585858

Page 50: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

git

git

git

git

+

Future proof:

• Any configuration of squads

• Growing number of components

Page 51: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

git

git

git

git

+

Future proof:

• Any configuration of squads

• Growing number of components

Page 52: Microservices: a journey of an eternal improvement

EMPLOY CONTINUOUS DELIVERY

git

git

git

git

+

Future proof:

• Any configuration of squads

• Growing number of components

git

Page 53: Microservices: a journey of an eternal improvement

TRY MICROSERVICES

http://jhipster.github.io

Page 54: Microservices: a journey of an eternal improvement
Page 55: Microservices: a journey of an eternal improvement

TRY CONTINUOUS DELIVERY

https://www.go.cd/

Page 56: Microservices: a journey of an eternal improvement
Page 57: Microservices: a journey of an eternal improvement
Page 58: Microservices: a journey of an eternal improvement

DEMO TIME

Page 59: Microservices: a journey of an eternal improvement

REFERENCES

http://martinfowler.com/articles/microservices.html

http://microservices.io/articles/scalecube.html

https://ucvox.files.wordpress.com/2012/11/113617905-scaling-agile-spotify-11.pdf

http://martinfowler.com/articles/microservice-testing

http://blog.arungupta.me/continuous-integration-delivery-deployment-maturity-model/

http://www.slideshare.net/PavelChunyayev/continuous-delivery-for-cxp-at-backbase-presented-at-arch9-amsterdam-30032016-levi9

Page 60: Microservices: a journey of an eternal improvement

THANK YOU!