Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
The SeVEN DEADLY SINS OF MICRoservices
Daniel Bryant
@danielbryantuk
Container Solutions London
(WITH Credit to Tareq Abed...
The Seven Deadly Sins
•  1. LUST …
•  2. GLUTTONY
•  3. GREED…
•  4. SLOTH
•  5. WRATH
•  6. ENVY
•  7. PRIDE
19/06/15	
  ...
The Seven Deadly Sins (of Microservices)
•  1. LUST - Using the latest and greatest tech…
•  2. GLUTTONY - Excessive commu...
Who Am I?
•  OpenCredo / Container Solutions
ü  Agile, CI/CD, DevOps
ü  Microservices and cloud
ü  Docker, Mesos and Ku...
So, What is a microservice?
“Loosely coupled service oriented architecture
with bounded contexts”
Adrian Cockcroft
“Applic...
1. Lust - Using THE LATEST and Greatest Tech…
19/06/15	
   @danielbryantuk	
  
Microservices...
They solve all of our problems, Right?
19/06/15	
   @danielbryantuk	
  
No... Not necessarily good for speed
19/06/15	
   @danielbryantuk	
  
skillsma7er.com/skillscasts/6143-­‐microservices-­‐f...
No... Check your architecture/design skills
“If you can't build a [well-structured] monolith,
what makes you think microse...
No... Check your architecture/design skills
19/06/15	
   @danielbryantuk	
  
No... Operational maturity is vital
19/06/15	
   @danielbryantuk	
  
marJnfowler.com/bliki/MicroservicePrerequisites.html	...
Microservices are very useful
But check your use case...
...Evaluation is a key skill
19/06/15	
   @danielbryantuk	
  
Evaluation
“I will postpone using this shiny new framework until
my peers have validated the proposed benefits with
rigoro...
Pick Your (Technical) Battles...…
•  As Dan McKinley says, “Choose Boring Technology”
– Optimize globally across organisat...
Matt Raible’s Comparison Framework
19/06/15	
   @danielbryantuk	
  
2. GLUTTONY - Excessive Communication PROTOCOLS
19/06/15	
   @danielbryantuk	
  
Standardize Across the Organization
•  Choose one synchronous protocol
–  e.g. JSON over HTTP
•  Choose one asynchronous p...
Enterprise communication (Beam me up?)
19/06/15	
   @danielbryantuk	
  
www.dzone.com/research/guide-­‐to-­‐enterprise-­‐i...
3. GREED - All your service are Belong to us…
19/06/15	
   @danielbryantuk	
  
How Do Committees Invent?
“organizations which design systems ...
are constrained to produce designs which are copies of t...
19/06/15	
   @danielbryantuk	
  
Dev	
   QA	
   Ops	
  
Hand-­‐off	
  delays	
  Hand-­‐off	
  delays	
  
Slow	
  feedback	
 ...
19/06/15	
   @danielbryantuk	
  
Cross-functional Teams
•  Spotify (bit.ly/1C46ZKo)
–  Culture
•  Amazon (bit.ly/1F3Dgkm)
–  Communication
•  Gilt (gi.lt/1...
Conway was Telling the Truth... Deal with it!
19/06/15	
   @danielbryantuk	
  
4. SLOTH - Creating a distributed monolith
19/06/15	
   @danielbryantuk	
  
Can’t Deploy Services Independently?
Check your ‘bounded contexts’ and/or data ‘fault-lines’
(Also, check you have separat...
Can’t Deploy Services Independently?
•  Schema-first design
–  Michael Bryzek (Gilt): APIdoc
•  Consumer-driven Contracts ...
Architecture - not a Dirty Word
•  Technical leadership (bit.ly/1EUwpLl)
•  Communication (bit.ly/1Ia3u8o)
•  Promote shar...
5. WRATH - Blowing up when bad things happen
19/06/15	
   @danielbryantuk	
  
Bring in Michael Nygard (Or some monkeys)
19/06/15	
   @danielbryantuk	
  
OPERATIONAL Concerns: Technical
•  Continuous delivery is a microservice prerequisite
– Rapid provisioning
– Basic monitor...
Operational Concerns: Social
•  Failure happens all the time... Get used to it!
•  'Gameday' or 'Disaster in recovery test...
Share the pain...
19/06/15	
   @danielbryantuk	
  
“Dev-on-call”
An occasional spike to the head
is a good thing...
...metaphorically speaking
•  You write it, you run it
– ...
6. ENVY - The shared SINGLE domain fallacy
19/06/15	
   @danielbryantuk	
  
One Model to Rule Them All...
•  One model…
–  Breaks encapsulation
–  Introduces coupling
•  Know your DDD
–  Entities
– ...
But... how do I generate Reports?
•  Aggregated reporting pattern
– Pull by service
•  Data Pumps
– Push (Event sourcing?)...
7. PRIDE - testing in the world of transience
19/06/15	
   @danielbryantuk	
  
People are surprisingly quiet about this...
19/06/15	
   @danielbryantuk	
  
marJnfowler.com/arJcles/microservice-­‐tesJng...
Testing With Microservices is Difficult...
•  Invest in your build pipeline testing
– Serenity BDD
– Wiremock / Saboteur
–...
Testing With Microservices is Difficult...
•  Do it in production(?)
–  Netflix
–  Hailo
–  Gilt
•  This is an advanced pa...
Summary
•  1. LUST - Using the latest and greatest tech…
•  2. GLUTTONY - Excessive communication protocols
•  3. GREED - ...
19/06/15	
   @danielbryantuk	
  
THANKS...
@danielbryantuk
daniel.bryant@container-solutions.com
@containersoluti
www.container-solutions.com
(Credit to Ta...
You’ve finished this document.
Download and read it offline.
Upcoming SlideShare
The Role of Enterprise Integration in Digital Transformation
Next
Upcoming SlideShare
The Role of Enterprise Integration in Digital Transformation
Next
Download to read offline and view in fullscreen.

Share

DevoxxUK 2015 "The Seven Deadly Sins of Microservices (Full Version)"

Download to read offline

All is not completely rosy in microservice-land. It is often a sign of an architectural approach’s maturity that in addition to the emergence of well established principles and practices, that anti-patterns also begin to be identified and classified. In this talk we introduce seven deadly sins that if left unchecked could easily ruin your next microservices project...

This talk will take a tour of some of the nastiest anti-patterns in microservices, giving you the tools to not only avoid but also slay these demons before they tie up your project in their own special brand of hell. Topics covered include: Pride - selfishly ignoring the new requirements for testing; Envy - introducing inappropriate intimacy within services by creating a shared domain model; Wrath - failing to deal with the inevitable bad things that occur within a distributed system; Sloth - composing services in a lazy fashion, which ultimately leads to the creation of a “Distributed Monolith”; and Lust - embracing the latest and greatest technology without evaluating the operational impact incurred by these choices.

Related Books

Free with a 30 day trial from Scribd

See all

Related Audiobooks

Free with a 30 day trial from Scribd

See all

DevoxxUK 2015 "The Seven Deadly Sins of Microservices (Full Version)"

  1. 1. The SeVEN DEADLY SINS OF MICRoservices Daniel Bryant @danielbryantuk Container Solutions London (WITH Credit to Tareq Abedrabbo, OPENCREDO)
  2. 2. The Seven Deadly Sins •  1. LUST … •  2. GLUTTONY •  3. GREED… •  4. SLOTH •  5. WRATH •  6. ENVY •  7. PRIDE 19/06/15   @danielbryantuk  
  3. 3. The Seven Deadly Sins (of Microservices) •  1. LUST - Using the latest and greatest tech… •  2. GLUTTONY - Excessive communication protocols •  3. GREED - All your service are belong to us… •  4. SLOTH - Creating a distributed monolith •  5. WRATH - Blowing up when bad things happen •  6. ENVY - The shared single domain fallacy •  7. PRIDE - testing in the world of transience 19/06/15   @danielbryantuk  
  4. 4. Who Am I? •  OpenCredo / Container Solutions ü  Agile, CI/CD, DevOps ü  Microservices and cloud ü  Docker, Mesos and Kubernetes •  London Java Community Associate •  Adopt OpenJDK and JSR •  InfoQ Editor and DZone MVB 19/06/15   @danielbryantuk  
  5. 5. So, What is a microservice? “Loosely coupled service oriented architecture with bounded contexts” Adrian Cockcroft “Applications that fit in your head” James Lewis 19/06/15   @danielbryantuk  
  6. 6. 1. Lust - Using THE LATEST and Greatest Tech… 19/06/15   @danielbryantuk  
  7. 7. Microservices... They solve all of our problems, Right? 19/06/15   @danielbryantuk  
  8. 8. No... Not necessarily good for speed 19/06/15   @danielbryantuk   skillsma7er.com/skillscasts/6143-­‐microservices-­‐for-­‐speed     HOT  OFF  THE  PRESS!!   marJnfowler.com/bliki/ MonolithFirst.html    
  9. 9. No... Check your architecture/design skills “If you can't build a [well-structured] monolith, what makes you think microservices are the answer?” Simon Brown (bit.ly/1n7D0vp) 19/06/15   @danielbryantuk  
  10. 10. No... Check your architecture/design skills 19/06/15   @danielbryantuk  
  11. 11. No... Operational maturity is vital 19/06/15   @danielbryantuk   marJnfowler.com/bliki/MicroservicePrerequisites.html    
  12. 12. Microservices are very useful But check your use case... ...Evaluation is a key skill 19/06/15   @danielbryantuk  
  13. 13. Evaluation “I will postpone using this shiny new framework until my peers have validated the proposed benefits with rigorous scientific experiments” - Said by no programmer …ever 19/06/15   @danielbryantuk  
  14. 14. Pick Your (Technical) Battles...… •  As Dan McKinley says, “Choose Boring Technology” – Optimize globally across organisation •  Java and Spring (Boot) are perfectly acceptable •  ... As are tomcat/jetty 19/06/15   @danielbryantuk  
  15. 15. Matt Raible’s Comparison Framework 19/06/15   @danielbryantuk  
  16. 16. 2. GLUTTONY - Excessive Communication PROTOCOLS 19/06/15   @danielbryantuk  
  17. 17. Standardize Across the Organization •  Choose one synchronous protocol –  e.g. JSON over HTTP •  Choose one asynchronous protocol –  e.g. RabbitMQ Don’t gold-plate, but know your options: ProtoBuf, Thrift, ZeroMQ, MQTT 19/06/15   @danielbryantuk  
  18. 18. Enterprise communication (Beam me up?) 19/06/15   @danielbryantuk   www.dzone.com/research/guide-­‐to-­‐enterprise-­‐integraJon    
  19. 19. 3. GREED - All your service are Belong to us… 19/06/15   @danielbryantuk  
  20. 20. How Do Committees Invent? “organizations which design systems ... are constrained to produce designs which are copies of the communication structures of these organizations” - Melvin Conway, 1968 19/06/15   @danielbryantuk  
  21. 21. 19/06/15   @danielbryantuk   Dev   QA   Ops   Hand-­‐off  delays  Hand-­‐off  delays   Slow  feedback   Slow  feedback   Lack  of  cohesion,  shared  understanding  and  joint  accountability   Front-­‐end   Database   Middleware  
  22. 22. 19/06/15   @danielbryantuk  
  23. 23. Cross-functional Teams •  Spotify (bit.ly/1C46ZKo) –  Culture •  Amazon (bit.ly/1F3Dgkm) –  Communication •  Gilt (gi.lt/1rgyWvO) –  Strategic alignment 19/06/15   @danielbryantuk  
  24. 24. Conway was Telling the Truth... Deal with it! 19/06/15   @danielbryantuk  
  25. 25. 4. SLOTH - Creating a distributed monolith 19/06/15   @danielbryantuk  
  26. 26. Can’t Deploy Services Independently? Check your ‘bounded contexts’ and/or data ‘fault-lines’ (Also, check you have separated deploy and release) 19/06/15   @danielbryantuk  
  27. 27. Can’t Deploy Services Independently? •  Schema-first design –  Michael Bryzek (Gilt): APIdoc •  Consumer-driven Contracts FTW –  Martin Fowler: CDC - A Service Evolution Pattern “CDC is BDD for microservices” 19/06/15   @danielbryantuk  
  28. 28. Architecture - not a Dirty Word •  Technical leadership (bit.ly/1EUwpLl) •  Communication (bit.ly/1Ia3u8o) •  Promote shared understanding •  ‘Just enough’ up front design 19/06/15   @danielbryantuk  
  29. 29. 5. WRATH - Blowing up when bad things happen 19/06/15   @danielbryantuk  
  30. 30. Bring in Michael Nygard (Or some monkeys) 19/06/15   @danielbryantuk  
  31. 31. OPERATIONAL Concerns: Technical •  Continuous delivery is a microservice prerequisite – Rapid provisioning – Basic monitoring – Rapid application deployment •  I.E. Agile & DevOps 19/06/15   @danielbryantuk  
  32. 32. Operational Concerns: Social •  Failure happens all the time... Get used to it! •  'Gameday' or 'Disaster in recovery testing' (Real) Scenarios •  Failure injection testing (FIT): – Building 'Failure as a Service' at Netflix without the Simian Army 19/06/15   @danielbryantuk  
  33. 33. Share the pain... 19/06/15   @danielbryantuk  
  34. 34. “Dev-on-call” An occasional spike to the head is a good thing... ...metaphorically speaking •  You write it, you run it –  Accountability –  Shared responsibility –  Communication 19/06/15   @danielbryantuk  
  35. 35. 6. ENVY - The shared SINGLE domain fallacy 19/06/15   @danielbryantuk  
  36. 36. One Model to Rule Them All... •  One model… –  Breaks encapsulation –  Introduces coupling •  Know your DDD –  Entities –  Value Objects –  Aggregates and Roots 19/06/15   @danielbryantuk  
  37. 37. But... how do I generate Reports? •  Aggregated reporting pattern – Pull by service •  Data Pumps – Push (Event sourcing?) 19/06/15   @danielbryantuk  
  38. 38. 7. PRIDE - testing in the world of transience 19/06/15   @danielbryantuk  
  39. 39. People are surprisingly quiet about this... 19/06/15   @danielbryantuk   marJnfowler.com/arJcles/microservice-­‐tesJng/    
  40. 40. Testing With Microservices is Difficult... •  Invest in your build pipeline testing – Serenity BDD – Wiremock / Saboteur – Jenkins Performance plugin 19/06/15   @danielbryantuk  
  41. 41. Testing With Microservices is Difficult... •  Do it in production(?) –  Netflix –  Hailo –  Gilt •  This is an advanced pattern! –  Automation is essential! 19/06/15   @danielbryantuk  
  42. 42. Summary •  1. LUST - Using the latest and greatest tech… •  2. GLUTTONY - Excessive communication protocols •  3. GREED - All your service are belong to us… •  4. SLOTH - Creating a distributed monolith •  5. WRATH - Blowing up when bad things happen •  6. ENVY - The shared single domain fallacy •  7. PRIDE - testing in the world of transience 19/06/15   @danielbryantuk  
  43. 43. 19/06/15   @danielbryantuk  
  44. 44. THANKS... @danielbryantuk daniel.bryant@container-solutions.com @containersoluti www.container-solutions.com (Credit to Tareq Abedrabbo for inspiration/guidance) 19/06/15   @danielbryantuk  
  • huiwenhan

    Mar. 17, 2019
  • ManojNair2

    Oct. 8, 2017
  • perelandra

    Nov. 3, 2016
  • bwrasa

    Oct. 21, 2016
  • SergeyPersikov

    Feb. 10, 2016
  • GabrielPerez110

    Jan. 31, 2016
  • JungMinKim6

    Jan. 27, 2016
  • hangeuncha

    Jan. 27, 2016
  • MSafaei

    Jan. 10, 2016
  • adrianlanzafame

    Jan. 9, 2016
  • robinvenneman

    Oct. 22, 2015
  • driekken

    Oct. 22, 2015
  • aleksandrtrubin

    Oct. 18, 2015
  • cobaltBlue

    Oct. 15, 2015
  • ofadeyi

    Oct. 13, 2015
  • RickPeters2

    Oct. 13, 2015
  • roslink

    Oct. 13, 2015
  • btbytes

    Oct. 13, 2015
  • diovanemonteiro

    Oct. 2, 2015
  • lcobucci

    Oct. 2, 2015

All is not completely rosy in microservice-land. It is often a sign of an architectural approach’s maturity that in addition to the emergence of well established principles and practices, that anti-patterns also begin to be identified and classified. In this talk we introduce seven deadly sins that if left unchecked could easily ruin your next microservices project... This talk will take a tour of some of the nastiest anti-patterns in microservices, giving you the tools to not only avoid but also slay these demons before they tie up your project in their own special brand of hell. Topics covered include: Pride - selfishly ignoring the new requirements for testing; Envy - introducing inappropriate intimacy within services by creating a shared domain model; Wrath - failing to deal with the inevitable bad things that occur within a distributed system; Sloth - composing services in a lazy fashion, which ultimately leads to the creation of a “Distributed Monolith”; and Lust - embracing the latest and greatest technology without evaluating the operational impact incurred by these choices.

Views

Total views

29,945

On Slideshare

0

From embeds

0

Number of embeds

8,344

Actions

Downloads

205

Shares

0

Comments

0

Likes

59

×