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.

Self-contained Systems: A Different Approach to Microservices

4,585 views

Published on

This presentation discusses approaches to Microservices - including self-contained systems and their benefits and trade-offs.

Published in: Software

Self-contained Systems: A Different Approach to Microservices

  1. 1. Self-contained Systems: A Different Approach to Microservices
  2. 2. http://continuous-delivery-buch.de/
  3. 3. http://microservices-buch.de/ http://microservices-book.com/
  4. 4. http://microservices-book.com/primer.html FREE!!!!
  5. 5. Microservice Definition
  6. 6. Server Server Microservices: Definition > Independent deployment units > Any technology > Any infrastructure > UI + Logic Micro Service Micro Service
  7. 7. Components Collaborate Micro Service Micro Service Link Data Replication REST Messaging
  8. 8. Distributed System
  9. 9. Distributed System Why??
  10. 10. Why Microservices? Strong Modularization Scaling Agile Sustainable development Replaceable Services Continuous Delivery Free choice of technology Handle Legacy efficient Independent Scaling Robustness Small teams develop and deploy independently Add services – not code Small Services Failure limited to single Microservice
  11. 11. Why Microservices? Scaling Agile Sustainable development Continuous Delivery Free choice of technology Handle Legacy efficient Independent Scaling Robustness Organization Deployment Units Technology
  12. 12. Single Developer Scaling Agile Sustainable development Continuous Delivery Free choice of technology Handle Legacy efficient Independent Scaling Robustness Organization Deployment Units Technology
  13. 13. Replace Monolith Scaling Agile Sustainable development Continuous Delivery Free choice of technology Handle Legacy efficient Independent Scaling Robustness Organization Deployment Units Technology
  14. 14. Layered iOS Android Web Order Search Catalog BillingCustomer Backend Backend Backend
  15. 15. Layered > Reusable Backend Services > Mobile client / Web App as frontend > Backend for frontend (BFF): Custom backend services > ...to implement frontend specific logic > E.g. Netflix
  16. 16. Layered: Benefits > Good way to build an API > E.g. for mobile > Might be easier to migrate into > …if existing architecture is similar
  17. 17. Layered: Issues > BFF might contain the same logic – same processes > Processes are the most relevant logic > Changing a business process cause changes in many services – BFF, Frontend, backend > Lots of communication between teams and components
  18. 18. Self-contained Systems Checkout Search BrowsingInvoicing Web Web Web Web
  19. 19. Self-contained Systems (SCS) > SCS: Autonomous web application > Optional service API (e.g. for mobile clients) > Includes data & logic > Might contain several microservices > No shared UI > No shared business code > E.g. Otto, Kaufhof, Kühne + Nagel ...
  20. 20. SCS: Benefits > Business logic for one domain in one SCS > Change usually local to one SCS > Less communication between SCS > I think this should be the goal
  21. 21. Self-Contained System (SCS)
  22. 22. Deployment monolith Graphics by Roman Stranghöhner, innoQ http://scs-architecture.org
  23. 23. Various Domains
  24. 24. User interface Business logic Persistence
  25. 25. … a lot of modules, components, frameworks and libraries
  26. 26. With all these layers in one place, a monolith tends to grow.
  27. 27. Cut Deployment monolith along domains …
  28. 28. … wrap domain in separate web application …
  29. 29. Self-contained System (SCS) – individually deployable
  30. 30. Decentralized unit communicating with other systems via RESTful HTTP or lightweight messaging.
  31. 31. SCS can be individually developed for different platforms.
  32. 32. An SCS contains its own user interface, specific business logic and separate data storage
  33. 33. Web user interface composed according to ROCA principles. http://roca-style.org
  34. 34. optional API e.g. for mobile
  35. 35. Logic only shared over a well defined interface.
  36. 36. Business logic can consist of microservices
  37. 37. Every SCS brings its own data storage with ist own (potentially redundant) data
  38. 38. Redundancies: tolerable as long as sovereignty of data by owning system is not undermined.
  39. 39. Enables polyglot persistence Neo4J CouchDB Oracle
  40. 40. Technical decisions can be made independently from other systems (programming language, frameworks, tooling, platform)
  41. 41. Domain scope enables development, operation and maintenance of SCS by a single team.Team 1 Team 2 Team 3
  42. 42. Self-contained Systems should be integrated in the web interface
  43. 43. Hyperlinks to navigate between systems. System 1 System 2
  44. 44. System 1 System 2 Redirection > Use of callback URIs > As seen e.g. in OAuth flows
  45. 45. Server-side integration > Centralized aggregation > Bottleneck (runtime/development time) Browser UI 1 UI 2 Frontend Server Backend 1 Backend 2
  46. 46. https://github.com/ ewolff/SCS-ESI
  47. 47. Client-side integration > Proprietary integration > Client requirements (e.g. CORS, JS) > Upcoming: HMTL Imports Browser UI 1 UI 2 Backend 1 Backend 2
  48. 48. Client-side Integration: Code $("a.embeddable").each(function(i, link) { $("<div />").load(link.href, function(data, status, xhr) { $(link).replaceWith(this); }); }); > Replace <a href= " " class= "embeddable"> with content of document in a <div> (jQuery)
  49. 49. https://github.com/ ewolff/SCS-jQuery
  50. 50. Synchronous remote calls inside the business logic should be avoided.
  51. 51. Asynchronous Remote calls reduce dependencies and prevent error cascades.
  52. 52. Data model’s consistency guarantees are relaxed.
  53. 53. An integrated system of systems like this has many benefits.
  54. 54. Resilience is improved through loosely coupled, replaceable systems.
  55. 55. SCSs can be individually scaled to serve varying demands.
  56. 56. No risky big bang to migrate an outdated, monolithic system into a system of systems. Version 1Version 2
  57. 57. Migration in small, manageable steps which minimize risk of failure and lead to an evolutionary modernization of big and complex systems.
  58. 58. 1 *MicroserviceSCS
  59. 59. Conclusion > SCS: autonomouos web application > Might consist of Microservices > Focus on UI Integration > Almost completet independence > Coarse-grained architecture approach
  60. 60. Conclusion > Self-contained systems are Microservices … > that are not “micro”… > and don’t have to be “services” > Many are doing it already!
  61. 61. > http://scs- architecture.org > Creative commons > Source on Github > Slidedeck

×