Look at DomainDriven Design Before You Leap into
Look at Domain-Driven Design Before You Leap into Microservices Julie Lerman The. Data. Farm. com @julielerman
Dev & Ops Make it easier to deploy, mainta and update our services Microservices Julie Lerman The. Data. Farm. com @julielerman
SOA, WCF, Services and now Microservices Expert bit. ly/MLB_Ch 9_Micro. Services Julie Lerman The. Data. Farm. com @julielerman
Seth We’re coming into the ‘container all the things’ era and ‘microservice all the things’. But there be dragons there … Michele It's a strategy, not a pattern or recipe It isn't new, it evolved from SOA principles involve services, boundaries, encapsulation, data ownership Microservices principles add on with bounded contexts, additional communication patterns, and (very important) Dev. Ops Julie Lerman The. Data. Farm. com @julielerman
Microservices Guidance Decouple different parts of the system Define boundaries around parts of the system Develop and deploy each part in isolation Use a unique data store Separate team per microservice Julie Lerman The. Data. Farm. com @julielerman
Microservices Questions How do we discover boundaries? What about overlapping types/data? What about cross boundary relationships? How to communicate across boundaries? Julie Lerman The. Data. Farm. com @julielerman
Dev & Biz Reduce complexity of biz problems & solution design Domain-Driven Desig Julie Lerman The. Data. Farm. com @julielerman
Microservices Guidance esign D n e v i r D n i a m o D Decouple different parts of the system Define boundaries around parts of the system Develop and deploy each part in isolation Use a unique data store Separate team per microservice Julie Lerman The. Data. Farm. com @julielerman
Microservices Questions iven Design Domain-Dr iv How do we discover boundaries? What about overlapping types/data? What about cross boundary relationships? How to communicate across boundaries? Julie Lerman The. Data. Farm. com @julielerman
Domain-Driven Design Focus on problems of the domain Partner with domain experts Divide problems into individual, isolated, solvable problems Proven patterns and practices to guide you to success Julie Lerman The. Data. Farm. com @julielerman
Software implementation a Communication Development Process Modeling
Domain Modeling
Discovering Boundaries in Your Domain Cells can exist because their membranes define what is in and out and determine what can pass. – Eric Evans Domain-Driven Design, Eric Evans 2003 Julie Lerman The. Data. Farm. com @julielerman
Julie Lerman The. Data. Farm. com @julielerman
Bounded Contexts in Product Sales Product Customer Inventory Service Human Resources Sales Shipping Marketing Accounting Management Julie Lerman The. Data. Farm. com @julielerman
Bounded Contexts in Product Sales Product Customer Sales Marketing Management Service Julie Lerman The. Data. Farm. com @julielerman Human Resources
Bounded Contexts in Product Sales Shipping Management Inventory Julie Lerman The. Data. Farm. com @julielerman
Sharing Types Across Boundaries Julie Lerman The. Data. Farm. com @julielerman
“Re-Use is Good” “Duplication is Bad” Julie Lerman The. Data. Farm. com @julielerman
Customer Management Service Customer Sales Customer. Id Shipping Customer. Id Marketing Prospect Accounting Contact. Id Customer. Id Existing C with History Julie Lerman The. Data. Farm. com @julielerman Customer. Id
Contact Management Customer Service Customer Sales Purchaser (Customer) Shipping Recipient (Customer) Marketing Prospect Existing C with History Julie Lerman The. Data. Farm. com @julielerman Accounting A/C Holder
Sharing Types Shared Kernel Tightly coordinated Entities and Value Objects Inheritance Infrastructure Not domain types Favor inheritance over implementation Julie Lerman The. Data. Farm. com @julielerman
Choose Where to Put the Pain Shared Types Multiple, Similar Types Julie Lerman The. Data. Farm. com @julielerman
Domain-Driven Design, Eric Evans 2003
Unique Entity Types per Bounded Context Don’t share types from a common assembly Don’t write application code that assumes BC types match Guarantees each type works within its Bounded Context Julie Lerman The. Data. Farm. com @julielerman
Relationships Across Boundaries Julie Lerman The. Data. Farm. com @julielerman
Relationships aren’t all they’re cracked up to be Julie Lerman The. Data. Farm. com @julielerman
A bidirectional association means that both objects can be understood only together. When application requirements do not call for traversal in both directions, adding a traversal direction reduces interdependence and simplifies the design. – Eric Evans
Favor One-Way Relationships Manage them with aggregates
DDD Aggregates Julie Lerman The. Data. Farm. com @julielerman
Favor Value Objects over 1: 1 Relationships Julie Lerman The. Data. Farm. com @julielerman
Sharing Data Across Boundaries Julie Lerman The. Data. Farm. com @julielerman
DDD Anti-Corruption Layers Julie Lerman The. Data. Farm. com @julielerman
Cross Boundary Strategies Isolate the update strategy, so owned data can update in its own cycle Event sourcing Message queues Julie Lerman The. Data. Farm. com @julielerman
Compose From Various Microservices Data Store Customer Maint. Service Data Store Product Maint. Service Read/Write Customer Maint UI Product UI Julie Lerman The. Data. Farm. com @julielerman Data Store Order Maint. Service Read/Write Order UI
Compose From Various Microservices Data Store Customer Maint. Service Read/Write Customer Ref Service Read-Only Customer Maint UI Data Store Product Maint. Service Read/Write Product Ref Service Read-Only Product UI Julie Lerman The. Data. Farm. com @julielerman Data Store Order Maint. Service Read/Write Order Ref Service Read-Only Order UI
Ready For Action Microservices Event Message Queue Data Store Customer Created Customer Maint. Service Customer Address Modified Data Store Cust Update Customer Data Product Data Order Data Prod Update Order Maint. Service Read/Write Product Created Data Store Product Maint. Service Product Modified Read/Write Julie Lerman The. Data. Farm. com @julielerman Build an order Date Customer. ID List(Items) Product. Id Quant Current Price
Total Isolation Is Achievable Julie Lerman The. Data. Farm. com @julielerman
Resources Domain-Driven Design Fundamentals on Pluralsight bit. ly/PS_DDD Michele Leroux Bustamante on Channel 9 https: //t. co/Umrq 9 M 16 Xy Michele’s Github Microservice : https: //github. com/michelebusta/servicefabric Julie Lerman The. Data. Farm. com @julielerman
Julie Lerman @julielerman about. me/julielerman Julie Lerman The. Data. Farm. com @julielerman
- Slides: 40