SlideShare a Scribd company logo
1 of 23
Download to read offline
Towards a UML Profile for Domain-driven Design of
Microservice Architectures
Microservices 2017
Florian Rademacher
University of Applied Sciences and Arts Dortmund
Institute for Digital Transformation of Application and Living Domains
florian.rademacher@fh-dortmund.de
October 25, 2017 – Odense, Denmark
Table of Contents
1 Introduction
2 Research Questions
3 Survey on UML Elements in Domain-driven Design
4 A UML Profile for Domain-driven Microservice Architecture Modeling
5 Conclusion and Future Work
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 1
Table of Contents
1 Introduction
2 Research Questions
3 Survey on UML Elements in Domain-driven Design
4 A UML Profile for Domain-driven Microservice Architecture Modeling
5 Conclusion and Future Work
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 2
The published Paper
presentation of our paper “Towards a UML Profile for Domain-driven
Design of Microservice Architectures” from this year’s Microservices:
Science and Engineering Workshop (MSE@SEFM 2017)
preprint available online
(see the abstract at http://conf-micro.services for the link)
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 3
Domain-driven Design
Domain-driven Design (DDD)
set of model-driven practices, techniques and principles for software
design
primary design drivers: application domain, concepts and concept
relationships
selected core principles
... capturing of domain knowledge in domain models
... collaborative modeling of domain experts and software engineers
(⇒ ubiquitous language)
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 4
Domain-driven Design
Structural Domain Models
selective abstractions of conceptual knowledge about a domain or
relevant domain parts
typically modeled as informal UML class diagrams with DDD patterns
like Entity, Value Object, Aggregate, Repository
role
Cargo Aggregate
*
Customer Repository
find by name(String)
find by Customer ID(String)
Cargo Repository
find by Tracking ID(String)
find by Customer ID(String)
Delivery Specification Value Object
arrival time
Handling Event Entity
completion time
type
Customer Entity
name
customer ID
*
*
goal
handled
*
Cargo Entity
tracking ID
Figure 1: Structural domain model with DDD patterns1
1
Evans, Domain-Driven Design, 2004.
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 5
Domain-driven Design and Microservice Architecture
DDD and MSA2
1 identification of Bounded Contexts and shared Value Objects in
domain models
2 mapping of Bounded Contexts and shared Value Objects to functional
Microservices and interfaces
role
Cargo Bounded Context
Customer Shared Value Object
customer ID
Customer Bounded Context
Cargo Aggregate
*
Customer Repository
find by name(String)
find by Customer ID(String)
Cargo Repository
find by Tracking ID(String)
find by Customer ID(String)
Delivery Specification Value Object
arrival time
Handling Event Entity
completion time
type
Customer Entity
name
customer ID
«use»
*
*
goal
handled
*
Cargo Entity
tracking ID
Figure 2: Domain model with Bounded Contexts and shared Value Object
2
Newman, Building Microservices, 2015.
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 6
Domain-driven Design and Microservice Architecture
Limitation: DDD is rather informal
DDD patterns lack formal, UML-based foundation
DDD patterns differ in notation
⇒ prevention of structured model operations like model transformation or
semantic validation
⇒ decrease of models’ possible value
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 7
Table of Contents
1 Introduction
2 Research Questions
3 Survey on UML Elements in Domain-driven Design
4 A UML Profile for Domain-driven Microservice Architecture Modeling
5 Conclusion and Future Work
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 8
Research Questions
RQ 1
Next to DDD patterns, which basic modeling constructs need to be
supported for Domain-driven Microservice Architecture Modeling
(DDMM)?
RQ 2.1
How can UML’s profile mechanism be utilized to support DDMM?
RQ 2.2
Which basic model transformations need to be supported for DDMM?
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 9
Table of Contents
1 Introduction
2 Research Questions
3 Survey on UML Elements in Domain-driven Design
4 A UML Profile for Domain-driven Microservice Architecture Modeling
5 Conclusion and Future Work
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 10
Survey on UML Elements in DDD
Survey on UML Elements in DDD
survey of 92 UML class diagrams3
representing real-world structural
domain models
results (UML-conform elements only):
# Element Category Occurrence Count
1 Class Classes 92 (100%)
2 Attribute Attributes 72 (78.26%)
3 Multiplicity Multiplicities 67 (72.82%)
4 Non-navigable Association Associations 58 (63.04%)
5 Method Methods 49 (53.26%)
6 Unidirectional Navigable Association Associations 36 (39.13%)
7 Non-navigable Aggregation Associations 28 (30.43%)
8 “extends” Relationship (Inheritance) Associations 23 (25%)
9 Informal Constraint Constraints 13 (14.13%)
10 Unidirectional Navigable Aggregation Associations 11 (11.95%)
11 Formal Constraint Constraints 6 (6.52%)
12 Semi-formal Constraint Constraints 3 (3.26%)
13 Class Dependency Associations 2 (2.17%)
Table 1: Results of surveying UML elements of structural domain models
3
from Evans, Domain-Driven Design, 2004.
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 11
Survey on UML Elements in DDD
Survey on UML Elements in DDD
survey of 92 UML class diagrams3
representing real-world structural
domain models
results (UML-conform elements only):
# Element Category Occurrence Count
1 Class Classes 92 (100%)
2 Attribute Attributes 72 (78.26%)
3 Multiplicity Multiplicities 67 (72.82%)
4 Non-navigable Association Associations 58 (63.04%)
5 Method Methods 49 (53.26%)
6 Unidirectional Navigable Association Associations 36 (39.13%)
7 Non-navigable Aggregation Associations 28 (30.43%)
8 “extends” Relationship (Inheritance) Associations 23 (25%)
9 Informal Constraint Constraints 13 (14.13%)
10 Unidirectional Navigable Aggregation Associations 11 (11.95%)
11 Formal Constraint Constraints 6 (6.52%)
12 Semi-formal Constraint Constraints 3 (3.26%)
13 Class Dependency Associations 2 (2.17%)
Table 1: Results of surveying UML elements of structural domain models
3
from Evans, Domain-Driven Design, 2004.
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 11
Survey on UML Elements in DDD
Survey on UML Elements in DDD
survey of 92 UML class diagrams3
representing real-world structural
domain models
results (UML-conform elements only):
# Element Category Occurrence Count
1 Class Classes 92 (100%)
2 Attribute Attributes 72 (78.26%)
3 Multiplicity Multiplicities 67 (72.82%)
4 Non-navigable Association Associations 58 (63.04%)
5 Method Methods 49 (53.26%)
6 Unidirectional Navigable Association Associations 36 (39.13%)
7 Non-navigable Aggregation Associations 28 (30.43%)
8 “extends” Relationship (Inheritance) Associations 23 (25%)
9 Informal Constraint Constraints 13 (14.13%)
10 Unidirectional Navigable Aggregation Associations 11 (11.95%)
11 Formal Constraint Constraints 6 (6.52%)
12 Semi-formal Constraint Constraints 3 (3.26%)
13 Class Dependency Associations 2 (2.17%)
Table 1: Results of surveying UML elements of structural domain models
3
from Evans, Domain-Driven Design, 2004.
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 11
Survey on UML Elements in DDD
Survey on UML Elements in DDD
survey of 92 UML class diagrams3
representing real-world structural
domain models
results (UML-conform elements only):
# Element Category Occurrence Count
1 Class Classes 92 (100%)
2 Attribute Attributes 72 (78.26%)
3 Multiplicity Multiplicities 67 (72.82%)
4 Non-navigable Association Associations 58 (63.04%)
5 Method Methods 49 (53.26%)
6 Unidirectional Navigable Association Associations 36 (39.13%)
7 Non-navigable Aggregation Associations 28 (30.43%)
8 “extends” Relationship (Inheritance) Associations 23 (25%)
9 Informal Constraint Constraints 13 (14.13%)
10 Unidirectional Navigable Aggregation Associations 11 (11.95%)
11 Formal Constraint Constraints 6 (6.52%)
12 Semi-formal Constraint Constraints 3 (3.26%)
13 Class Dependency Associations 2 (2.17%)
Table 1: Results of surveying UML elements of structural domain models
3
from Evans, Domain-Driven Design, 2004.
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 11
Survey on UML Elements in DDD
Survey on UML Elements in DDD
survey of 92 UML class diagrams3
representing real-world structural
domain models
results (UML-conform elements only):
# Element Category Occurrence Count
1 Class Classes 92 (100%)
2 Attribute Attributes 72 (78.26%)
3 Multiplicity Multiplicities 67 (72.82%)
4 Non-navigable Association Associations 58 (63.04%)
5 Method Methods 49 (53.26%)
6 Unidirectional Navigable Association Associations 36 (39.13%)
7 Non-navigable Aggregation Associations 28 (30.43%)
8 “extends” Relationship (Inheritance) Associations 23 (25%)
9 Informal Constraint Constraints 13 (14.13%)
10 Unidirectional Navigable Aggregation Associations 11 (11.95%)
11 Formal Constraint Constraints 6 (6.52%)
12 Semi-formal Constraint Constraints 3 (3.26%)
13 Class Dependency Associations 2 (2.17%)
Table 1: Results of surveying UML elements of structural domain models
3
from Evans, Domain-Driven Design, 2004.
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 11
Survey on UML Elements in DDD
Survey on UML Elements in DDD
survey of 92 UML class diagrams3
representing real-world structural
domain models
results (UML-conform elements only):
# Element Category Occurrence Count
1 Class Classes 92 (100%)
2 Attribute Attributes 72 (78.26%)
3 Multiplicity Multiplicities 67 (72.82%)
4 Non-navigable Association Associations 58 (63.04%)
5 Method Methods 49 (53.26%)
6 Unidirectional Navigable Association Associations 36 (39.13%)
7 Non-navigable Aggregation Associations 28 (30.43%)
8 “extends” Relationship (Inheritance) Associations 23 (25%)
9 Informal Constraint Constraints 13 (14.13%)
10 Unidirectional Navigable Aggregation Associations 11 (11.95%)
11 Formal Constraint Constraints 6 (6.52%)
12 Semi-formal Constraint Constraints 3 (3.26%)
13 Class Dependency Associations 2 (2.17%)
Table 1: Results of surveying UML elements of structural domain models
3
from Evans, Domain-Driven Design, 2004.
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 11
Table of Contents
1 Introduction
2 Research Questions
3 Survey on UML Elements in Domain-driven Design
4 A UML Profile for Domain-driven Microservice Architecture Modeling
5 Conclusion and Future Work
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 12
A UML Profile for Domain-driven MSA Modeling
A UML Profile for Domain-driven MSA Modeling
stereotypes for DDD patterns as extensions to UML metaclasses
«Stereotype»
Module
«Stereotype»
AggregatePart
aggregateRoot : Class
«Stereotype»
AggregateRoot
«Stereotype»
BoundedContext
«Metaclass»
Package
«Stereotype»
Closure
«Stereotype»
SideEffectFree
«Stereotype»
ValidatesSpec
«Stereotype»
Spec
«Stereotype»
Repository
«Stereotype»
Entity
«Stereotype»
Service
«Stereotype»
DefinesIdentity
«Stereotype»
ValueObject
immutable : Boolean
«Metaclass»
Property
«Metaclass»
Operation
«Metaclass»
Class
Figure 3: The UML profile’s stereotypes for DDD patterns
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 13
A UML Profile for Domain-driven MSA Modeling
A UML Profile for Domain-driven MSA Modeling
OCL constraints to ensure intended usage of pattern stereotypes
Stereotype Constraints based on UML Metamodel
AggregatePart
C1: Only Entities and Value Objects may be Aggregate parts
C2: Assigned Aggregate root must have AggregateRoot stereotype
C3: No incoming Associations from outside the Aggregate
C4: Must be in same Bounded Context as Aggregate root
AggregateRoot
C5: Only Entities may be Aggregate roots
C6: Aggregate must contain at least one part
Entity C7: One Operation or at least one Property defines the identity
Repository
C8: Class has no other stereotypes
C9: Class contains only Operations and at least one
C10: Outgoing Associations must point to Entities or Value Objects
DefinesIdentity
C19: Must not be specification validation Operation
C20: May only be applied within Entities
BoundedContext
C24: Must not have Module stereotype
C25: Must not be nested, i.e. part of another Package
Table 2: Selected stereotype constraints
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 14
A UML Profile for Domain-driven MSA Modeling
Mapping profile-based models to MSA implementation
determination of Microservice interfaces from Bounded Contexts
on the basis of context associations
associated context-external concepts or shared Value Objects as
signature types
DDD patterns Repository or Service for explicit interface operation
definition
open question 1: How to specify technical characteristics?
open question 2: Which concrete operation of Repository or Service
shall be used?
open question 3: Which concrete shared Value Object shall be used?
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 15
Table of Contents
1 Introduction
2 Research Questions
3 Survey on UML Elements in Domain-driven Design
4 A UML Profile for Domain-driven Microservice Architecture Modeling
5 Conclusion and Future Work
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 16
Conclusion and Future Work
Conclusion
characterization of DDD by means of a literature survey with 92
structural domain models
initial UML profile for DDMM
Future Work
main focus: implementation of model transformations for eventually
deriving MSA code from profile-based models
transformation of Bounded Contexts into services with deriving
interfaces from context associations
Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 17

More Related Content

Similar to Towards a UML Profile for Domain-driven Design of Microservice Architectures

Best Practices in Object Oriented Analysis and Design
Best Practices in Object Oriented Analysis and DesignBest Practices in Object Oriented Analysis and Design
Best Practices in Object Oriented Analysis and Designnguyencraft01
 
Developing Tools for “What if…” Testing of Large-scale Software Systems
Developing Tools for “What if…” Testing of Large-scale Software SystemsDeveloping Tools for “What if…” Testing of Large-scale Software Systems
Developing Tools for “What if…” Testing of Large-scale Software Systems James Hill
 
PhD defense: David Ameller
PhD defense: David AmellerPhD defense: David Ameller
PhD defense: David AmellerDavid Ameller
 
SADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfSADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfB.T.L.I.T
 
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015Luca Berardinelli
 
Introduction To Uml
Introduction To UmlIntroduction To Uml
Introduction To Umlguest514814
 
Crafted Design - LJC World Tour Mash Up 2014
Crafted Design - LJC World Tour Mash Up 2014Crafted Design - LJC World Tour Mash Up 2014
Crafted Design - LJC World Tour Mash Up 2014Sandro Mancuso
 
Application Of UML In Real-Time Embedded Systems
Application Of UML In Real-Time Embedded SystemsApplication Of UML In Real-Time Embedded Systems
Application Of UML In Real-Time Embedded Systemsijseajournal
 
A practical approach for model based slicing
A practical approach for model based slicingA practical approach for model based slicing
A practical approach for model based slicingIOSR Journals
 
Domain Modelling
Domain ModellingDomain Modelling
Domain Modellingkim.mens
 
SodiusCassidianmdday2010 101129081449-phpapp02
SodiusCassidianmdday2010 101129081449-phpapp02SodiusCassidianmdday2010 101129081449-phpapp02
SodiusCassidianmdday2010 101129081449-phpapp02SodiusWillert
 
Giddings
GiddingsGiddings
Giddingsanesah
 
Uml diagram assignment help
Uml diagram assignment helpUml diagram assignment help
Uml diagram assignment helpsmithjonny9876
 

Similar to Towards a UML Profile for Domain-driven Design of Microservice Architectures (20)

Best Practices in Object Oriented Analysis and Design
Best Practices in Object Oriented Analysis and DesignBest Practices in Object Oriented Analysis and Design
Best Practices in Object Oriented Analysis and Design
 
Developing Tools for “What if…” Testing of Large-scale Software Systems
Developing Tools for “What if…” Testing of Large-scale Software SystemsDeveloping Tools for “What if…” Testing of Large-scale Software Systems
Developing Tools for “What if…” Testing of Large-scale Software Systems
 
Apostila UML
Apostila UMLApostila UML
Apostila UML
 
Software Patterns
Software PatternsSoftware Patterns
Software Patterns
 
Design engineering
Design engineeringDesign engineering
Design engineering
 
Design engineering
Design engineeringDesign engineering
Design engineering
 
PhD defense: David Ameller
PhD defense: David AmellerPhD defense: David Ameller
PhD defense: David Ameller
 
SADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdfSADP PPTs of all modules - Shanthi D.L.pdf
SADP PPTs of all modules - Shanthi D.L.pdf
 
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
UML Modeling and Profiling Lab - Advanced Software Engineering Course 2014/2015
 
Introduction To Uml
Introduction To UmlIntroduction To Uml
Introduction To Uml
 
Architecture & TYPO3
Architecture & TYPO3Architecture & TYPO3
Architecture & TYPO3
 
Sw Software Design
Sw Software DesignSw Software Design
Sw Software Design
 
Crafted Design - LJC World Tour Mash Up 2014
Crafted Design - LJC World Tour Mash Up 2014Crafted Design - LJC World Tour Mash Up 2014
Crafted Design - LJC World Tour Mash Up 2014
 
Application Of UML In Real-Time Embedded Systems
Application Of UML In Real-Time Embedded SystemsApplication Of UML In Real-Time Embedded Systems
Application Of UML In Real-Time Embedded Systems
 
A practical approach for model based slicing
A practical approach for model based slicingA practical approach for model based slicing
A practical approach for model based slicing
 
Domain Modelling
Domain ModellingDomain Modelling
Domain Modelling
 
SodiusCassidianmdday2010 101129081449-phpapp02
SodiusCassidianmdday2010 101129081449-phpapp02SodiusCassidianmdday2010 101129081449-phpapp02
SodiusCassidianmdday2010 101129081449-phpapp02
 
architectural.ppt
architectural.pptarchitectural.ppt
architectural.ppt
 
Giddings
GiddingsGiddings
Giddings
 
Uml diagram assignment help
Uml diagram assignment helpUml diagram assignment help
Uml diagram assignment help
 

Recently uploaded

OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024innovationoecd
 
User Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationUser Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationColumbia Weather Systems
 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptArshadWarsi13
 
Bioteknologi kelas 10 kumer smapsa .pptx
Bioteknologi kelas 10 kumer smapsa .pptxBioteknologi kelas 10 kumer smapsa .pptx
Bioteknologi kelas 10 kumer smapsa .pptx023NiWayanAnggiSriWa
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxMurugaveni B
 
Environmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial BiosensorEnvironmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial Biosensorsonawaneprad
 
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPirithiRaju
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationColumbia Weather Systems
 
User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)Columbia Weather Systems
 
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.PraveenaKalaiselvan1
 
Microteaching on terms used in filtration .Pharmaceutical Engineering
Microteaching on terms used in filtration .Pharmaceutical EngineeringMicroteaching on terms used in filtration .Pharmaceutical Engineering
Microteaching on terms used in filtration .Pharmaceutical EngineeringPrajakta Shinde
 
Functional group interconversions(oxidation reduction)
Functional group interconversions(oxidation reduction)Functional group interconversions(oxidation reduction)
Functional group interconversions(oxidation reduction)itwameryclare
 
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...Universidade Federal de Sergipe - UFS
 
Pests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPirithiRaju
 
《Queensland毕业文凭-昆士兰大学毕业证成绩单》
《Queensland毕业文凭-昆士兰大学毕业证成绩单》《Queensland毕业文凭-昆士兰大学毕业证成绩单》
《Queensland毕业文凭-昆士兰大学毕业证成绩单》rnrncn29
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxpriyankatabhane
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentationtahreemzahra82
 
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPirithiRaju
 

Recently uploaded (20)

OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024OECD bibliometric indicators: Selected highlights, April 2024
OECD bibliometric indicators: Selected highlights, April 2024
 
User Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather StationUser Guide: Capricorn FLX™ Weather Station
User Guide: Capricorn FLX™ Weather Station
 
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort ServiceHot Sexy call girls in  Moti Nagar,🔝 9953056974 🔝 escort Service
Hot Sexy call girls in Moti Nagar,🔝 9953056974 🔝 escort Service
 
Transposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.pptTransposable elements in prokaryotes.ppt
Transposable elements in prokaryotes.ppt
 
Bioteknologi kelas 10 kumer smapsa .pptx
Bioteknologi kelas 10 kumer smapsa .pptxBioteknologi kelas 10 kumer smapsa .pptx
Bioteknologi kelas 10 kumer smapsa .pptx
 
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptxSTOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
STOPPED FLOW METHOD & APPLICATION MURUGAVENI B.pptx
 
Environmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial BiosensorEnvironmental Biotechnology Topic:- Microbial Biosensor
Environmental Biotechnology Topic:- Microbial Biosensor
 
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdfPests of soyabean_Binomics_IdentificationDr.UPR.pdf
Pests of soyabean_Binomics_IdentificationDr.UPR.pdf
 
User Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather StationUser Guide: Magellan MX™ Weather Station
User Guide: Magellan MX™ Weather Station
 
User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)User Guide: Orion™ Weather Station (Columbia Weather Systems)
User Guide: Orion™ Weather Station (Columbia Weather Systems)
 
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
BIOETHICS IN RECOMBINANT DNA TECHNOLOGY.
 
Microteaching on terms used in filtration .Pharmaceutical Engineering
Microteaching on terms used in filtration .Pharmaceutical EngineeringMicroteaching on terms used in filtration .Pharmaceutical Engineering
Microteaching on terms used in filtration .Pharmaceutical Engineering
 
Volatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -IVolatile Oils Pharmacognosy And Phytochemistry -I
Volatile Oils Pharmacognosy And Phytochemistry -I
 
Functional group interconversions(oxidation reduction)
Functional group interconversions(oxidation reduction)Functional group interconversions(oxidation reduction)
Functional group interconversions(oxidation reduction)
 
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
REVISTA DE BIOLOGIA E CIÊNCIAS DA TERRA ISSN 1519-5228 - Artigo_Bioterra_V24_...
 
Pests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdfPests of castor_Binomics_Identification_Dr.UPR.pdf
Pests of castor_Binomics_Identification_Dr.UPR.pdf
 
《Queensland毕业文凭-昆士兰大学毕业证成绩单》
《Queensland毕业文凭-昆士兰大学毕业证成绩单》《Queensland毕业文凭-昆士兰大学毕业证成绩单》
《Queensland毕业文凭-昆士兰大学毕业证成绩单》
 
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptxMicrophone- characteristics,carbon microphone, dynamic microphone.pptx
Microphone- characteristics,carbon microphone, dynamic microphone.pptx
 
Harmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms PresentationHarmful and Useful Microorganisms Presentation
Harmful and Useful Microorganisms Presentation
 
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdfPests of safflower_Binomics_Identification_Dr.UPR.pdf
Pests of safflower_Binomics_Identification_Dr.UPR.pdf
 

Towards a UML Profile for Domain-driven Design of Microservice Architectures

  • 1. Towards a UML Profile for Domain-driven Design of Microservice Architectures Microservices 2017 Florian Rademacher University of Applied Sciences and Arts Dortmund Institute for Digital Transformation of Application and Living Domains florian.rademacher@fh-dortmund.de October 25, 2017 – Odense, Denmark
  • 2. Table of Contents 1 Introduction 2 Research Questions 3 Survey on UML Elements in Domain-driven Design 4 A UML Profile for Domain-driven Microservice Architecture Modeling 5 Conclusion and Future Work Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 1
  • 3. Table of Contents 1 Introduction 2 Research Questions 3 Survey on UML Elements in Domain-driven Design 4 A UML Profile for Domain-driven Microservice Architecture Modeling 5 Conclusion and Future Work Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 2
  • 4. The published Paper presentation of our paper “Towards a UML Profile for Domain-driven Design of Microservice Architectures” from this year’s Microservices: Science and Engineering Workshop (MSE@SEFM 2017) preprint available online (see the abstract at http://conf-micro.services for the link) Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 3
  • 5. Domain-driven Design Domain-driven Design (DDD) set of model-driven practices, techniques and principles for software design primary design drivers: application domain, concepts and concept relationships selected core principles ... capturing of domain knowledge in domain models ... collaborative modeling of domain experts and software engineers (⇒ ubiquitous language) Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 4
  • 6. Domain-driven Design Structural Domain Models selective abstractions of conceptual knowledge about a domain or relevant domain parts typically modeled as informal UML class diagrams with DDD patterns like Entity, Value Object, Aggregate, Repository role Cargo Aggregate * Customer Repository find by name(String) find by Customer ID(String) Cargo Repository find by Tracking ID(String) find by Customer ID(String) Delivery Specification Value Object arrival time Handling Event Entity completion time type Customer Entity name customer ID * * goal handled * Cargo Entity tracking ID Figure 1: Structural domain model with DDD patterns1 1 Evans, Domain-Driven Design, 2004. Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 5
  • 7. Domain-driven Design and Microservice Architecture DDD and MSA2 1 identification of Bounded Contexts and shared Value Objects in domain models 2 mapping of Bounded Contexts and shared Value Objects to functional Microservices and interfaces role Cargo Bounded Context Customer Shared Value Object customer ID Customer Bounded Context Cargo Aggregate * Customer Repository find by name(String) find by Customer ID(String) Cargo Repository find by Tracking ID(String) find by Customer ID(String) Delivery Specification Value Object arrival time Handling Event Entity completion time type Customer Entity name customer ID «use» * * goal handled * Cargo Entity tracking ID Figure 2: Domain model with Bounded Contexts and shared Value Object 2 Newman, Building Microservices, 2015. Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 6
  • 8. Domain-driven Design and Microservice Architecture Limitation: DDD is rather informal DDD patterns lack formal, UML-based foundation DDD patterns differ in notation ⇒ prevention of structured model operations like model transformation or semantic validation ⇒ decrease of models’ possible value Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 7
  • 9. Table of Contents 1 Introduction 2 Research Questions 3 Survey on UML Elements in Domain-driven Design 4 A UML Profile for Domain-driven Microservice Architecture Modeling 5 Conclusion and Future Work Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 8
  • 10. Research Questions RQ 1 Next to DDD patterns, which basic modeling constructs need to be supported for Domain-driven Microservice Architecture Modeling (DDMM)? RQ 2.1 How can UML’s profile mechanism be utilized to support DDMM? RQ 2.2 Which basic model transformations need to be supported for DDMM? Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 9
  • 11. Table of Contents 1 Introduction 2 Research Questions 3 Survey on UML Elements in Domain-driven Design 4 A UML Profile for Domain-driven Microservice Architecture Modeling 5 Conclusion and Future Work Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 10
  • 12. Survey on UML Elements in DDD Survey on UML Elements in DDD survey of 92 UML class diagrams3 representing real-world structural domain models results (UML-conform elements only): # Element Category Occurrence Count 1 Class Classes 92 (100%) 2 Attribute Attributes 72 (78.26%) 3 Multiplicity Multiplicities 67 (72.82%) 4 Non-navigable Association Associations 58 (63.04%) 5 Method Methods 49 (53.26%) 6 Unidirectional Navigable Association Associations 36 (39.13%) 7 Non-navigable Aggregation Associations 28 (30.43%) 8 “extends” Relationship (Inheritance) Associations 23 (25%) 9 Informal Constraint Constraints 13 (14.13%) 10 Unidirectional Navigable Aggregation Associations 11 (11.95%) 11 Formal Constraint Constraints 6 (6.52%) 12 Semi-formal Constraint Constraints 3 (3.26%) 13 Class Dependency Associations 2 (2.17%) Table 1: Results of surveying UML elements of structural domain models 3 from Evans, Domain-Driven Design, 2004. Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 11
  • 13. Survey on UML Elements in DDD Survey on UML Elements in DDD survey of 92 UML class diagrams3 representing real-world structural domain models results (UML-conform elements only): # Element Category Occurrence Count 1 Class Classes 92 (100%) 2 Attribute Attributes 72 (78.26%) 3 Multiplicity Multiplicities 67 (72.82%) 4 Non-navigable Association Associations 58 (63.04%) 5 Method Methods 49 (53.26%) 6 Unidirectional Navigable Association Associations 36 (39.13%) 7 Non-navigable Aggregation Associations 28 (30.43%) 8 “extends” Relationship (Inheritance) Associations 23 (25%) 9 Informal Constraint Constraints 13 (14.13%) 10 Unidirectional Navigable Aggregation Associations 11 (11.95%) 11 Formal Constraint Constraints 6 (6.52%) 12 Semi-formal Constraint Constraints 3 (3.26%) 13 Class Dependency Associations 2 (2.17%) Table 1: Results of surveying UML elements of structural domain models 3 from Evans, Domain-Driven Design, 2004. Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 11
  • 14. Survey on UML Elements in DDD Survey on UML Elements in DDD survey of 92 UML class diagrams3 representing real-world structural domain models results (UML-conform elements only): # Element Category Occurrence Count 1 Class Classes 92 (100%) 2 Attribute Attributes 72 (78.26%) 3 Multiplicity Multiplicities 67 (72.82%) 4 Non-navigable Association Associations 58 (63.04%) 5 Method Methods 49 (53.26%) 6 Unidirectional Navigable Association Associations 36 (39.13%) 7 Non-navigable Aggregation Associations 28 (30.43%) 8 “extends” Relationship (Inheritance) Associations 23 (25%) 9 Informal Constraint Constraints 13 (14.13%) 10 Unidirectional Navigable Aggregation Associations 11 (11.95%) 11 Formal Constraint Constraints 6 (6.52%) 12 Semi-formal Constraint Constraints 3 (3.26%) 13 Class Dependency Associations 2 (2.17%) Table 1: Results of surveying UML elements of structural domain models 3 from Evans, Domain-Driven Design, 2004. Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 11
  • 15. Survey on UML Elements in DDD Survey on UML Elements in DDD survey of 92 UML class diagrams3 representing real-world structural domain models results (UML-conform elements only): # Element Category Occurrence Count 1 Class Classes 92 (100%) 2 Attribute Attributes 72 (78.26%) 3 Multiplicity Multiplicities 67 (72.82%) 4 Non-navigable Association Associations 58 (63.04%) 5 Method Methods 49 (53.26%) 6 Unidirectional Navigable Association Associations 36 (39.13%) 7 Non-navigable Aggregation Associations 28 (30.43%) 8 “extends” Relationship (Inheritance) Associations 23 (25%) 9 Informal Constraint Constraints 13 (14.13%) 10 Unidirectional Navigable Aggregation Associations 11 (11.95%) 11 Formal Constraint Constraints 6 (6.52%) 12 Semi-formal Constraint Constraints 3 (3.26%) 13 Class Dependency Associations 2 (2.17%) Table 1: Results of surveying UML elements of structural domain models 3 from Evans, Domain-Driven Design, 2004. Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 11
  • 16. Survey on UML Elements in DDD Survey on UML Elements in DDD survey of 92 UML class diagrams3 representing real-world structural domain models results (UML-conform elements only): # Element Category Occurrence Count 1 Class Classes 92 (100%) 2 Attribute Attributes 72 (78.26%) 3 Multiplicity Multiplicities 67 (72.82%) 4 Non-navigable Association Associations 58 (63.04%) 5 Method Methods 49 (53.26%) 6 Unidirectional Navigable Association Associations 36 (39.13%) 7 Non-navigable Aggregation Associations 28 (30.43%) 8 “extends” Relationship (Inheritance) Associations 23 (25%) 9 Informal Constraint Constraints 13 (14.13%) 10 Unidirectional Navigable Aggregation Associations 11 (11.95%) 11 Formal Constraint Constraints 6 (6.52%) 12 Semi-formal Constraint Constraints 3 (3.26%) 13 Class Dependency Associations 2 (2.17%) Table 1: Results of surveying UML elements of structural domain models 3 from Evans, Domain-Driven Design, 2004. Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 11
  • 17. Survey on UML Elements in DDD Survey on UML Elements in DDD survey of 92 UML class diagrams3 representing real-world structural domain models results (UML-conform elements only): # Element Category Occurrence Count 1 Class Classes 92 (100%) 2 Attribute Attributes 72 (78.26%) 3 Multiplicity Multiplicities 67 (72.82%) 4 Non-navigable Association Associations 58 (63.04%) 5 Method Methods 49 (53.26%) 6 Unidirectional Navigable Association Associations 36 (39.13%) 7 Non-navigable Aggregation Associations 28 (30.43%) 8 “extends” Relationship (Inheritance) Associations 23 (25%) 9 Informal Constraint Constraints 13 (14.13%) 10 Unidirectional Navigable Aggregation Associations 11 (11.95%) 11 Formal Constraint Constraints 6 (6.52%) 12 Semi-formal Constraint Constraints 3 (3.26%) 13 Class Dependency Associations 2 (2.17%) Table 1: Results of surveying UML elements of structural domain models 3 from Evans, Domain-Driven Design, 2004. Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 11
  • 18. Table of Contents 1 Introduction 2 Research Questions 3 Survey on UML Elements in Domain-driven Design 4 A UML Profile for Domain-driven Microservice Architecture Modeling 5 Conclusion and Future Work Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 12
  • 19. A UML Profile for Domain-driven MSA Modeling A UML Profile for Domain-driven MSA Modeling stereotypes for DDD patterns as extensions to UML metaclasses «Stereotype» Module «Stereotype» AggregatePart aggregateRoot : Class «Stereotype» AggregateRoot «Stereotype» BoundedContext «Metaclass» Package «Stereotype» Closure «Stereotype» SideEffectFree «Stereotype» ValidatesSpec «Stereotype» Spec «Stereotype» Repository «Stereotype» Entity «Stereotype» Service «Stereotype» DefinesIdentity «Stereotype» ValueObject immutable : Boolean «Metaclass» Property «Metaclass» Operation «Metaclass» Class Figure 3: The UML profile’s stereotypes for DDD patterns Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 13
  • 20. A UML Profile for Domain-driven MSA Modeling A UML Profile for Domain-driven MSA Modeling OCL constraints to ensure intended usage of pattern stereotypes Stereotype Constraints based on UML Metamodel AggregatePart C1: Only Entities and Value Objects may be Aggregate parts C2: Assigned Aggregate root must have AggregateRoot stereotype C3: No incoming Associations from outside the Aggregate C4: Must be in same Bounded Context as Aggregate root AggregateRoot C5: Only Entities may be Aggregate roots C6: Aggregate must contain at least one part Entity C7: One Operation or at least one Property defines the identity Repository C8: Class has no other stereotypes C9: Class contains only Operations and at least one C10: Outgoing Associations must point to Entities or Value Objects DefinesIdentity C19: Must not be specification validation Operation C20: May only be applied within Entities BoundedContext C24: Must not have Module stereotype C25: Must not be nested, i.e. part of another Package Table 2: Selected stereotype constraints Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 14
  • 21. A UML Profile for Domain-driven MSA Modeling Mapping profile-based models to MSA implementation determination of Microservice interfaces from Bounded Contexts on the basis of context associations associated context-external concepts or shared Value Objects as signature types DDD patterns Repository or Service for explicit interface operation definition open question 1: How to specify technical characteristics? open question 2: Which concrete operation of Repository or Service shall be used? open question 3: Which concrete shared Value Object shall be used? Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 15
  • 22. Table of Contents 1 Introduction 2 Research Questions 3 Survey on UML Elements in Domain-driven Design 4 A UML Profile for Domain-driven Microservice Architecture Modeling 5 Conclusion and Future Work Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 16
  • 23. Conclusion and Future Work Conclusion characterization of DDD by means of a literature survey with 92 structural domain models initial UML profile for DDMM Future Work main focus: implementation of model transformations for eventually deriving MSA code from profile-based models transformation of Bounded Contexts into services with deriving interfaces from context associations Florian Rademacher Towards a UML Profile for Domain-driven Design of MSAs 17