100% found this document useful (1 vote)
574 views58 pages

Micro Service Architecture

This document discusses microservice architecture and some of its key challenges. It begins by asking why organizations want to implement microservices and what microservices are at a high level. It then explores some of the major challenges of microservice architecture, such as increased complexity from more integration points, difficulty testing services independently, and increased operational overhead. The document questions whether microservices may become an anti-pattern in the future or if adopting the right approaches can help avoid potential downsides.

Uploaded by

prathip
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
574 views58 pages

Micro Service Architecture

This document discusses microservice architecture and some of its key challenges. It begins by asking why organizations want to implement microservices and what microservices are at a high level. It then explores some of the major challenges of microservice architecture, such as increased complexity from more integration points, difficulty testing services independently, and increased operational overhead. The document questions whether microservices may become an anti-pattern in the future or if adopting the right approaches can help avoid potential downsides.

Uploaded by

prathip
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 58

Rachel Laycock

@rachellaycock

MICRO-SERVICE
ARCHITECTURE
The Anti-Pattern of the Future?

MICRO-SERVICES
The Anti-Pattern of the Future?
3

slice bread

WTF?

MICRO-SERVICES

W
hy
do
we
want
them?
Or
maybe
not..

W
hat
are
the
key
challenges?

A
re
they
the
anti
pattern
of
the
future?

What are micro-services?


!

but rst

Ball of Mud

expediency over design


- Brian Foot & Joseph Yoder

Ball of Mud

Your
Brain at
Work
13

MICRO-SERVICES

W
hy
do
we
want
them?
Or
maybe
not..

W
hat
are
the
key
challenges?

A
re
they
the
anti
pattern
of
the
future?

What are micro-services?


!

14

MICRO-SERVICES

W
hy
do
we
want
them?
Or
maybe
not..

W
hat
are
the
key
challenges?

A
re
they
the
anti
pattern
of
the
future?

What are micro-services?


!

15

Marek Sotak

@sotak

SIMPLE AND LIGHTWEIGHT


A monolithic application puts all its
functionality into a single process

A microservices architecture puts


each element of functionality into a
separate service

17

INDEPENDENT PROCESSES

18

LANGUAGE AGNOSTIC APIS

be of the
web
19

DECOUPLED

20

MICRO-SERVICES

W
hy
do
we
want
them?
Or
maybe
not..

W
hat
are
the
key
challenges?

A
re
they
the
anti
pattern
of
the
future?

What are micro-services?


!

21

The right tool for the job

22

RESILIENCE
HTTP/1.1 503
200 Service
OK
Unavailable
<?xml version="1.0" ?>
<html>
<body>
<div id="healthchecks">
<ul>
<li class="up">application database</li>
<li class="down">external
class="up">external service</li>
service</li>
</ul>
</div>
</body>
</html>

GET /status/ HTTP/1.1


Host: internal.service.com

/status

23

SCALING
A monolithic application puts all its
functionality into a single process

A microservices architecture puts


each element of functionality into a
separate service

and scales by replicating the


monolith on multiple servers

and scales by distributing these services


across servers, replicating as needed.

24

DEPLOYMENT

compile, unit acceptance


and
test
functional test

integration
test

user acceptance performance


test
test
deploy to
production

run on build
machine

deployed on
build
machine

deployed to
integration
environment

deployed to
UAT
environment

deployed to
performance
environment

25

Conways law

"organisations which design systems ... are


constrained to designs which are copies
of the communication structures of these
organisations"

26

Conways law

Cross-functional teams

... organised around capabilities


Because Conway's Law

27

REPLACEABLE SERVICES

A microservices architecture puts


each element of functionality into a
separate service

28

Preparing for the unknown

29

With great power

Cognitive
complexity

http://beyondplm.com/2012/04/23/plm-and-the-death-of-complexity/

MORE INTEGRATION

32
http://combio.gist.ac.kr/wp-content/uploads/2013/05/Gene-microRNA-Network.png

MONITORING AND TESTING

33

Code duplication

34

More conguration management

35
http://www.clker.com

ESB

Deployment

compile, unit acceptance


and
test
functional test

integration
test

user acceptance performance


test
test
deploy to
production

run on build
machine

deployed on
build
machine

deployed to
integration
environment

deployed to
UAT
environment

deployed to
performance
environment

37

MICRO-SERVICES

W
hy
do
we
want
them?
Or
maybe
not..

W
hat
are
the
key
challenges?

A
re
they
the
anti
pattern
of
the
future?

What are micro-services?


!

38

1. FINDING SEAMS

39
http://continuousdelivery.com/wp-content/uploads/2011/05/branch_by_abstraction.png

BOUNDED CONTEXT

Domain
Driven
Design
40

2. DATA

41

CHANGING DATA

Refactoring
Databases

42

One True Customer

http://devlicio.us/blogs/casey/archive/2009/05/14/commercial-suicide-integration-at-the-database-level.aspx

coz reporting

http://devlicio.us/blogs/casey/archive/2009/05/14/commercial-suicide-integration-at-the-database-level.aspx

3. TESTING

45

CONSUMER DRIVEN CONTRACTS

http://martinfowler.com/articles/consumerDrivenContracts.html
46

MONITORING

47

MICRO-SERVICES

W
hy
do
we
want
them?
Or
maybe
not..

W
hat
are
the
key
challenges?

A
re
they
the
anti
pattern
of
the
future?

What are micro-services?


!

48

THE MONOLITH BACKLASH

monolith - single database

microservices - application databases

49

MATURITY

http://37.media.tumblr.com/tumblr_lp1ys7Qava1qe6m28o1_1280.png
50

1. LAST RESPONSIBLE MOMENT

51

2. ARCHITECT FOR EVOLVABILITY

52

3. POSTELS LAW

"Be conservative in what you send,


be liberal in what you accept

53

4. ARCHITECT FOR TESTABILITY

ESB
54

5. CONWAYS LAW

55

http://stilldrinking.org/programming-sucks

THANK YOU!
Rachel Laycock
@rachellaycock

Resources
Books:
Continuous Delivery - Jez Humble, Dave Farley

Working Effectively with Legacy Code - Michael Feathers

Domain Driven Design - Eric Evans

Your Brain at Work - David Rock

Refactoring Databases - Scott W Ambler & Pramod Sadalage

Building Microservices - Sam Newman

Articles/Blogs:
Ball of Mud: http://www.laputan.org/mud/

Demming - http://leanandkanban.wordpress.com/2011/07/15/demings-14-points/

Coding Horror: http://www.codinghorror.com/blog/2007/11/the-big-ball-of-mud-and-other-architecturaldisasters.html

http://devlicio.us/blogs/casey/archive/2009/05/14/commercial-suicide-integration-at-the-database-level.aspx

Evolutionary Architecture and Emergent Design: http://www.ibm.com/developerworks/java/library/j-eaed1/
index.html

Microservices: http://www.infoq.com/presentations/Micro-Services and http://yobriefca.se/blog/2013/04/29/
micro-service-architecture/ and http://davidmorgantini.blogspot.co.uk/2013/08/micro-services-what-are-microservices.html

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

http://highscalability.com/blog/2014/4/8/microservices-not-a-free-lunch.html

You might also like