SlideShare a Scribd company logo
Microservices for
Mortals
@BertErtman
• Fellow at Luminis
• Background in all things Java
since 1995
• Java Champion, JavaOne
Rockstar Speaker, and a Duke’s
Choice Award Winner
• Involved in architecting and
implementing dozens of large
scale systems over the past 20
years or so
• Book author for O’Reilly,
speaker at many conferences
About me
Sucker for that quick reward boy,
sucker for that quick reward they said…
Then it comes to be that the soothing
light at the end of your tunnel
is just a freight train coming your way
Metallica
Italian Food Analogy
Before SOA:
SOA:
Microservices:
Spaghetti
Lasagna
???
Pick a side…
Where did it come from?
• People have been doing AJAX, NoSQL, SOA, etc before they
even got a name
• Microservices style architectures are a response to adjust
software architecture to an ever-evolving spectrum. It addresses
Business Agility through technology:
• Usage of cloud-based infrastructure and services
• DevOps
• The need to scale up the number of people/teams
• Client-side revolution both in technologies and devices
Microservices
are about
Business Agility
Microservices are like SOA,
but only the good parts
What happened to SOA?
• Well…blame it on Gartner
• SOA turned into the victim of a vendor infested
lock-in massacre, excessively complicating all
good advice into giant overpriced hairballs sold as
fake middleware, ESBs, and appliances.
Image credit: http://blogs.gartner.com/gary-olliffe/files/2015/01/InnerOuterMSA.png
Which pill do you take?
blue pill world
• Blissful ignorance
• Hey, since everyone and their mother seems to be
tweeting about this microservices thing, it must be cool,
right?
• Heck, even Martin Fowler is blogging about it. Now it’s
definitely mainstream
• Dude, it’s on the freakin’ Technology Radar!
• Btw, this seems to be a killer way to introduce Docker to
my customer, yeah!
Which pill do you take?
red pill world
• Painful truth of reality
• Where do we defy the laws of (IT) physics?
• This thing is about distributed computing which
after all these years is still very hard to do!
• This thing is about asynchronous programming
models, which are hard to grasp
• It has a number of other gotcha’s which I will go into…
There is no spoon
• Forget synchronous programming models
• Forget a single Enterprise Domain Model
• Forget ACID transactions
• Forget Relational Integrity
Welcome to red pill world
Picturecredit:@ParisPic
About Monoliths
• The word ‘monolith’ has a negative
connotation
• Not all non-microservices apps 

are bad applications
• What do you call an application
that everyone wants to interface
with but was not designed to do?
Monolith?
a successful
application?
When monoliths are bad
• But… such systems can end up as monoliths with all the
negative connotations to it as they:
• Start to build up massive technical debt
• Become hard to change without breaking stuff
• QA and test cycles take lots of time (expensive)
• When heavy internal coupling starts to take over control
of the application
• Become married to the underlying technical stack
Monolith to Microservices
approach
• As was recently suggested by Martin Fowler, et al.
the Monolith-First approach is a way of “strangling
off services from a monolithic application”.
• This makes great theory, but is pretty hard to do in
practice
• Often times building blocks on the inside of an
application are not suitable as building blocks
outside of an application
Monolith to Microservices
Struggles
• Initial Investment
• Data Strategy
• Synchronous 

vs Asynchronous
• Conway’s Law
• Re-use Traps
• Dealing with Failure
Initial Investment
• So-called “Outer Architecture”
• Service Discovery
• Logging
• Metrics and Analytics
• DevOps process in-place
• Solid CI/CD practices
• Impact on testing strategy
Data Strategy
Data Strategy
• Don’t have multiple microservices share the same
database model and perform updates on it
• this results in unwanted coupling
• Separate at least read/write access if you must
• Better: separate data stores for each service
Data Strategy
• Q: What if I have common data?
• A: Either perform a call to another service or just
copy the data
• Q: How do I deal with referential integrity?
• A: Move it up in the application layer
Synchronous vs
Asynchronous
• Within the monolith, most communication will be
synchronous
• Your interfaces have been designed with
synchronous, in-process, interactions in mind
• May be chatty (fine-grained)
• Rethinking interaction patterns is essential
• Rethink the communication protocol as well
Service Communication
• Standardize on a common communication protocol
• Oftentimes people choose REST, but there are
others
• protobuf, thrift, zeromq, mqtt, …
• Is REST fast enough to do massive fan-out?
• Maybe have two: synchronous and asynchronous
Avoid re-use traps
• Q: What is the best strategy for reusing common
functionality between microservices?
• A: Copy it in the beginning of the project if you
must. Never look back. Microservices are designed
to be TOTALLY independent of each other,
remember?
Conventions over
abstractions!
Conway’s Law
So here is the obligatory reference to Conway’s Law:
“Organizations which design systems ... are 

constrained to produce designs which are copies of 

the communication structures of these organizations"
—M. Conway 1968
What it actually means
• Make sure the organization is compatible with the
software architecture
• If your (microservices) architecture does not reflect
the way your organization is structured, don’t even
bother going that way!
• It also means that your team should be cross-
functional. Everyone you need to build, maintain
and get it into production must be part of the team
This is hard!
SOA Adoption Model
Failure will
ALWAYS
happen
Design for Failure
• Dependent services may be unavailable or too slow to respond
• Minimize human intervention
• failure happens all the time, so it shouldn’t be a big deal
• fail rather sooner than later (prevent cascading)
• Horizontal clustering to the rescue (multiple services)
• Resilience Patterns to the rescue
• CircuitBreaker, Bulkhead, Caching, Retry, Messaging, etc
• This is complicated stuff. It is not just about throwing Hystrix or some
other library in
Some take-aways
• The essence of Microservices is about structuring
systems differently
• It’s about Modularity
• It’s about Separation of Concerns
• It’s about Single Responsibility Principle
• It addresses Business Agility through technology
• Those are not bad things!
However…
• Everything comes at a price
• Aligning the architecture to the organization is
surprisingly hard
• It is not just a matter of throwing in a couple of
frameworks, you have to think things through
thoroughly before going this direction
In the end…
• Keep on educating yourself as more war stories
see the light of day
• Don’t just listen to one vendor’s version of the story,
all they care about is locking you in
• Have a rational thought process trump the hype,
however difficult that is - think for yourself rather
than following just the latest blogs and
technologies
And one more thing…
• We are not all Netflix or Amazon
• Just like we’re not all Twitter and Facebook with the
Big Data and Web Scale hypes…
• not all of us have billions of calls floating around
at any given day
• if you pretend you are, you will have all their
infrastructural problems to deal with for free and
even at a minor scale they are just as hard
Thanks!
@BertErtman

More Related Content

What's hot

Debugging microservices in production
Debugging microservices in productionDebugging microservices in production
Debugging microservices in production
bcantrill
 
Platform as reflection of values: Joyent, node.js, and beyond
Platform as reflection of values: Joyent, node.js, and beyondPlatform as reflection of values: Joyent, node.js, and beyond
Platform as reflection of values: Joyent, node.js, and beyond
bcantrill
 
Production-ready Software
Production-ready SoftwareProduction-ready Software
Production-ready Software
Uwe Friedrichsen
 
Open is as Open does
Open is as Open doesOpen is as Open does
Open is as Open does
Andrew Shafer
 
Debugging under fire: Keeping your head when systems have lost their mind
Debugging under fire: Keeping your head when systems have lost their mindDebugging under fire: Keeping your head when systems have lost their mind
Debugging under fire: Keeping your head when systems have lost their mind
bcantrill
 
Software Architectures, Week 1 - Monolithic Architectures
Software Architectures, Week 1 - Monolithic ArchitecturesSoftware Architectures, Week 1 - Monolithic Architectures
Software Architectures, Week 1 - Monolithic ArchitecturesAngelos Kapsimanis
 
Expanding our Understanding: Complex Adaptive Systems
Expanding our Understanding: Complex Adaptive SystemsExpanding our Understanding: Complex Adaptive Systems
Expanding our Understanding: Complex Adaptive Systems
Jon Stevens-Hall
 
Microservices Standardization - Susan Fowler, Stripe
Microservices Standardization - Susan Fowler, StripeMicroservices Standardization - Susan Fowler, Stripe
Microservices Standardization - Susan Fowler, Stripe
Ambassador Labs
 
Why we got to Docker
Why we got to DockerWhy we got to Docker
Why we got to Docker
allingeek
 
The Container Revolution: Reflections after the first decade
The Container Revolution: Reflections after the first decadeThe Container Revolution: Reflections after the first decade
The Container Revolution: Reflections after the first decade
bcantrill
 
Graphel: A Purely Functional Approach to Digital Interaction
Graphel: A Purely Functional Approach to Digital InteractionGraphel: A Purely Functional Approach to Digital Interaction
Graphel: A Purely Functional Approach to Digital Interactionmtrimpe
 
Closing the Cloud Skills Gap
Closing the Cloud Skills GapClosing the Cloud Skills Gap
Closing the Cloud Skills Gap
Scott Lowe
 
Modern times - architectures for a Next Generation of IT
Modern times - architectures for a Next Generation of ITModern times - architectures for a Next Generation of IT
Modern times - architectures for a Next Generation of IT
Uwe Friedrichsen
 
The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel RemaniThe economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remani
jaxconf
 
The Platform Era - 7 steps to an API
The Platform Era - 7 steps to an APIThe Platform Era - 7 steps to an API
The Platform Era - 7 steps to an API
bootis
 
Jax Devops 2017 Succeeding in the Cloud – the guidebook of Fail
Jax Devops 2017  Succeeding in the Cloud – the guidebook of FailJax Devops 2017  Succeeding in the Cloud – the guidebook of Fail
Jax Devops 2017 Succeeding in the Cloud – the guidebook of Fail
Steve Poole
 
Open Source and Content Management (+audio)
Open Source and Content Management (+audio)Open Source and Content Management (+audio)
Open Source and Content Management (+audio)
Matt Hamilton
 
Debugging (Docker) containers in production
Debugging (Docker) containers in productionDebugging (Docker) containers in production
Debugging (Docker) containers in production
bcantrill
 
Zebras all the way down: The engineering challenges of the data path
Zebras all the way down: The engineering challenges of the data pathZebras all the way down: The engineering challenges of the data path
Zebras all the way down: The engineering challenges of the data path
bcantrill
 
devops, microservices, and platforms, oh my!
devops, microservices, and platforms, oh my!devops, microservices, and platforms, oh my!
devops, microservices, and platforms, oh my!
Andrew Shafer
 

What's hot (20)

Debugging microservices in production
Debugging microservices in productionDebugging microservices in production
Debugging microservices in production
 
Platform as reflection of values: Joyent, node.js, and beyond
Platform as reflection of values: Joyent, node.js, and beyondPlatform as reflection of values: Joyent, node.js, and beyond
Platform as reflection of values: Joyent, node.js, and beyond
 
Production-ready Software
Production-ready SoftwareProduction-ready Software
Production-ready Software
 
Open is as Open does
Open is as Open doesOpen is as Open does
Open is as Open does
 
Debugging under fire: Keeping your head when systems have lost their mind
Debugging under fire: Keeping your head when systems have lost their mindDebugging under fire: Keeping your head when systems have lost their mind
Debugging under fire: Keeping your head when systems have lost their mind
 
Software Architectures, Week 1 - Monolithic Architectures
Software Architectures, Week 1 - Monolithic ArchitecturesSoftware Architectures, Week 1 - Monolithic Architectures
Software Architectures, Week 1 - Monolithic Architectures
 
Expanding our Understanding: Complex Adaptive Systems
Expanding our Understanding: Complex Adaptive SystemsExpanding our Understanding: Complex Adaptive Systems
Expanding our Understanding: Complex Adaptive Systems
 
Microservices Standardization - Susan Fowler, Stripe
Microservices Standardization - Susan Fowler, StripeMicroservices Standardization - Susan Fowler, Stripe
Microservices Standardization - Susan Fowler, Stripe
 
Why we got to Docker
Why we got to DockerWhy we got to Docker
Why we got to Docker
 
The Container Revolution: Reflections after the first decade
The Container Revolution: Reflections after the first decadeThe Container Revolution: Reflections after the first decade
The Container Revolution: Reflections after the first decade
 
Graphel: A Purely Functional Approach to Digital Interaction
Graphel: A Purely Functional Approach to Digital InteractionGraphel: A Purely Functional Approach to Digital Interaction
Graphel: A Purely Functional Approach to Digital Interaction
 
Closing the Cloud Skills Gap
Closing the Cloud Skills GapClosing the Cloud Skills Gap
Closing the Cloud Skills Gap
 
Modern times - architectures for a Next Generation of IT
Modern times - architectures for a Next Generation of ITModern times - architectures for a Next Generation of IT
Modern times - architectures for a Next Generation of IT
 
The economies of scaling software - Abdel Remani
The economies of scaling software - Abdel RemaniThe economies of scaling software - Abdel Remani
The economies of scaling software - Abdel Remani
 
The Platform Era - 7 steps to an API
The Platform Era - 7 steps to an APIThe Platform Era - 7 steps to an API
The Platform Era - 7 steps to an API
 
Jax Devops 2017 Succeeding in the Cloud – the guidebook of Fail
Jax Devops 2017  Succeeding in the Cloud – the guidebook of FailJax Devops 2017  Succeeding in the Cloud – the guidebook of Fail
Jax Devops 2017 Succeeding in the Cloud – the guidebook of Fail
 
Open Source and Content Management (+audio)
Open Source and Content Management (+audio)Open Source and Content Management (+audio)
Open Source and Content Management (+audio)
 
Debugging (Docker) containers in production
Debugging (Docker) containers in productionDebugging (Docker) containers in production
Debugging (Docker) containers in production
 
Zebras all the way down: The engineering challenges of the data path
Zebras all the way down: The engineering challenges of the data pathZebras all the way down: The engineering challenges of the data path
Zebras all the way down: The engineering challenges of the data path
 
devops, microservices, and platforms, oh my!
devops, microservices, and platforms, oh my!devops, microservices, and platforms, oh my!
devops, microservices, and platforms, oh my!
 

Viewers also liked

The Lazy Developer's Guide to Cloud Foundry - Holly Cummins
The Lazy Developer's Guide to Cloud Foundry - Holly CumminsThe Lazy Developer's Guide to Cloud Foundry - Holly Cummins
The Lazy Developer's Guide to Cloud Foundry - Holly Cummins
JAXLondon2014
 
LECTIO DIVINA EVANGELIO DOMINICAL ! JESUS NOS PREGUNTA COMO A PEDRO, SI LO AM...
LECTIO DIVINA EVANGELIO DOMINICAL ! JESUS NOS PREGUNTA COMO A PEDRO, SI LO AM...LECTIO DIVINA EVANGELIO DOMINICAL ! JESUS NOS PREGUNTA COMO A PEDRO, SI LO AM...
LECTIO DIVINA EVANGELIO DOMINICAL ! JESUS NOS PREGUNTA COMO A PEDRO, SI LO AM...
Gladysmorayma Creamer Berrios
 
Getting Developers hooked on your API by Nicolas Garnier at Codemotion Dubai
Getting Developers hooked on your API by Nicolas Garnier at Codemotion DubaiGetting Developers hooked on your API by Nicolas Garnier at Codemotion Dubai
Getting Developers hooked on your API by Nicolas Garnier at Codemotion Dubai
Codemotion Dubai
 
Modelling complex game economy with Neo4j by Yan Cui at Codemotion Dubai
Modelling complex game economy with Neo4j by Yan Cui at Codemotion DubaiModelling complex game economy with Neo4j by Yan Cui at Codemotion Dubai
Modelling complex game economy with Neo4j by Yan Cui at Codemotion Dubai
Codemotion Dubai
 
Recording conversations without consent
Recording conversations without consentRecording conversations without consent
Recording conversations without consentAlexandria Bishop
 
Dockerize it: stop living in the past and embrace the future by Alex Nadalin
 Dockerize it: stop living in the past and embrace the future by Alex Nadalin Dockerize it: stop living in the past and embrace the future by Alex Nadalin
Dockerize it: stop living in the past and embrace the future by Alex Nadalin
Codemotion Dubai
 
F# in social gaming by Yan Cui at Codemotion Dubai
F# in social gaming by Yan Cui at Codemotion DubaiF# in social gaming by Yan Cui at Codemotion Dubai
F# in social gaming by Yan Cui at Codemotion Dubai
Codemotion Dubai
 
Javascript leverage: Isomorphic Applications by Luciano Colosio at Codemotion...
Javascript leverage: Isomorphic Applications by Luciano Colosio at Codemotion...Javascript leverage: Isomorphic Applications by Luciano Colosio at Codemotion...
Javascript leverage: Isomorphic Applications by Luciano Colosio at Codemotion...
Codemotion Dubai
 
Demystifying the 3D Web by Pietro Grandi @ Codemotion Dubai 2016
Demystifying the 3D Web by Pietro Grandi @ Codemotion Dubai 2016Demystifying the 3D Web by Pietro Grandi @ Codemotion Dubai 2016
Demystifying the 3D Web by Pietro Grandi @ Codemotion Dubai 2016
Codemotion Dubai
 
Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java Developers
Imesh Gunaratne
 
SMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion Dubai
SMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion DubaiSMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion Dubai
SMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion Dubai
Codemotion Dubai
 
Docker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersDocker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developers
Arun Gupta
 
This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?
This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?
This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?
Mark Heckler
 

Viewers also liked (13)

The Lazy Developer's Guide to Cloud Foundry - Holly Cummins
The Lazy Developer's Guide to Cloud Foundry - Holly CumminsThe Lazy Developer's Guide to Cloud Foundry - Holly Cummins
The Lazy Developer's Guide to Cloud Foundry - Holly Cummins
 
LECTIO DIVINA EVANGELIO DOMINICAL ! JESUS NOS PREGUNTA COMO A PEDRO, SI LO AM...
LECTIO DIVINA EVANGELIO DOMINICAL ! JESUS NOS PREGUNTA COMO A PEDRO, SI LO AM...LECTIO DIVINA EVANGELIO DOMINICAL ! JESUS NOS PREGUNTA COMO A PEDRO, SI LO AM...
LECTIO DIVINA EVANGELIO DOMINICAL ! JESUS NOS PREGUNTA COMO A PEDRO, SI LO AM...
 
Getting Developers hooked on your API by Nicolas Garnier at Codemotion Dubai
Getting Developers hooked on your API by Nicolas Garnier at Codemotion DubaiGetting Developers hooked on your API by Nicolas Garnier at Codemotion Dubai
Getting Developers hooked on your API by Nicolas Garnier at Codemotion Dubai
 
Modelling complex game economy with Neo4j by Yan Cui at Codemotion Dubai
Modelling complex game economy with Neo4j by Yan Cui at Codemotion DubaiModelling complex game economy with Neo4j by Yan Cui at Codemotion Dubai
Modelling complex game economy with Neo4j by Yan Cui at Codemotion Dubai
 
Recording conversations without consent
Recording conversations without consentRecording conversations without consent
Recording conversations without consent
 
Dockerize it: stop living in the past and embrace the future by Alex Nadalin
 Dockerize it: stop living in the past and embrace the future by Alex Nadalin Dockerize it: stop living in the past and embrace the future by Alex Nadalin
Dockerize it: stop living in the past and embrace the future by Alex Nadalin
 
F# in social gaming by Yan Cui at Codemotion Dubai
F# in social gaming by Yan Cui at Codemotion DubaiF# in social gaming by Yan Cui at Codemotion Dubai
F# in social gaming by Yan Cui at Codemotion Dubai
 
Javascript leverage: Isomorphic Applications by Luciano Colosio at Codemotion...
Javascript leverage: Isomorphic Applications by Luciano Colosio at Codemotion...Javascript leverage: Isomorphic Applications by Luciano Colosio at Codemotion...
Javascript leverage: Isomorphic Applications by Luciano Colosio at Codemotion...
 
Demystifying the 3D Web by Pietro Grandi @ Codemotion Dubai 2016
Demystifying the 3D Web by Pietro Grandi @ Codemotion Dubai 2016Demystifying the 3D Web by Pietro Grandi @ Codemotion Dubai 2016
Demystifying the 3D Web by Pietro Grandi @ Codemotion Dubai 2016
 
Docker for Java Developers
Docker for Java DevelopersDocker for Java Developers
Docker for Java Developers
 
SMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion Dubai
SMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion DubaiSMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion Dubai
SMACK Stack - Fast Data Done Right by Stefan Siprell at Codemotion Dubai
 
Docker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developersDocker, Kubernetes, and Mesos recipes for Java developers
Docker, Kubernetes, and Mesos recipes for Java developers
 
This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?
This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?
This stuff is cool, but...HOW CAN I GET MY COMPANY TO DO IT?
 

Similar to Microservices for Mortals by Bert Ertman at Codemotion Dubai

Microservices for Mortals
Microservices for MortalsMicroservices for Mortals
Microservices for Mortals
Bert Ertman
 
QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes
Abdul Basit Munda
 
Microservices Gone Wrong!
Microservices Gone Wrong!Microservices Gone Wrong!
Microservices Gone Wrong!
Bert Ertman
 
Pragmatic Microservices
Pragmatic MicroservicesPragmatic Microservices
Pragmatic Microservices
Randy Shoup
 
Microservices vs monolithics betabeers
Microservices vs monolithics   betabeersMicroservices vs monolithics   betabeers
Microservices vs monolithics betabeers
Jesús Mª Villar Vazquez
 
The "Why", "What" and "How" of Microservices
The "Why", "What" and "How" of Microservices The "Why", "What" and "How" of Microservices
The "Why", "What" and "How" of Microservices
INPAY
 
Microservice intro
Microservice introMicroservice intro
Microservice intro
ramesh_sharma
 
Microservices - an integration perspective
Microservices - an integration perspectiveMicroservices - an integration perspective
Microservices - an integration perspective
RubiX BV
 
Understanding Microservices
Understanding Microservices Understanding Microservices
Understanding Microservices
M A Hossain Tonu
 
What are microservices
What are microservicesWhat are microservices
What are microservices
Krunalkumar Rajdip
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
Srinivasan Nanduri
 
Keynote - From Monolith to Microservices - Lessons Learned in the Real World
Keynote - From Monolith to Microservices - Lessons Learned in the Real WorldKeynote - From Monolith to Microservices - Lessons Learned in the Real World
Keynote - From Monolith to Microservices - Lessons Learned in the Real World
Eran Stiller
 
Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best Practices
Pavel Mička
 
.NET Fest 2019. Eran Stiller. 6 Lessons I Learned on My Journey from Monolith...
.NET Fest 2019. Eran Stiller. 6 Lessons I Learned on My Journey from Monolith....NET Fest 2019. Eran Stiller. 6 Lessons I Learned on My Journey from Monolith...
.NET Fest 2019. Eran Stiller. 6 Lessons I Learned on My Journey from Monolith...
NETFest
 
Advanced Microservices - Greach 2015
Advanced Microservices - Greach 2015Advanced Microservices - Greach 2015
Advanced Microservices - Greach 2015Steve Pember
 
Concurrency at Scale: Evolution to Micro-Services
Concurrency at Scale:  Evolution to Micro-ServicesConcurrency at Scale:  Evolution to Micro-Services
Concurrency at Scale: Evolution to Micro-Services
Randy Shoup
 
From no services to Microservices
From no services to MicroservicesFrom no services to Microservices
From no services to Microservices
João Cavalheiro
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices
Bozhidar Bozhanov
 
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
J On The Beach
 
Cloud Foundry Summit 2015: Devops, microservices and platforms, oh my!
Cloud Foundry Summit 2015: Devops, microservices and platforms, oh my!Cloud Foundry Summit 2015: Devops, microservices and platforms, oh my!
Cloud Foundry Summit 2015: Devops, microservices and platforms, oh my!
VMware Tanzu
 

Similar to Microservices for Mortals by Bert Ertman at Codemotion Dubai (20)

Microservices for Mortals
Microservices for MortalsMicroservices for Mortals
Microservices for Mortals
 
QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes QCon 2015 - Microservices Track Notes
QCon 2015 - Microservices Track Notes
 
Microservices Gone Wrong!
Microservices Gone Wrong!Microservices Gone Wrong!
Microservices Gone Wrong!
 
Pragmatic Microservices
Pragmatic MicroservicesPragmatic Microservices
Pragmatic Microservices
 
Microservices vs monolithics betabeers
Microservices vs monolithics   betabeersMicroservices vs monolithics   betabeers
Microservices vs monolithics betabeers
 
The "Why", "What" and "How" of Microservices
The "Why", "What" and "How" of Microservices The "Why", "What" and "How" of Microservices
The "Why", "What" and "How" of Microservices
 
Microservice intro
Microservice introMicroservice intro
Microservice intro
 
Microservices - an integration perspective
Microservices - an integration perspectiveMicroservices - an integration perspective
Microservices - an integration perspective
 
Understanding Microservices
Understanding Microservices Understanding Microservices
Understanding Microservices
 
What are microservices
What are microservicesWhat are microservices
What are microservices
 
Microservices Architecture
Microservices ArchitectureMicroservices Architecture
Microservices Architecture
 
Keynote - From Monolith to Microservices - Lessons Learned in the Real World
Keynote - From Monolith to Microservices - Lessons Learned in the Real WorldKeynote - From Monolith to Microservices - Lessons Learned in the Real World
Keynote - From Monolith to Microservices - Lessons Learned in the Real World
 
Microservices: The Best Practices
Microservices: The Best PracticesMicroservices: The Best Practices
Microservices: The Best Practices
 
.NET Fest 2019. Eran Stiller. 6 Lessons I Learned on My Journey from Monolith...
.NET Fest 2019. Eran Stiller. 6 Lessons I Learned on My Journey from Monolith....NET Fest 2019. Eran Stiller. 6 Lessons I Learned on My Journey from Monolith...
.NET Fest 2019. Eran Stiller. 6 Lessons I Learned on My Journey from Monolith...
 
Advanced Microservices - Greach 2015
Advanced Microservices - Greach 2015Advanced Microservices - Greach 2015
Advanced Microservices - Greach 2015
 
Concurrency at Scale: Evolution to Micro-Services
Concurrency at Scale:  Evolution to Micro-ServicesConcurrency at Scale:  Evolution to Micro-Services
Concurrency at Scale: Evolution to Micro-Services
 
From no services to Microservices
From no services to MicroservicesFrom no services to Microservices
From no services to Microservices
 
Monoliths and Microservices
Monoliths and Microservices Monoliths and Microservices
Monoliths and Microservices
 
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
The Six Pitfalls of building a Microservices Architecture (and how to avoid t...
 
Cloud Foundry Summit 2015: Devops, microservices and platforms, oh my!
Cloud Foundry Summit 2015: Devops, microservices and platforms, oh my!Cloud Foundry Summit 2015: Devops, microservices and platforms, oh my!
Cloud Foundry Summit 2015: Devops, microservices and platforms, oh my!
 

Recently uploaded

Can AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI preludeCan AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI prelude
Alan Dix
 
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
7sd8fier
 
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
9a93xvy
 
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
asuzyq
 
PDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in NoidaPDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in Noida
PoojaSaini954651
 
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
gpffo76j
 
Mohannad Abdullah portfolio _ V2 _22-24
Mohannad Abdullah  portfolio _ V2 _22-24Mohannad Abdullah  portfolio _ V2 _22-24
Mohannad Abdullah portfolio _ V2 _22-24
M. A. Architect
 
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
pmgdscunsri
 
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Mansi Shah
 
Borys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior designBorys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior design
boryssutkowski
 
Connect Conference 2022: Passive House - Economic and Environmental Solution...
Connect Conference 2022: Passive House -  Economic and Environmental Solution...Connect Conference 2022: Passive House -  Economic and Environmental Solution...
Connect Conference 2022: Passive House - Economic and Environmental Solution...
TE Studio
 
Technoblade The Legacy of a Minecraft Legend.
Technoblade The Legacy of a Minecraft Legend.Technoblade The Legacy of a Minecraft Legend.
Technoblade The Legacy of a Minecraft Legend.
Techno Merch
 
一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理
peuce
 
White wonder, Work developed by Eva Tschopp
White wonder, Work developed by Eva TschoppWhite wonder, Work developed by Eva Tschopp
White wonder, Work developed by Eva Tschopp
Mansi Shah
 
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
Chiara Aliotta
 
UNIT IV-VISUAL STYLE AND MOBILE INTERFACES.pptx
UNIT IV-VISUAL STYLE AND MOBILE INTERFACES.pptxUNIT IV-VISUAL STYLE AND MOBILE INTERFACES.pptx
UNIT IV-VISUAL STYLE AND MOBILE INTERFACES.pptx
GOWSIKRAJA PALANISAMY
 
Transforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting ProfitabilityTransforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting Profitability
aaryangarg12
 
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
ameli25062005
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
cy0krjxt
 
Book Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for DesignersBook Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for Designers
Confidence Ago
 

Recently uploaded (20)

Can AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI preludeCan AI do good? at 'offtheCanvas' India HCI prelude
Can AI do good? at 'offtheCanvas' India HCI prelude
 
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
一比一原版(UNUK毕业证书)诺丁汉大学毕业证如何办理
 
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
一比一原版(RHUL毕业证书)伦敦大学皇家霍洛威学院毕业证如何办理
 
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
一比一原版(Columbia毕业证)哥伦比亚大学毕业证如何办理
 
PDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in NoidaPDF SubmissionDigital Marketing Institute in Noida
PDF SubmissionDigital Marketing Institute in Noida
 
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
原版定做(penn毕业证书)美国宾夕法尼亚大学毕业证文凭学历证书原版一模一样
 
Mohannad Abdullah portfolio _ V2 _22-24
Mohannad Abdullah  portfolio _ V2 _22-24Mohannad Abdullah  portfolio _ V2 _22-24
Mohannad Abdullah portfolio _ V2 _22-24
 
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
Maximize Your Content with Beautiful Assets : Content & Asset for Landing Page
 
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
Between Filth and Fortune- Urban Cattle Foraging Realities by Devi S Nair, An...
 
Borys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior designBorys Sutkowski portfolio interior design
Borys Sutkowski portfolio interior design
 
Connect Conference 2022: Passive House - Economic and Environmental Solution...
Connect Conference 2022: Passive House -  Economic and Environmental Solution...Connect Conference 2022: Passive House -  Economic and Environmental Solution...
Connect Conference 2022: Passive House - Economic and Environmental Solution...
 
Technoblade The Legacy of a Minecraft Legend.
Technoblade The Legacy of a Minecraft Legend.Technoblade The Legacy of a Minecraft Legend.
Technoblade The Legacy of a Minecraft Legend.
 
一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理一比一原版(BU毕业证)波士顿大学毕业证如何办理
一比一原版(BU毕业证)波士顿大学毕业证如何办理
 
White wonder, Work developed by Eva Tschopp
White wonder, Work developed by Eva TschoppWhite wonder, Work developed by Eva Tschopp
White wonder, Work developed by Eva Tschopp
 
Storytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design ProcessStorytelling For The Web: Integrate Storytelling in your Design Process
Storytelling For The Web: Integrate Storytelling in your Design Process
 
UNIT IV-VISUAL STYLE AND MOBILE INTERFACES.pptx
UNIT IV-VISUAL STYLE AND MOBILE INTERFACES.pptxUNIT IV-VISUAL STYLE AND MOBILE INTERFACES.pptx
UNIT IV-VISUAL STYLE AND MOBILE INTERFACES.pptx
 
Transforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting ProfitabilityTransforming Brand Perception and Boosting Profitability
Transforming Brand Perception and Boosting Profitability
 
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
Коричневый и Кремовый Деликатный Органический Копирайтер Фрилансер Марке...
 
Design Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinkingDesign Thinking Design thinking Design thinking
Design Thinking Design thinking Design thinking
 
Book Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for DesignersBook Formatting: Quality Control Checks for Designers
Book Formatting: Quality Control Checks for Designers
 

Microservices for Mortals by Bert Ertman at Codemotion Dubai

  • 2. • Fellow at Luminis • Background in all things Java since 1995 • Java Champion, JavaOne Rockstar Speaker, and a Duke’s Choice Award Winner • Involved in architecting and implementing dozens of large scale systems over the past 20 years or so • Book author for O’Reilly, speaker at many conferences About me
  • 3. Sucker for that quick reward boy, sucker for that quick reward they said… Then it comes to be that the soothing light at the end of your tunnel is just a freight train coming your way Metallica
  • 7.
  • 8.
  • 9. Where did it come from? • People have been doing AJAX, NoSQL, SOA, etc before they even got a name • Microservices style architectures are a response to adjust software architecture to an ever-evolving spectrum. It addresses Business Agility through technology: • Usage of cloud-based infrastructure and services • DevOps • The need to scale up the number of people/teams • Client-side revolution both in technologies and devices
  • 11. Microservices are like SOA, but only the good parts
  • 12. What happened to SOA? • Well…blame it on Gartner • SOA turned into the victim of a vendor infested lock-in massacre, excessively complicating all good advice into giant overpriced hairballs sold as fake middleware, ESBs, and appliances.
  • 13.
  • 15.
  • 16. Which pill do you take?
  • 17. blue pill world • Blissful ignorance • Hey, since everyone and their mother seems to be tweeting about this microservices thing, it must be cool, right? • Heck, even Martin Fowler is blogging about it. Now it’s definitely mainstream • Dude, it’s on the freakin’ Technology Radar! • Btw, this seems to be a killer way to introduce Docker to my customer, yeah!
  • 18. Which pill do you take?
  • 19. red pill world • Painful truth of reality • Where do we defy the laws of (IT) physics? • This thing is about distributed computing which after all these years is still very hard to do! • This thing is about asynchronous programming models, which are hard to grasp • It has a number of other gotcha’s which I will go into…
  • 20. There is no spoon • Forget synchronous programming models • Forget a single Enterprise Domain Model • Forget ACID transactions • Forget Relational Integrity
  • 21. Welcome to red pill world
  • 22.
  • 24. About Monoliths • The word ‘monolith’ has a negative connotation • Not all non-microservices apps 
 are bad applications • What do you call an application that everyone wants to interface with but was not designed to do?
  • 26.
  • 27. When monoliths are bad • But… such systems can end up as monoliths with all the negative connotations to it as they: • Start to build up massive technical debt • Become hard to change without breaking stuff • QA and test cycles take lots of time (expensive) • When heavy internal coupling starts to take over control of the application • Become married to the underlying technical stack
  • 28. Monolith to Microservices approach • As was recently suggested by Martin Fowler, et al. the Monolith-First approach is a way of “strangling off services from a monolithic application”. • This makes great theory, but is pretty hard to do in practice • Often times building blocks on the inside of an application are not suitable as building blocks outside of an application
  • 29. Monolith to Microservices Struggles • Initial Investment • Data Strategy • Synchronous 
 vs Asynchronous • Conway’s Law • Re-use Traps • Dealing with Failure
  • 30. Initial Investment • So-called “Outer Architecture” • Service Discovery • Logging • Metrics and Analytics • DevOps process in-place • Solid CI/CD practices • Impact on testing strategy
  • 32. Data Strategy • Don’t have multiple microservices share the same database model and perform updates on it • this results in unwanted coupling • Separate at least read/write access if you must • Better: separate data stores for each service
  • 33. Data Strategy • Q: What if I have common data? • A: Either perform a call to another service or just copy the data • Q: How do I deal with referential integrity? • A: Move it up in the application layer
  • 34. Synchronous vs Asynchronous • Within the monolith, most communication will be synchronous • Your interfaces have been designed with synchronous, in-process, interactions in mind • May be chatty (fine-grained) • Rethinking interaction patterns is essential • Rethink the communication protocol as well
  • 35. Service Communication • Standardize on a common communication protocol • Oftentimes people choose REST, but there are others • protobuf, thrift, zeromq, mqtt, … • Is REST fast enough to do massive fan-out? • Maybe have two: synchronous and asynchronous
  • 36. Avoid re-use traps • Q: What is the best strategy for reusing common functionality between microservices? • A: Copy it in the beginning of the project if you must. Never look back. Microservices are designed to be TOTALLY independent of each other, remember?
  • 38. Conway’s Law So here is the obligatory reference to Conway’s Law: “Organizations which design systems ... are 
 constrained to produce designs which are copies of 
 the communication structures of these organizations" —M. Conway 1968
  • 39. What it actually means • Make sure the organization is compatible with the software architecture • If your (microservices) architecture does not reflect the way your organization is structured, don’t even bother going that way! • It also means that your team should be cross- functional. Everyone you need to build, maintain and get it into production must be part of the team
  • 42.
  • 43.
  • 44.
  • 46. Design for Failure • Dependent services may be unavailable or too slow to respond • Minimize human intervention • failure happens all the time, so it shouldn’t be a big deal • fail rather sooner than later (prevent cascading) • Horizontal clustering to the rescue (multiple services) • Resilience Patterns to the rescue • CircuitBreaker, Bulkhead, Caching, Retry, Messaging, etc • This is complicated stuff. It is not just about throwing Hystrix or some other library in
  • 47. Some take-aways • The essence of Microservices is about structuring systems differently • It’s about Modularity • It’s about Separation of Concerns • It’s about Single Responsibility Principle • It addresses Business Agility through technology • Those are not bad things!
  • 48. However… • Everything comes at a price • Aligning the architecture to the organization is surprisingly hard • It is not just a matter of throwing in a couple of frameworks, you have to think things through thoroughly before going this direction
  • 49. In the end… • Keep on educating yourself as more war stories see the light of day • Don’t just listen to one vendor’s version of the story, all they care about is locking you in • Have a rational thought process trump the hype, however difficult that is - think for yourself rather than following just the latest blogs and technologies
  • 50. And one more thing… • We are not all Netflix or Amazon • Just like we’re not all Twitter and Facebook with the Big Data and Web Scale hypes… • not all of us have billions of calls floating around at any given day • if you pretend you are, you will have all their infrastructural problems to deal with for free and even at a minor scale they are just as hard