Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Bounded Contexts, Microservices, and Everything In Between

Bounded Contexts, Microservices, and Everything In Between

“95% of the words are spent extolling the benefits of ‘modularity’ and that little, if anything, is said about how to achieve it” - Glenford J. Myers, 1978. This quote is 40 years old. Today, 4 decades later, nothing has changed except terminology. Time to fix this.

I want to talk about the various strategies of decomposing systems into modular components. We will learn what exactly Bounded Contexts and Microservices are. See how and why they differ. Analyze what happens between services - how data flows, and how this flow can be optimized. Ultimately, we will explore different decomposition strategies and heuristics for designing modular systems. Systems that aren’t driven by ever-changing fads, but by your business needs.

Vladik Khononov

October 18, 2018
Tweet

More Decks by Vladik Khononov

Other Decks in Programming

Transcript

  1. MICROSERVICES
    BOUNDED CONTEXTS
    AND EVERYTHING IN BETWEEN
    vladikk

    View full-size slide

  2. @vladikk
    vladikk.com

    View full-size slide

  3. ”95% of the words are spent extolling the benefits
    of “modularity” and that little, if anything, is said
    about how to achieve it”
    Glenford J. Myers
    Composite / Structured Design, 1974

    View full-size slide

  4. “MICROSERVICES FTW!!!!!!!!1”
    Me @ Internovus

    View full-size slide

  5. “MICROSERVICES FTW!!!!!!!!1”
    Me @ Internovus

    View full-size slide

  6. ”95% of the words are spent extolling the benefits
    of “modularity” and that little, if anything, is said
    about how to achieve it”
    Glenford J. Myers
    Composite / Structured Design, 1974

    View full-size slide

  7. Decomposi/on Strategies
    Microservices
    Design Heuris/cs

    View full-size slide

  8. vladikk
    NAXEX / INTERNOVUS
    01
    BUSINESS DOMAIN

    View full-size slide

  9. Your Product Marketing

    Strategy
    Creatives Campaigns Sales

    Agents
    Optimization
    Profits

    View full-size slide

  10. vladikk
    DECOMPOSITION
    02
    STRATEGIES

    View full-size slide

  11. Bounded Contexts

    View full-size slide

  12. Business Domain Expert
    Software Developer
    ???
    !!!
    Ubiquitous Language

    View full-size slide

  13. Campaigns Sales

    Agents
    Your Product Marketing

    Strategy
    Creatives
    Optimization
    Profits

    View full-size slide

  14. Campaigns Sales

    Agents
    Your Product Marketing

    Strategy
    Creatives
    Optimization
    Profits

    View full-size slide

  15. Sales Agent
    Campaign Manager
    ???
    !!!
    LEAD?

    View full-size slide

  16. Conflicting models
    Different contexts
    Dividing the language/model
    Bounded Context

    View full-size slide

  17. MarkeCng
    Sales
    Lead Lead
    Funnel
    Campaign
    Placement
    Landing Page
    Agency Insertion Order
    Message
    Campaign
    Proposition
    Desk
    Conversion
    Contact
    CDR
    Bounded Contexts

    View full-size slide

  18. MarkeCng
    Service
    Sales
    Service
    DecomposiCon Strategy #1: Bounded Contexts

    View full-size slide

  19. MarkeCng
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ads Optimization

    View full-size slide

  20. MarkeCng
    Sales
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ads Optimization

    View full-size slide

  21. MarkeCng
    Sales
    Commissions
    Desks
    Sales

    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ads Optimization
    Identity & Access

    View full-size slide

  22. Business (Sub)Domains

    View full-size slide

  23. Business Domain: Customer Acquisi/on
    Bounded Context: Marke/ng Bounded Context: Sales
    Subdomain: Crea/ve Catalog
    Subdomain: Campaigns Mngmt
    Subdomain: Ads Op/miza/on
    Subdomain: Contracts Mngmt
    Subdomain: CRM
    Subdomain: Sales Op/miza/on
    Subdomain: Commissions
    Subdomain: Desks Mngmt

    View full-size slide

  24. DecomposiCon Strategy #2: Subomains
    Campaign
    Management
    Service
    Content
    Catalog
    Service
    Desks
    Management
    Service
    CRM
    Service
    Users
    Service
    Billing
    Service

    View full-size slide

  25. Business EnCCes and Processes

    View full-size slide

  26. MarkeCng
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Optimization

    View full-size slide

  27. MarkeCng
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Optimization
    Campaign
    Management
    Campaign Placement
    Funnel
    Banner
    Landing Page
    Website
    Zone
    Asset
    Publisher
    Target Market

    View full-size slide

  28. DecomposiCon Strategy #3: EnCCes
    Website Asset Target Market
    Broker Distribu/on Customer

    View full-size slide

  29. DecomposiCon Strategies
    Bounded Contexts
    Subdomains
    Business Entities and Processes

    View full-size slide

  30. SHOW ME THE
    MICROSERVICES!

    View full-size slide

  31. Bounded Contexts == Microservices ?

    View full-size slide

  32. Sales Agent
    Campaign Manager
    ???
    !!!
    LEAD?

    View full-size slide

  33. MarkeCng
    Sales
    Lead Lead
    Funnel
    Campaign
    Placement
    Landing Page
    Agency Insertion Order
    Message
    Campaign
    Proposition
    Desk
    Conversion
    Contact
    CDR

    View full-size slide

  34. MarkeCng
    Sales
    Lead Lead
    Funnel
    Campaign
    Placement
    Landing Page
    Agency Insertion Order
    Message
    Campaign
    Proposition
    Desk
    Conversion
    Contact
    CDR

    View full-size slide

  35. MarkeCng
    Sales
    Lead Lead
    Funnel
    Campaign
    Placement
    Landing Page
    Agency Insertion Order
    Message
    Campaign
    Proposition
    Desk
    Conversion
    Contact
    CDR

    View full-size slide

  36. MarkeCng
    Sales
    Commissions
    Desks
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Optimization
    Identity & Access
    Lead
    Lead

    View full-size slide

  37. MarkeCng
    Sales
    Commissions
    Desks Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Optimization
    Identity & Access
    Lead
    Lead

    View full-size slide

  38. MarkeCng
    Creative
    Catalog
    Campaign
    Management
    Optimization
    Lead
    Sales
    Commissions
    Optimization
    CRM Lead
    Desks
    Telephony
    Support
    Contracts
    Billing
    Identity & Access

    View full-size slide

  39. Bounded Contexts
    Decomposi/on #1
    Bounded Contexts
    Decomposi/on #2
    Bounded Contexts
    Decomposi/on #3

    View full-size slide

  40. Bounded Context
    Consistency boundary of the language / model
    Define the biggest valid monoliths
    Required decomposition boundary

    View full-size slide

  41. Bounded Contexts == Microservices? No

    View full-size slide

  42. Campaign
    Management
    Campaign Placement
    Funnel
    Banner
    Landing Page
    Website
    Zone
    Asset
    Publisher
    Target Market
    Campaign
    Website
    Placement
    Funnel
    MarkeCng
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Optimization
    Bounded Contexts? No Subdomains? EnCCes?

    View full-size slide

  43. Campaign
    Management
    Campaign Placement
    Funnel
    Banner
    Landing Page
    Website
    Zone
    Asset
    Publisher
    Target Market
    Campaign
    Website
    Placement
    Funnel
    MarkeCng
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Optimization
    Bounded Contexts? No Subdomains? EnCCes?

    View full-size slide

  44. vladikk
    MICROSERVICES
    03

    View full-size slide

  45. Service
    “A service is a unit of functionality exposed to the world” - Juval Lowy
    “A mechanism to enable access to one or more capabilities, where
    the access is provided using a prescribed interface” - OASIS

    View full-size slide

  46. “A service is a unit of functionality exposed to the world” - Juval Lowy
    “A mechanism to enable access to one or more capabilities, where
    the access is provided using a prescribed interface” - OASIS
    Service

    View full-size slide

  47. Service Interface
    “Any mechanism for getting data in or out of the service”
    - Randy Shoup

    View full-size slide

  48. Service Interface
    Synchronous:
    • Request / Réponse
    • Bulk ETL

    View full-size slide

  49. Service Interface
    Asynchronous:
    • Producing events
    • Consuming events
    Synchronous:
    • Request / Réponse
    • Bulk ETL

    View full-size slide

  50. Service Interface
    “Any mechanism for getting data in or out of the service”
    - Randy Shoup

    View full-size slide

  51. Service Interface

    View full-size slide

  52. Services ➜ Microservice

    View full-size slide

  53. A microservice is a service with a micro interface

    View full-size slide

  54. A microservice is a service with a micro interface

    View full-size slide

  55. Microservice = Microinterface
    Reducing coupling between services
    Limits reasons for change
    Easier to understand
    Better fault isolation
    More autonomy between services

    View full-size slide

  56. Microservice & Databases
    Microservices should own its database
    No external access
    Access through Microservice’s API only
    Database = infinite interface!

    View full-size slide

  57. 1 Method = Perfect Microservice !!??

    View full-size slide

  58. STAFF
    ONLY
    STAFF
    ONLY

    View full-size slide

  59. The threshold upon which a system can be decomposed
    into microservices is defined by the use cases of the
    system that the microservices are a part of.

    View full-size slide

  60. Monolith Microservices
    Cost
    of
    Change

    View full-size slide

  61. Monolith Microservices Distributed

    Monolith
    Cost
    of
    Change

    View full-size slide

  62. Big Ball Of Mud Bounded
    Contexts
    Microservices Distributed
    Big Ball Of Mud
    Avg.
    Service
    Size

    View full-size slide

  63. Campaign
    Management
    Campaign Placement
    Funnel
    Banner
    Landing Page
    Website
    Zone
    Asset
    Publisher
    Target Market
    Campaign
    Website
    Placement
    Funnel
    Subdomains? EnCCes?

    View full-size slide

  64. ”Global complexity … the complexity of the
    overall structure of a program or system. I.e., the
    degree of association or interdependence
    among the major pieces of a program”
    Glenford J. Myers
    Composite / Structured Design, 1974

    View full-size slide

  65. ”Global complexity … the complexity of the
    overall structure of a program or system. I.e., the
    degree of association or interdependence
    among the major pieces of a program”
    Glenford J. Myers
    Composite / Structured Design, 1974

    View full-size slide

  66. ”Global complexity … the complexity of the
    overall structure of a program or system. I.e., the
    degree of association or interdependence
    among the major pieces of a program”
    Glenford J. Myers
    Composite / Structured Design, 1974

    View full-size slide

  67. When you design a system…, then if the features
    can be broken into … loosely bound groups of
    rela>vely closely bound features, then that
    division is a good thing to be made a part of the
    design. This is just good engineering.
    Tim Berners-Lee
    Principles of design, 1998

    View full-size slide

  68. Services + Good Engineering = Microservices

    View full-size slide

  69. Its is not only necessary to make sure your own
    system is designed to be made of modular parts.
    It is also necessary to realize that your own
    system … should always be designed to be a part
    of another larger system.
    Tim Berners-Lee
    Principles of design, 1998

    View full-size slide

  70. A major part of this paper will be concerned with
    the ques>on of how good modularity can be
    achieved, that is, how modules can be chosen so
    as to minimize the connec5ons between them.
    Barbara Liskov
    A design methodology for reliable soIware systems, 1972

    View full-size slide

  71. A microservice is a service with a micro interface.
    The threshold upon which a system can be decomposed
    into microservices is defined by the use cases of the
    system that the microservices are a part of.

    View full-size slide

  72. A microservice is a service with a micro interface.
    The threshold upon which the system can be decomposed
    is defined by the use cases of the system that the
    microservices are a part of.
    …how to evaluate?

    View full-size slide

  73. vladikk
    DESIGN
    04
    HEURISTICS

    View full-size slide

  74. HeurisCc #1: Decompose to Bounded Contexts
    Do not implement conflicting models in the same service. 

    Always decompose to Bounded Contexts.

    View full-size slide

  75. HeurisCc #2: Don’t
    ”First Law of Distributed Object Design: 

    “Don’t distribute your objects”
    MarCn Fowler

    View full-size slide

  76. HeurisCc #2: Don’t
    Benefits
    Addi/onal

    Complexity

    View full-size slide

  77. Monolith:
    System design that undermines delivery of
    functional or non-functional requirements

    View full-size slide

  78. HeurisCc #2: Don’t
    Benefits
    Addi/onal

    Complexity

    View full-size slide

  79. HeurisCc #2: Don’t
    Benefits Addi/onal
    Complexity

    View full-size slide

  80. Core
    Supporting
    Generic

    View full-size slide

  81. Generic Subdomains
    No competitive advantage
    Everybody is implementing in the same way
    Complex business logic

    View full-size slide

  82. MarkeCng
    Sales
    Commissions
    Desks
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Optimization
    Identity & Access
    Generic

    View full-size slide

  83. MarkeCng
    Sales
    Commissions
    Desks
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Optimization Identity & Access
    Generic

    View full-size slide

  84. MarkeCng
    Sales
    Commissions
    Desks
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Optimization Identity & Access
    Generic

    View full-size slide

  85. MarkeCng
    Sales
    Commissions
    Desks
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Optimization
    Identity & Access
    Generic

    View full-size slide

  86. MarkeCng
    Sales
    Commissions
    Desks
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Optimization
    Identity & Access
    Generic

    View full-size slide

  87. MarkeCng
    Sales
    Commissions
    Desks
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Optimization
    Identity & Access
    Generic

    View full-size slide

  88. MarkeCng
    Sales
    Commissions
    Desks
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Optimization
    Identity & Access
    Generic

    View full-size slide

  89. MarkeCng
    Sales
    Commissions
    Desks
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Optimization
    Identity & Access
    Generic

    View full-size slide

  90. HeurisCc #3: Buy/Adopt Generic Subdomains
    Your
    System
    3rd party
    product

    View full-size slide

  91. HeurisCc #3: Buy/Adopt Generic Subdomains
    Your
    System
    3rd party
    product
    An/-Corrup/on Layer

    View full-size slide

  92. Core Subdomains
    Inventing something new
    Optimizing existing paractices
    Competitive advantage
    Complex business logic
    Change often

    View full-size slide

  93. MarkeCng
    Sales
    Commissions
    Desks
    Sales

    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ad Optimization
    Identity & Access
    Generic Core

    View full-size slide

  94. MarkeCng
    Sales
    Commissions
    Desks
    Sales

    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ad Optimization
    Identity & Access
    Generic Core

    View full-size slide

  95. MarkeCng
    Sales
    Commissions
    Desks
    Sales
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ad Optimization
    Identity & Access
    Generic Core

    View full-size slide

  96. MarkeCng
    Sales
    Commissions
    Desks
    Sales
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ad Optimization
    Identity & Access
    Generic Core

    View full-size slide

  97. MarkeCng
    Sales
    Commissions
    Desks
    Sales
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ad Optimization
    Identity & Access
    Generic Core

    View full-size slide

  98. MarkeCng
    Sales
    Commissions
    Desks
    Sales
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ad Optimization
    Identity & Access
    Generic Core

    View full-size slide

  99. Core Subdomains
    Inventing something new
    Optimizing existing paractices
    Competitive advantage
    Complex business logic
    Change often

    View full-size slide

  100. HeurisCc #4: Core Subdomains - Don’t Rush
    Adhere to subdomain’s boundaries.
    Decompose further only when you acquire
    domain knowledge.

    View full-size slide

  101. SupporCng Subdomains
    No competitive advantage
    Support the Core Subdomains
    Can’t be bought / adopted
    Simple business logic

    View full-size slide

  102. MarkeCng
    Sales
    Commissions
    Desks
    Sales
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ad Optimization
    Identity & Access
    Generic Core Supporting

    View full-size slide

  103. MarkeCng
    Sales
    Commissions
    Desks
    Sales
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ad Optimization
    Identity & Access
    Generic Core Supporting

    View full-size slide

  104. MarkeCng
    Sales
    Commissions
    Desks
    Sales
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ad Optimization
    Identity & Access
    Generic Core Supporting

    View full-size slide

  105. MarkeCng
    Sales
    Commissions
    Desks
    Sales
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ad Optimization
    Identity & Access
    Generic Core Supporting

    View full-size slide

  106. MarkeCng
    Sales
    Commissions
    Desks
    Sales
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ad Optimization
    Identity & Access
    Generic Core Supporting

    View full-size slide

  107. MarkeCng
    Sales
    Commissions
    Desks
    Sales
    Optimization
    CRM
    Telephony
    Creative
    Catalog
    Contracts
    Billing
    Campaign
    Management
    Identity & Access
    Ad Optimization
    Identity & Access
    Generic Core Supporting

    View full-size slide

  108. SupporCng Subdomains
    No competitive advantage
    Support the Core Subdomains
    Can’t be bought / adopted
    Simple business logic

    View full-size slide

  109. HeurisCc #5: SupporCng Subdomains - Safe
    Safe to decompose beyond the subdomain’s
    boundaries.

    View full-size slide

  110. Core
    Supporting
    Generic

    View full-size slide

  111. HeurisCc #6: Evaluate Consistency Requirements
    Method A Method B

    View full-size slide

  112. HeurisCc #6: Evaluate Consistency Requirements
    Concurrency control? - Same service
    Method A Method B

    Service A

    View full-size slide

  113. HeurisCc #6: Evaluate Consistency Requirements
    Read last write? - Two services, synchronous communication

    Service A
    Method A

    Service B
    Method B
    Sync call

    View full-size slide

  114. HeurisCc #6: Evaluate Consistency Requirements
    Eventual consistency? - Two services, asynchronous communication

    Service A
    Method A

    Service B
    Method B
    Asynchronous
    Communication

    View full-size slide

  115. HeurisCc #6: Evaluate Consistency Requirements
    Concurrency control? - Same service
    Read last write? - Two services, sync communication
    Eventual consistency? - Two services, async communication

    View full-size slide


  116. Service A
    Method A

    Service B
    Method B
    Asynchronous
    Communication

    View full-size slide

  117. HeurisCc #7: Public / Private Events
    Service
    Event Type 1
    Event Type 2
    Event Type 3
    Event Type 4
    Event Type 5
    Event Type 6
    Event Type 1000

    View full-size slide

  118. HeurisCc #7: Public / Private Events
    Service
    Event Type 1
    Event Type 2
    Event Type 3
    Event Type 4
    Event Type 5
    Event Type 6
    Event Type 1000

    Private event types
    (Implementation details)
    }

    View full-size slide

  119. HeurisCc #7: Public / Private Events
    Service
    Event Type 1
    Event Type 2
    Event Type 3
    Event Type 4
    Event Type 5
    Event Type 6
    Event Type 1000

    Private event types
    (Implementation details)
    }Public event types
    (Public interface)
    }

    View full-size slide

  120. Service
    HeurisCc #7: Public / Private Events

    View full-size slide

  121. Service
    EmailChanged
    PhoneNumberChanged
    AddressChanged
    HeurisCc #7: Public / Private Events

    View full-size slide

  122. Service
    EmailChanged
    PhoneNumberChanged
    AddressChanged
    HeurisCc #7: Public / Private Events

    View full-size slide

  123. Service
    EmailChanged
    PhoneNumberChanged
    AddressChanged
    ContactDetailsChanged
    HeurisCc #7: Public / Private Events

    View full-size slide

  124. Service
    EmailChanged
    PhoneNumberChanged
    AddressChanged
    ContactDetailsChanged
    Private event types
    (Implementation details)
    } Public event type
    (Public interface)
    }
    HeurisCc #7: Public / Private Events

    View full-size slide

  125. HeurisCc #7: Public / Private Events
    Events?

    View full-size slide

  126. HeurisCc #7: Public / Private Events
    Events?
    Domain
    Events

    View full-size slide

  127. HeurisCc #7: Public / Private Events
    Events?
    Domain
    Events
    State Change

    Events

    View full-size slide

  128. HeurisCc #7: Public / Private Events
    Events?
    Domain
    Events
    State Change

    Events
    Private Public

    View full-size slide

  129. HeurisCc #8: Make Events Explicit
    Eliminate ambiguity

    View full-size slide

  130. HeurisCc #8: Make Events Explicit
    Service
    AgentAssignedToLead

    View full-size slide

  131. HeurisCc #8: Make Events Explicit
    Service
    AgentAssignedToLead
    AgentAssignedToLead
    AgentAssignedToLead

    View full-size slide

  132. HeurisCc #8: Make Events Explicit
    Service
    AgentAssignedToLead
    AgentUnassignedToLead
    AgentAssignedToLead

    View full-size slide

  133. HeurisCc #8: Make Events Explicit
    Service
    AgentAssignedToLead
    AgentUnassignedToLead
    AgentAssignedToLead

    View full-size slide

  134. HeurisCc #9: Evaluate Reasons for Change
    Service A Service B

    View full-size slide

  135. Same reasons for change?
    Same rate of change?
    Can be decoupled?
    Should be the same service?
    HeurisCc #9: Evaluate Reasons for Change

    View full-size slide

  136. HeurisCc #10: Evaluate Services’ “Doors”

    View full-size slide

  137. HeurisCc #10: Evaluate Services’ “Doors”
    STAFF
    ONLY
    STAFF
    ONLY

    View full-size slide

  138. HeurisCc #10: Evaluate Services’ “Doors”
    STAFF
    ONLY
    STAFF
    ONLY

    View full-size slide

  139. vladikk
    WRAP UP
    05

    View full-size slide

  140. 1. A service is a unit of func/onality exposed to the
    world through its public interface.
    2. A microservice is a service with micro interface
    3. The “micro-interface” is rela/ve to the use cases of
    the system that the service is a part of

    View full-size slide

  141. Heuris/c #1: Always decompose to Bounded Contexts
    Heuris/c #2: Don’t go further, unless you have to
    Heuris/c #3: Buy/adopt generic subdomains
    Heuris/c #4: Core subdomains - don’t rush
    Heuris/c #5: Suppor/ng subdomains can be
    decomposed early

    View full-size slide

  142. Heuris/c #6: Evaluate Consistency Requirements
    Heuris/c #7: Private / Public Events
    Heuris/c #8: Explicitly Define Events
    Heuris/c #9: Evaluate Reasons for Change
    Heuris/c #10: Evaluate Services’ “Doors”

    View full-size slide

  143. Big Ball Of Mud Bounded
    Contexts
    Microservices Distributed
    Big Ball Of Mud
    Avg.
    Service
    Size

    View full-size slide

  144. Bibliography
    1. A Design Methodology for Reliable Soeware Systems, Barbara Liskov
    2. Composite/Structured Design, Glenford Myers
    3. Domain-Driven Design: Tackling Complexity in the Heart of Soeware, Eric Evans
    4. Emerging Boundaries, Mathias Veraes
    5. Implemen/ng Domain-Driven Design, Vaughn Vernon
    6. Enterprise Integra/on Paherns, Gregory Hohpe, at al
    7. Long Sad Story of Microservices, Greg Young
    8. Managing Data in Microservices, Randy Shoup
    9. Microservices, At Last Some Boundaries, Eric Evans
    10. On the Criteria to be Used in Decomposing Systems Into Modules, David Parnas
    11. Paherns of Enterprise Applica/on Architecture, Mar/n Fowler, at al
    12. Principles of Design, Tim Berners-Lee
    13. Programming WCF Services, Juval Lowy
    14. What Every Programmer Should Know About Object Oriented Design, Melir Page-Jones

    View full-size slide

  145. QUESTIONS?
    @vladikk vladikk.com

    View full-size slide

  146. THANK YOU!
    @vladikk vladikk.com

    View full-size slide