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.

10 Tips for failing at microservices

1,881 views

Published on

Voxxed Vienna Presentation about failing at microservices.

Published in: Technology

10 Tips for failing at microservices

  1. 1. @koenighotze#Voxxed #10TipsMicroservices 10 Tips for failing badly at Microservices David Schmitz Senacor Technologies
  2. 2. #VoxxedVienna #10TipsMicroservices @koenighotze David Schmitz / @koenighotze Senacor Technologies Principal Architect Programmer That’s me coding EJBs
  3. 3. #VoxxedVienna #10TipsMicroservices @koenighotze Disclaimer This is not YOU! Opinions are my OWN!TM
  4. 4. #VoxxedVienna #10TipsMicroservices @koenighotze What’s in it for you? Your boss want’s to modernise, but you don’t Things to do to sabotage your project Lessons learned the hard way Things have been anonymised to protect the guilty
  5. 5. #VoxxedVienna #10TipsMicroservices @koenighotze The Boss read about microservices?
  6. 6. #VoxxedVienna #10TipsMicroservices @koenighotze Extreme agile cloud native digital microservices! Disrupt or be disrupted! Sounds good. And cloud and agile equal good?!? Industry 4.0! FTW!
  7. 7. #VoxxedVienna #10TipsMicroservices @koenighotze “IT People! Make it happen! Build me some microservices”
  8. 8. #VoxxedVienna #10TipsMicroservices @koenighotze What the hell is a microservice and why should I care?
  9. 9. #VoxxedVienna #10TipsMicroservices @koenighotze Microservices IMHO Single Bounded Context UI and Services Independent Self-Contained Local storage Share nothing User Interface Services Persistence Operations
  10. 10. #VoxxedVienna #10TipsMicroservices @koenighotze Whatever! BLAH BLAH User Interface Services Persistence Operations Too lazy to actually read all this stuff…looks boring and I want to look at funny cat pics.
  11. 11. #VoxxedVienna #10TipsMicroservices @koenighotze Sabotage Extravaganza Follow these
  12. 12. #VoxxedVienna #10TipsMicroservices @koenighotze Sabotage Extravaganza 10 9 8 7 6 5 4 3 2 1 Direction of Awesomeness
  13. 13. #VoxxedVienna #10TipsMicroservices @koenighotze 10 - Go Full-Scale-Polyglot
  14. 14. #VoxxedVienna #10TipsMicroservices @koenighotze
  15. 15. #VoxxedVienna #10TipsMicroservices @koenighotze Waldo-Tech Stack
  16. 16. #VoxxedVienna #10TipsMicroservices @koenighotze Technical knowledge - Excitement Groundhog Code - Redevelop solutions Maintenance field trips Heisenberg monitoring & Ops The Zoo of Technology
  17. 17. #VoxxedVienna #10TipsMicroservices @koenighotze Jump the Bandwagon $ npm ls | grep @0 ui-demo@0.1.0 │ ├─┬ fbjs@0.8.8 │ │ │ ├─┬ encoding@0.1.12 │ │ │ │ └── iconv-lite@0.4.15 │ │ └── ua-parser-js@0.7.12 ├─┬ react-scripts@0.8.5 │ │ ├── normalize-range@0.1.2 │ │ │ │ └── json5@0.5.1 │ │ │ └── source-map-support@0.4.11 │ │ │ └── regenerator-runtime@0.10.1 │ │ │ └── ms@0.7.2
  18. 18. #VoxxedVienna #10TipsMicroservices @koenighotze Polyglot?
  19. 19. #VoxxedVienna #10TipsMicroservices @koenighotze Polyglot? thx @Codepitbull
  20. 20. #VoxxedVienna #10TipsMicroservices @koenighotze Freedom is a human right Everybody loves a puzzle - REST, HAL, SIREN Find new friends while searching for fixes on Stackoverflow Synergies: Polyglot UI with beta status Keep ops on their toes by multi-monitoring and logging (easy win -> Date format!)
  21. 21. #VoxxedVienna #10TipsMicroservices @koenighotze And ignore Ops!
  22. 22. #VoxxedVienna #10TipsMicroservices @koenighotze 9 - The data monolith (c) Disney Corporation
  23. 23. #VoxxedVienna #10TipsMicroservices @koenighotze
  24. 24. #VoxxedVienna #10TipsMicroservices @koenighotze Mum said we should share Credit Account Payment Giant SQL Datastore
  25. 25. #VoxxedVienna #10TipsMicroservices @koenighotze Mum said we should share Credit Account Payment
  26. 26. #VoxxedVienna #10TipsMicroservices @koenighotze Name must be VARCHAR(200) instead of VARCHAR(50)
  27. 27. #VoxxedVienna #10TipsMicroservices @koenighotze Account table changes Credit Account Payment
  28. 28. #VoxxedVienna #10TipsMicroservices @koenighotze Credit Account Payment Boom
  29. 29. #VoxxedVienna #10TipsMicroservices @koenighotze Sharing is a Good ThingTM All microservices must share the database Avoid table or schema ownership Insidious dependencies, e.g. Connection pools keep everybody awake at night
  30. 30. #VoxxedVienna #10TipsMicroservices @koenighotze And ignore Ops!
  31. 31. #VoxxedVienna #10TipsMicroservices @koenighotze 8 - The event monolith
  32. 32. #VoxxedVienna #10TipsMicroservices @koenighotze Marketing Pitch Customer Homeaddress Updated Credit acquired New Customer Created … Direction of Time Customer Credit Event Store
  33. 33. #VoxxedVienna #10TipsMicroservices @koenighotze Eventsourcing Marketing Pitch Audit trail - Immutable history for free Distributed data management Decoupled microservices with CQRS …and much more!
  34. 34. #VoxxedVienna #10TipsMicroservices @koenighotze ‘Das schöne Österreich’ will no longer be accepted as a country code
  35. 35. #VoxxedVienna #10TipsMicroservices @koenighotze WET is the new DRY Country: “AU” Country: “Das schöne Österreich” … Direction of Time Customer Credit Event Store
  36. 36. #VoxxedVienna #10TipsMicroservices @koenighotze Don’t change messy past events Don’t come up with a data strategy Copy and Paste compensation actions Event history as bugfixes Dont’t need it? Play the “We might become google or linkedin!” card
  37. 37. #VoxxedVienna #10TipsMicroservices @koenighotze 7 - The Home Grown monolith
  38. 38. #VoxxedVienna #10TipsMicroservices @koenighotze – Carl Sagan (slightly paraphrased) “If you wish to make MICROSERVICES from scratch, you must first create a FRAMEWORK” Wrapping up
  39. 39. #VoxxedVienna #10TipsMicroservices @koenighotze Home made Eventsourcing { "type": "NewCustomerCreated", "id": 1234, "payload": { } } { "type": "NewCustomerCreated", "id": 1234, "payload": { } } CustomerAccount Reporting ES V1 ES V1 ES V1
  40. 40. #VoxxedVienna #10TipsMicroservices @koenighotze The customer system needs special, non-numeric ids
  41. 41. #VoxxedVienna #10TipsMicroservices @koenighotze Version increase Customer V2 { "type": "NewCustomerCreated", "id": "1234-5678", "payload": { ... } } ES 2
  42. 42. #VoxxedVienna #10TipsMicroservices @koenighotze Runtime surprise Customer V2Account Reporting ES V1 ES V1ES 2 { "type": "NewCustomerCreated", "id": "1234-5678", "payload": { ... } }
  43. 43. #VoxxedVienna #10TipsMicroservices @koenighotze Change the world event Customer V2Account V2 Reporting V2 ES V2 ES V2ES 2
  44. 44. #VoxxedVienna #10TipsMicroservices @koenighotze Microservice Promise Customer Account Reporting Independent release
  45. 45. #VoxxedVienna #10TipsMicroservices @koenighotze Monolithic Release Plan Customer Account Reporting Common Release
  46. 46. #VoxxedVienna #10TipsMicroservices @koenighotze Cross-cutting dependencies as social tools Job insurance via invasive frameworks Building frameworks is fun! Try it! Ideas: Collections, String-Utils, Logging, ORM!
  47. 47. #VoxxedVienna #10TipsMicroservices @koenighotze 6 - Think of the meat cloud
  48. 48. #VoxxedVienna #10TipsMicroservices @koenighotze W K P T Optimise your Revenue!
  49. 49. #VoxxedVienna #10TipsMicroservices @koenighotze Who KNOWS how to do it?K P T Optimise your Revenue! Who WANTS it to be done? Who has the required PRIVILEGES? Who has TIME to actually do it?
  50. 50. #VoxxedVienna #10TipsMicroservices @koenighotze Insight: CD is very useful Delivery pipeline Production
  51. 51. #VoxxedVienna #10TipsMicroservices @koenighotze And the rest of the world? Delivery pipeline Production … Handcrafted with love Soulless automation
  52. 52. #VoxxedVienna #10TipsMicroservices @koenighotze W Quickly…release a new Customer microservice K P T
  53. 53. #VoxxedVienna #10TipsMicroservices @koenighotze P T KW
  54. 54. #VoxxedVienna #10TipsMicroservices @koenighotze Ops Toolchain - Vi all the way! P T W K P T
  55. 55. #VoxxedVienna #10TipsMicroservices @koenighotze Ops Toolchain - Vi all the way! P T W K P T
  56. 56. #VoxxedVienna #10TipsMicroservices @koenighotze Prod Status - Illustration
  57. 57. #VoxxedVienna #10TipsMicroservices @koenighotze Infrastructure is expensive…be proud to take care of it Microsoft Word is some kind of automation Play the “we are not google” card If someone asks, say you are using Docker
  58. 58. #VoxxedVienna #10TipsMicroservices @koenighotze 5 - The distributed monolith
  59. 59. #VoxxedVienna #10TipsMicroservices @koenighotze Friends stay close together Customer AccountCredit Security
  60. 60. #VoxxedVienna #10TipsMicroservices @koenighotze Let’s offer a discount to new users
  61. 61. #VoxxedVienna #10TipsMicroservices @koenighotze The Musketeer Pattern Customer AccountCredit Security
  62. 62. #VoxxedVienna #10TipsMicroservices @koenighotze Combine the complexity of a microservice architecture with the rigidity and fragility of a monolith
  63. 63. #VoxxedVienna #10TipsMicroservices @koenighotze The network is reliable Dependencies indicate good design, like in Dependency Injection Synchronous dependencies are easy What is half a system good for, anyway? So avoid Circuit breakers
  64. 64. #VoxxedVienna #10TipsMicroservices @koenighotze And ignore Ops!
  65. 65. #VoxxedVienna #10TipsMicroservices @koenighotze 4 - The SPA monolith
  66. 66. #VoxxedVienna #10TipsMicroservices @koenighotze Micro is REST only Customer REST Credit RESTAccount REST Giant Monster UI
  67. 67. #VoxxedVienna #10TipsMicroservices @koenighotze Add a mandatory social-number field to the customer
  68. 68. #VoxxedVienna #10TipsMicroservices @koenighotze But not that mandatory. E.g. if the customer is not committed, yet
  69. 69. #VoxxedVienna #10TipsMicroservices @koenighotze No clear responsibility Customer Domain Credit DomainAccount Domain Comprehensive UI Domain Model
  70. 70. #VoxxedVienna #10TipsMicroservices @koenighotze Domain is spread around Customer REST Credit RESTAccount REST
  71. 71. #VoxxedVienna #10TipsMicroservices @koenighotze Ach, just put it there Room available
  72. 72. #VoxxedVienna #10TipsMicroservices @koenighotze Meet people while discussion ownership and conflicting features Keep the testers busy with side effects Single point of failure -> Easy to find
  73. 73. #VoxxedVienna #10TipsMicroservices @koenighotze By all means, avoid composition CreditCustomer Account Tailor.JS / Project Mosaic
  74. 74. #VoxxedVienna #10TipsMicroservices @koenighotze …and avoid Hyperlinks! CreditCustomer Account
  75. 75. #VoxxedVienna #10TipsMicroservices @koenighotze 3 - The decision monolith
  76. 76. #VoxxedVienna #10TipsMicroservices @koenighotze “But we need Java 7…it is 2017 after all!”
  77. 77. #VoxxedVienna #10TipsMicroservices @koenighotze The sieve of sanity Architecture & Design Sieve
  78. 78. #VoxxedVienna #10TipsMicroservices @koenighotze The sieve of sanity Agile Rx Microservice Actors Augmented realityCloud AWS WebRTC IoT Blockchain
  79. 79. #VoxxedVienna #10TipsMicroservices @koenighotze The sieve of sanity Agile Rx Microservice Actors Augmented realityCloud AWS WebRTC IoT Blockchain Architecture & Design Sieve
  80. 80. #VoxxedVienna #10TipsMicroservices @koenighotze The sieve of sanity JEE WebSphere Agile Rx Microservice Actors Augmented realityCloud AWS WebRTC IoT Blockchain Architecture & Design Sieve
  81. 81. #VoxxedVienna #10TipsMicroservices @koenighotze …works on larger scale, too Architecture & Design Sieve Customer AccountCredit Security
  82. 82. #VoxxedVienna #10TipsMicroservices @koenighotze Frustrate your coworkers Irritate motivated colleagues If you are older than 30…play the “This is _real_ enterprise, kid” card Ivory towers are beautiful Assume people are dumb, and you are smart
  83. 83. #VoxxedVienna #10TipsMicroservices @koenighotze 2 The monolithic business
  84. 84. #VoxxedVienna #10TipsMicroservices @koenighotze MS is for Devs only Credit Account Payment … … … Branch Office Toolset Something
  85. 85. #VoxxedVienna #10TipsMicroservices @koenighotze Let’s force the user to always enter a valid address
  86. 86. #VoxxedVienna #10TipsMicroservices @koenighotze No, the customer should be able to enter partial addresses
  87. 87. #VoxxedVienna #10TipsMicroservices @koenighotze Requirements Ping Pong Credit Account Payment Branch Office Toolset Something ?????
  88. 88. #VoxxedVienna #10TipsMicroservices @koenighotze Change Management
  89. 89. #VoxxedVienna #10TipsMicroservices @koenighotze Requirements Management
  90. 90. #VoxxedVienna #10TipsMicroservices @koenighotze Waterfall!!!11!!!
  91. 91. #VoxxedVienna #10TipsMicroservices @koenighotze Slow means more time for Twitter! The servant of many kings is a free man Change / Requirement Mgmt. are your allies Business people don’t know Eric Evans Conway’s law works both ways
  92. 92. #VoxxedVienna #10TipsMicroservices @koenighotze And ignore Ops!
  93. 93. #VoxxedVienna #10TipsMicroservices @koenighotze 1 - Use a HR driven Architecture
  94. 94. #VoxxedVienna #10TipsMicroservices @koenighotze It is easier to search for React developers than for general craftswomen
  95. 95. #VoxxedVienna #10TipsMicroservices @koenighotze Frontend Development Service Development DevOps Team Test Business
  96. 96. #VoxxedVienna #10TipsMicroservices @koenighotze Magic Specification Success Template
  97. 97. #VoxxedVienna #10TipsMicroservices @koenighotze Frontend Microservice Service Microservice Persistence Microservice
  98. 98. #VoxxedVienna #10TipsMicroservices @koenighotze Frontend Microservice Service Microservice Persistence Microservice Shared stability Shared release Convoluted domains
  99. 99. #VoxxedVienna #10TipsMicroservices @koenighotze And ignore Ops!
  100. 100. #VoxxedVienna #10TipsMicroservices @koenighotze Programmers do not like other people Avoid spread of knowledge Business knows the domain. Devs know tech Nobody should have a big picture, keep them in the dark Meetings mean coffee and biscuits
  101. 101. #VoxxedVienna #10TipsMicroservices @koenighotze And: In case of bugs… It’s always the other team’s fault! And: In case of bugs… It’s always the other team’s fault!
  102. 102. #VoxxedVienna #10TipsMicroservices @koenighotze Wrapping up….
  103. 103. #VoxxedVienna #10TipsMicroservices @koenighotze The key to failure is the hidden monolith
  104. 104. #VoxxedVienna #10TipsMicroservices @koenighotze The hidden monolith Data Frontend Framework Deployment and Release Process
  105. 105. #VoxxedVienna #10TipsMicroservices @koenighotze And ignore Ops!
  106. 106. #VoxxedVienna #10TipsMicroservices @koenighotze Summary MS mean Work - Fight them Greenfield != Brownfield - The perfect excuse Think of the organisational impact. You do not want to change! Embrace the monolith Microservices are a fad. Wait for SOAP 4.0 Dont’t underestimate the power of broken windows
  107. 107. #VoxxedVienna #10TipsMicroservices @koenighotze Thank you! Questions? Thank you!
  108. 108. #VoxxedVienna #10TipsMicroservices @koenighotze BACKUP

×