nano micro mini services modularization for sustainable
play

{Nano|Micro|Mini}-Services? Modularization for Sustainable Systems - PowerPoint PPT Presentation

{Nano|Micro|Mini}-Services? Modularization for Sustainable Systems Stefan Tilkov | innoQ stefan.tilkov@innoq.com @stilkov http://microxchg.io 1. Reviewing architectures Generic Architecture Review Results Deployment is Building way too


  1. {Nano|Micro|Mini}-Services? Modularization for Sustainable Systems Stefan Tilkov | innoQ stefan.tilkov@innoq.com @stilkov

  2. http://microxchg.io

  3. 1. Reviewing architectures

  4. Generic Architecture Review Results Deployment is Building way too Technical debt is features takes complicated and well-known and not too long slow addressed Architectural quality Scalability has reached has degraded its limit “-ility” problems Replacement would abound be way too expensive

  5. Any architecture’s quality is inversely proportional to the number of bottlenecks limiting its evolution, development, and operations

  6. «Insert Obligatory Conway Reference Here»

  7. Conway’s Law Organization → Architecture “Organizations which design systems are constrained to produce systems which are copies of the communication structures of these organizations.” – M.E. Conway

  8. Reversal 1 Organization ← Architecture Any particular architecture approach constraints organizational options – i.e. makes some organizational models simple and others hard to implement.

  9. Reversal 2 Organization ← Architecture Choosing a particular architecture can be a means of optimizing for a desired organizational structure.

  10. 2. System boundaries

  11. Modularization Legacy System New System New System

  12. Consolidation Legacy System Legacy System New System

  13. Modernization Legacy System New System

  14. Green fj eld New System Project scope

  15. 1 Project = 1 System?

  16. Size Modularization 1-50 LOC single fj le 50-500 LOC few fj les, few functions 500-1000 LOC Library, class hierarchy 1000-2000 LOC Framework + application >2000 LOC multiple applications

  17. System Characteristics Separate (redundant) persistence Internal, separate logic Domain models & implementation strategies Separate UI Separate development & evolution Limited interaction with other systems Autonomous deployment and operations

  18. Domain architecture Macro (technical) architecture

  19. JRuby C# Groovy 
 Scala Clojure Java

  20. NoSQL RDBMS K/V NoSQL 
 RDBMS RDBMS/DWH DocDB

  21. NoSQL RDBMS K/V NoSQL 
 RDBMS RDBMS/DWH DocDB Micro architecture

  22. Module C Module B Module A Persistence Logic UI

  23. UI UI UI Logic Logic Logic Persistence Persistence Persistence System A System B System C

  24. Assumptions to be challenged Large systems with a single environment Separation internal/external Predictable non-functional requirements Clear & distinct roles Planned releases Built because they have to be

  25. http:/ /12factor.net

  26. App characteristics Separate, runnable process Accessible via standard ports & protocols Shared-nothing model Horizontal scaling Fast startup & recovery

  27. Microservice Characteristics small each running in its own process lightweight communicating mechanisms (o fu en HTTP) built around business capabilities independently deployable minimum of centralized management may be written in di fg erent programming languages may use di fg erent data storage technologies http:/ /martinfowler.com/articles/microservices.html

  28. System Characteristics Separate (redundant) persistence Internal, separate logic Domain models & implementation strategies Separate UI Separate development & evolution Limited interaction with other systems Autonomous deployment and operations

  29. In search for a name … Executable component Sovereign system Bounded system Small enough system System Autonomous system Self-contained system Large enough system Cohesive system Domain unit Logical node Independent system Self-sufficient component Small system Full-stack service Not-so-micro-service

  30. Self-Contained System (SCS)

  31. SCS Characteristics Autonomous web application Owned by one team No sync remote calls Service API optional Includes data and logic No shared UI No or pull-based code sharing only

  32. SCS App Microservice Size (kLoC) 1-50 0.5-10 0.1-? State Self-contained External Self-contained # per Logical System 5-25 >50 >100 Communication between units No (if possible) ? Yes UI Included Included External (?) UI Integration Yes (web-based) ? ?

  33. But why?

  34. Isolation

  35. (Independent) Scalability

  36. Localized decisions

  37. Replaceability

  38. Playground e fg ect

  39. Afraid of chaos?

  40. Necessary Rules & Guidelines Cross-system System-internal Responsibilities Programming languages UI integration Development tools Communication protocols Frameworks Data formats Process/Workflow control Redundant data Persistence BI interfaces Design patterns Logging, Monitoring Coding guidelines

  41. Web-native front-end integration

  42. Server-side integration Browser Examples : Backend 1 ESI-Caches SSI Portal Server UI 1 Frontend 
 Server UI 2 Backend 2 HTML Page

  43. Client-side integration Browser Backend 1 UI 1 Examples : AJAX Proprietary Frameworks UI 2 Backend 2 HTML Page

  44. Links Browser Backend 1 HTML Page 1 <<creates>> Backend 2 HTML Page 2 Asset <<creates>> CSS Server

  45. Server-side integration options ESI (Portal server) Edge integration Homegrown REST RMI Backend call RPC WS-* Feeds Storage DB replication Chef, Puppet, … Deployment Build tools Asset pipeline Git/SVN submodules Gems Development Maven artifacts

  46. Client-side integration options JS Widgets Client call SPA-style oEmbed Unobtrusive JS Replaced link ROCA-style Magical integration concept Link

  47. Summary Explicitly design system boundaries Modularize into independent, self-contained systems Separate micro and macro architectures Be aware of changing quality goals Strike a balance between control and decentralization

  48. Thank you! Stefan Tilkov, @stilkov stefan.tilkov@innoq.com Questions? http:/ /www.innoq.com/blog/st/ Comments? Phone: +49 170 471 2625 innoQ Schweiz GmbH innoQ Deutschland GmbH Krischerstr. 100 Ohlauer Straße 43 Robert-Bosch-Straße 7 Radlkoferstraße 2 Gewerbestr. 11 40789 Monheim am Rhein 10999 Berlin 64293 Darmstadt D-81373 München CH-6330 Cham Germany Germany Germany Germany Switzerland www.innoq.com Phone: +49 2173 3366-0 Phone: +49 2173 3366-0 Phone: +49 2173 3366-0 Telefon +49 (0) 89 741185-270 Phone: +41 41 743 0116

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend