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.
MICROSERVICES
Today’s Tools & Practices meet Domain-Driven Design
!
Trivento Spring Camp | March 27th, 2015 | Dennis Traub...
- A sphere of knowledge, influence, or activity -
- What an organisation does, and the world it does it in -
DOMAIN
- A system of abstractions describing selected aspects of a Domain -
- Used to solve problems related to that Domain -
MOD...
SIT DOWN WITH THE EXPERTS & LISTEN
Customer
type = shipping
Address
type = billing
Address
Order
Line Item
Line Item
Line Item
Product
Product
Product
type =...
http://wikimediafoundation.org/wiki/File:Commodore-VIC-20-FL.jpg
http://wikimediafoundation.org/wiki/File:Commodore-VIC-20-FL.jpghttp://backgrounds.1nova.com/wp-content/uploads/sites/27/2...
We don’t model reality,
we model useful abstractions
Rule # 1
- A language structured around the Domain Model -
- Used by all team members and throughout the code -
UBIQUITOUS LANGUAGE
Customer
type = shipping
Address
type = billing
Address
Order
Line Item
Line Item
Line Item
Product
Product
Product
type =...
Customer
Customer
Marketing
Target Group
Marketing
Website
Target Group
Visitor
Marketing
Website
Shopping Cart
Target Group
Visitor
Buyer
Marketing
Website
Recipient
Shopping Cart
Shipping
Target Group
Visitor
Buyer
Marketing
Website
Recipient
Shopping Cart
Shipping
Hotline
Target Group
Complainant
Visitor
Buyer
Marketing
Website
Recipient
Shopping Cart
Shipping
Hotline
Target Group
Complainant
Visitor
Buyer
Purchasing
Customer
- An explicit boundary within which a Domain Model exists -
- Inside, all terms have a specific meaning -
- They are part o...
We don’t build a model

that works for everyone
Rule # 2
KEY ATTRIBUTES OF A BOUNDED CONTEXT
KEY ATTRIBUTES OF A BOUNDED CONTEXT
High Cohesion
KEY ATTRIBUTES OF A BOUNDED CONTEXT
High Cohesion
Loose Coupling
KEY ATTRIBUTES OF A BOUNDED CONTEXT
High Cohesion
Loose Coupling
Represents Business Capability
KEY ATTRIBUTES OF A BOUNDED CONTEXT
High Cohesion
Loose Coupling
Represents Business Capability
Context-specific Model
Customer
Marketing
Website
Recipient
Shopping Cart
Shipping
Hotline
Target Group
Complainant
Visitor
Buyer
Purchasing
Cust...
Customer
Marketing
Website
Recipient
Shopping Cart
Shipping
Hotline
Target Group
Complainant
Visitor
Buyer
Purchasing
Cust...
Business Logic
Data Access
Presentation
our “Architecture”
Business Logic
Data Access
Presentation
our “Architecture”
http://wikimediafoundation.org/wiki/File:Commodore-VIC-20-FL.jpghttp://backgrounds.1nova.com/wp-content/uploads/sites/27/2...
We don’t design a

one-size-fits-all architecture
Rule # 3
KEY ATTRIBUTES OF A BOUNDED CONTEXT
High Cohesion
Loose Coupling
Represents Business Capability
Context-specific Model
KEY ATTRIBUTES OF A MICROSERVICE
High Cohesion
Loose Coupling
Represents Business Capability
Context-specific Model
KEY ATTRIBUTES OF A MICROSERVICE
High Cohesion
Loose Coupling
Represents Business Capability
Context-specific Model
KEY ATTRIBUTES OF A MICROSERVICE
High Cohesion
Loose Coupling
Represents Business Capability
Context-specific Model
+
KEY ATTRIBUTES OF A MICROSERVICE
High Cohesion
Loose Coupling
Represents Business Capability
Context-specific Model
+
Indiv...
KEY ATTRIBUTES OF A MICROSERVICE
High Cohesion
Loose Coupling
Represents Business Capability
Context-specific Model
+
Indiv...
KEY ATTRIBUTES OF A MICROSERVICE
High Cohesion
Loose Coupling
Represents Business Capability
Context-specific Model
+
Indiv...
KEY ATTRIBUTES OF A MICROSERVICE
High Cohesion
Loose Coupling
Represents Business Capability
Context-specific Model
+
Indiv...
KEY ATTRIBUTES OF A MICROSERVICE
High Cohesion
Loose Coupling
Represents Business Capability
Context-specific Model
+
Indiv...
KEY ATTRIBUTES OF A MICROSERVICE
High Cohesion
Loose Coupling
Represents Business Capability
Context-specific Model
+
Indiv...
21
21
FREE CHOICE OF ARCHITECTURAL STYLE
21
N-Layer CQRS
Forms
over
Data
Off-the-ShelfLambda
21
FREE CHOICE OF PERSISTENCE MECHANISM
21
21
FREE CHOICE OF LANGUAGE
21
We don’t model reality,
we model useful abstractions
Rule # 1
We don’t build a model
that works for everyone
Rule # 2
We d...
WHAT MICROSERVICES ARE ABOUT
For questions or suggestions:
!
Twitter: @DTraub
dtraub@thoughtworks.com
THANK YOU
DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015
DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015
DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015
DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015
DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015
DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015
Upcoming SlideShare
Loading in …5
×

DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015

1,696 views

Published on

Domain-Driven Design changed the way we reason about large software systems. Modern practices, tools and technologies like continuous delivery, NoSQL, and cloud-based virtualization allow the creation of fine-grained systems to solve the specific problems at hand. Having DDD in mind and technical expertise at our hands, with Microservice architectures we can build complex systems that reflect our businesses' complex realities and are easy to change at the same time. This talk will show what DDD and Microservice architectures have in common and how you can use both to create software systems that fit your domain.

Published in: Technology
  • Be the first to comment

DDD / Microservices @ Trivento Spring Camp, Utrecht, 2015

  1. 1. MICROSERVICES Today’s Tools & Practices meet Domain-Driven Design ! Trivento Spring Camp | March 27th, 2015 | Dennis Traub | @DTraub
  2. 2. - A sphere of knowledge, influence, or activity - - What an organisation does, and the world it does it in - DOMAIN
  3. 3. - A system of abstractions describing selected aspects of a Domain - - Used to solve problems related to that Domain - MODEL
  4. 4. SIT DOWN WITH THE EXPERTS & LISTEN
  5. 5. Customer type = shipping Address type = billing Address Order Line Item Line Item Line Item Product Product Product type = billing Address Order Invoice Vendor
  6. 6. http://wikimediafoundation.org/wiki/File:Commodore-VIC-20-FL.jpg
  7. 7. http://wikimediafoundation.org/wiki/File:Commodore-VIC-20-FL.jpghttp://backgrounds.1nova.com/wp-content/uploads/sites/27/2015/02/One-Ring-to-Rule-them-All.jpg ONE MODEL TO RULE THEM ALL
  8. 8. We don’t model reality, we model useful abstractions Rule # 1
  9. 9. - A language structured around the Domain Model - - Used by all team members and throughout the code - UBIQUITOUS LANGUAGE
  10. 10. Customer type = shipping Address type = billing Address Order Line Item Line Item Line Item Product Product Product type = billing Address Order Invoice Vendor
  11. 11. Customer
  12. 12. Customer
  13. 13. Marketing Target Group
  14. 14. Marketing Website Target Group Visitor
  15. 15. Marketing Website Shopping Cart Target Group Visitor Buyer
  16. 16. Marketing Website Recipient Shopping Cart Shipping Target Group Visitor Buyer
  17. 17. Marketing Website Recipient Shopping Cart Shipping Hotline Target Group Complainant Visitor Buyer
  18. 18. Marketing Website Recipient Shopping Cart Shipping Hotline Target Group Complainant Visitor Buyer Purchasing Customer
  19. 19. - An explicit boundary within which a Domain Model exists - - Inside, all terms have a specific meaning - - They are part of the Ubiquitous Language - BOUNDED CONTEXT
  20. 20. We don’t build a model
 that works for everyone Rule # 2
  21. 21. KEY ATTRIBUTES OF A BOUNDED CONTEXT
  22. 22. KEY ATTRIBUTES OF A BOUNDED CONTEXT High Cohesion
  23. 23. KEY ATTRIBUTES OF A BOUNDED CONTEXT High Cohesion Loose Coupling
  24. 24. KEY ATTRIBUTES OF A BOUNDED CONTEXT High Cohesion Loose Coupling Represents Business Capability
  25. 25. KEY ATTRIBUTES OF A BOUNDED CONTEXT High Cohesion Loose Coupling Represents Business Capability Context-specific Model
  26. 26. Customer Marketing Website Recipient Shopping Cart Shipping Hotline Target Group Complainant Visitor Buyer Purchasing Customer
  27. 27. Customer Marketing Website Recipient Shopping Cart Shipping Hotline Target Group Complainant Visitor Buyer Purchasing Customer
  28. 28. Business Logic Data Access Presentation our “Architecture”
  29. 29. Business Logic Data Access Presentation our “Architecture”
  30. 30. http://wikimediafoundation.org/wiki/File:Commodore-VIC-20-FL.jpghttp://backgrounds.1nova.com/wp-content/uploads/sites/27/2015/02/One-Ring-to-Rule-them-All.jpg ONE ARCHITECTURE TO RULE THEM ALL
  31. 31. We don’t design a
 one-size-fits-all architecture Rule # 3
  32. 32. KEY ATTRIBUTES OF A BOUNDED CONTEXT High Cohesion Loose Coupling Represents Business Capability Context-specific Model
  33. 33. KEY ATTRIBUTES OF A MICROSERVICE High Cohesion Loose Coupling Represents Business Capability Context-specific Model
  34. 34. KEY ATTRIBUTES OF A MICROSERVICE High Cohesion Loose Coupling Represents Business Capability Context-specific Model
  35. 35. KEY ATTRIBUTES OF A MICROSERVICE High Cohesion Loose Coupling Represents Business Capability Context-specific Model +
  36. 36. KEY ATTRIBUTES OF A MICROSERVICE High Cohesion Loose Coupling Represents Business Capability Context-specific Model + Individual Persistence
  37. 37. KEY ATTRIBUTES OF A MICROSERVICE High Cohesion Loose Coupling Represents Business Capability Context-specific Model + Individual Persistence Individual Tech Stacks
  38. 38. KEY ATTRIBUTES OF A MICROSERVICE High Cohesion Loose Coupling Represents Business Capability Context-specific Model + Individual Persistence Individual Tech Stacks Individual Deployability
  39. 39. KEY ATTRIBUTES OF A MICROSERVICE High Cohesion Loose Coupling Represents Business Capability Context-specific Model + Individual Persistence Individual Tech Stacks Individual Deployability Individual Replaceability
  40. 40. KEY ATTRIBUTES OF A MICROSERVICE High Cohesion Loose Coupling Represents Business Capability Context-specific Model + Individual Persistence Individual Tech Stacks Individual Deployability Individual Replaceability Individual Scalability
  41. 41. KEY ATTRIBUTES OF A MICROSERVICE High Cohesion Loose Coupling Represents Business Capability Context-specific Model + Individual Persistence Individual Tech Stacks Individual Deployability Individual Replaceability Individual Scalability Can Fail Individually
  42. 42. 21
  43. 43. 21
  44. 44. FREE CHOICE OF ARCHITECTURAL STYLE 21 N-Layer CQRS Forms over Data Off-the-ShelfLambda
  45. 45. 21
  46. 46. FREE CHOICE OF PERSISTENCE MECHANISM 21
  47. 47. 21
  48. 48. FREE CHOICE OF LANGUAGE 21
  49. 49. We don’t model reality, we model useful abstractions Rule # 1 We don’t build a model that works for everyone Rule # 2 We don’t design a
 one-size-fits-all architecture Rule # 3
  50. 50. WHAT MICROSERVICES ARE ABOUT
  51. 51. For questions or suggestions: ! Twitter: @DTraub dtraub@thoughtworks.com THANK YOU

×