Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.

Microservices. The good, the bad and the ugly.

1.378 visualizaciones

Publicado el

This is the slide deck for my keynote at the Software Architect conference in London, October 2015.
The development and maintenance of monoliths presents organisations with increasing challenges, resulting in high costs and a decreasing time-to-market. More and more organisations are therefore attempting to componentise their applications.

The latest and greatest paradigm “microservices” finally seems to deliver on the promises of service-oriented architecture: shortening time-to-market, scalability, autonomy, and exchangeability of technology and databases. The challenges of delivering microservices however are equally big.

In this keynote presentation, Sander will elaborate on his personal experiences with implementing microservices architectures. He’ll be certain to address the good parts, but he does not shy away from also tackling the bad and ugly parts.

Publicado en: Software
  • Sé el primero en comentar

Microservices. The good, the bad and the ugly.

  1. 1. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 1 @aahoogendoorn | www.ditisagile.nl Microservices. Stairway to heaven or highway to hell? Sander Hoogendoorn ditisagile.nl ​Mentoring ▪ Consulting ▪ Training Agile ▪ Software architecture ▪ Code
  2. 2. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 2 Sander Hoogendoorn Me Dad Mentor, trainer, software architect, programmer Books, articles, conferences Work Owner ditisagile.nl CTO Klaverblad Insurances Web www.sanderhoogendoorn.com @aahoogendoorn sander@ditisagile.nl
  3. 3. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 5 @aahoogendoorn | www.ditisagile.nl Monoliths Hard to deliver, even harder to test and impossible to maintain
  4. 4. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 7 Advantages A single (layered) architecture A single technology stack A single code base maintained by multiple teams Disadvantages All parts are interconnected Many other systems are connected to your system Hard to change, hard to maintain Long time between releases, thereby increasing risks Slow innovation Hard to move to newer technologies Doesn’t scale very well Monoliths Advantages and disadvantages
  5. 5. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 8 Dependencies will kill you A typical systems landscape
  6. 6. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 9 @aahoogendoorn | www.ditisagile.nl A brief history of components and services
  7. 7. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 10 Client server
  8. 8. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 11 Component based development
  9. 9. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 12 Service oriented architecture
  10. 10. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 13 Microservices
  11. 11. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 14
  12. 12. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 15 @aahoogendoorn | www.ditisagile.nl Microservices Beyond the hype?
  13. 13. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 16 Microservices Beyond the hype?
  14. 14. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 17 Gartner hype cycle
  15. 15. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 18 @aahoogendoorn | www.ditisagile.nl Microservices The clear benefits
  16. 16. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 19 But first … a definition
  17. 17. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 20 In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies. Martin Fowler
  18. 18. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 21 In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies. Martin Fowler
  19. 19. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 22 In short, the microservice architectural style is an approach to developing a single application as a suite of small services, each running in its own process and communicating with lightweight mechanisms, often an HTTP resource API. These services are built around business capabilities and independently deployable by fully automated deployment machinery. There is a bare minimum of centralized management of these services, which may be written in different programming languages and use different data storage technologies. Martin Fowler
  20. 20. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 23 Monoliths Scalability
  21. 21. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 24 Microservices Scalability
  22. 22. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 25 Microservices Scalability
  23. 23. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 26 Microservices Running in their own processes
  24. 24. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 27 Monoliths Persistence
  25. 25. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 28 Microservices Polyglot persistence
  26. 26. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 29 Products not projects Scalable Decentralized governance Replaceable parts High performance Technology independent Polyglot persistence Easy to build Easy to test Easier deployment than monoliths Microservices Promises
  27. 27. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 30 What is a microservice exactly? How small is a microservice? Requirements in a microservice world Components or services Who owns a microservice? What technologies do you use? What protocols do you apply? How to define messages How to test microservices How to coordinate when business services run across components? How to build deployment pipelines? Microservices But…
  28. 28. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 31 Opinions, opinions, opinions
  29. 29. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 32 @aahoogendoorn | www.ditisagile.nl Are microservices a stairway to heaven?
  30. 30. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 33 @aahoogendoorn | www.ditisagile.nl Or are they a highway to hell?
  31. 31. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 34 @aahoogendoorn | www.ditisagile.nl Two real world cases
  32. 32. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 35 A major insurance company Case 1
  33. 33. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 36 Where do we come from? Case 1
  34. 34. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 37 Where do we come from? Case 1
  35. 35. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 38 Outsourcing didn’t work Case 1
  36. 36. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 39 Where are we going to? Case 1
  37. 37. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 40 A product development company Case 2
  38. 38. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 41 Where do we come from? Case 2
  39. 39. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 42 Where do we come from? Case 2
  40. 40. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 43
  41. 41. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 44 For the things we have to learn before we can do them, we learn by doing themAristotle
  42. 42. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 45 @aahoogendoorn | www.ditisagile.nl So what did we learn?
  43. 43. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 46 Microservices require an evolutionary architecture
  44. 44. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 47 @aahoogendoorn | www.ditisagile.nl Start with some guiding principles
  45. 45. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 49 @aahoogendoorn | www.ditisagile.nl Business processes first Case 1
  46. 46. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 50 Different levels of processes (and requirements)
  47. 47. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 51 Smart use cases
  48. 48. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 52
  49. 49. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 53
  50. 50. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 55 @aahoogendoorn | www.ditisagile.nl Architecture first Case 2
  51. 51. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 56 Current architectural layout Case 2
  52. 52. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 57 New architectural layout Case 2
  53. 53. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 58 New architectural layout Case 2
  54. 54. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 59 Brownfield migration… Case 2
  55. 55. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 61 @aahoogendoorn | www.ditisagile.nl Designing microservices Modular design and bounded contexts
  56. 56. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 62 Doing big up-front design is dumb, doing no design is even dumber Dave Thomas
  57. 57. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 63 Bounded contexts
  58. 58. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 64 The single unified domain model
  59. 59. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 65 Bounded contexts
  60. 60. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 66
  61. 61. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 68 @aahoogendoorn | www.ditisagile.nl Modeling resources
  62. 62. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 69 Interpretations of interpretations interpreted James Joyce (on REST)
  63. 63. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 70 Root resource (component) GET the collection, but only limited to this representation (but with locations likely) GET a single item from the collection, but with representation Modeling resources
  64. 64. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 71
  65. 65. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 72 @aahoogendoorn | www.ditisagile.nl Being RESTful is not as easy as it seems
  66. 66. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 73 HTTP return codes cheat sheet 1**. Hold on 2**. Here you go 3**. Go away 4**. You fucked up 5**. I fucked up
  67. 67. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 74 Be conservative in what you send, be liberal in what you acceptPostel’s Law
  68. 68. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 76 @aahoogendoorn | www.ditisagile.nl Testing microservices
  69. 69. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 77 If you fail, fail fast
  70. 70. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 78 A service development lifecycle
  71. 71. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 79 What to test
  72. 72. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 80 Even though you might have brilliant testers…
  73. 73. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 81 … please automate your tests
  74. 74. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 82 What about these services being independently deployable?
  75. 75. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 83 @aahoogendoorn | www.ditisagile.nl Deploying microservices Continuous integration and build pipelines
  76. 76. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 84 A typical build pipeline
  77. 77. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 85 A typical build pipeline
  78. 78. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 86 Build pipelines in Jenkins
  79. 79. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 89 There is no one tool to rule them all We tried Jenkins, Bamboo, Team City, GoCD and then Jenkins again…
  80. 80. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 90 @aahoogendoorn | www.ditisagile.nl Deploying microservices Kaizen, minimal viable products and continuous delivery
  81. 81. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 92 Small increments or big releases? What if Twitter…
  82. 82. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 93 Roadmaps over plans While there is value in the items on the right, we value the items on the left more
  83. 83. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 94 Minimal viable product
  84. 84. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 95 From projects to continuous delivery
  85. 85. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 97 You build it, you run it Werner Vogels
  86. 86. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 98 Moving towards DevOps is not easy It feels like showing up at the wrong re-enactment
  87. 87. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 100
  88. 88. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 101 @aahoogendoorn | www.ditisagile.nl In retrospective Some final thoughts
  89. 89. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 102 Microservices are not for everyone
  90. 90. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 103 Minimal viable product
  91. 91. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 104 @aahoogendoorn | www.ditisagile.nl Allow your teams to learn continuously…
  92. 92. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 105 The hockey stick model
  93. 93. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 107 @aahoogendoorn | www.ditisagile.nl And don’t forget to have fun
  94. 94. @aahoogendoorn | www.ditisagile.nlMicroservices. The good, the bad and the ugly 108 @aahoogendoorn | www.ditisagile.nl References and questions www.sanderhoogendoorn.com www.smartusecase.com www.speedbird9.com sander@ditisagile.nl @aahoogendoorn

×