apidays LIVE Paris - Responding to the New Normal with APIs for Business, People and Society
December 8, 9 & 10, 2020
Drawing the right lines: DDD, APIs and Microservices
Ronnie Mitra, Director of Technology at Publicis Sapient
3. OUR SCALE OUR CLIENTS
PUBLICIS GROUPE
20,000
Passionate People
50+
Offices Globally Connected
30
Years of Digital Pioneering
and Customer Innovation
YOU
We are the
Digital Business
Transformation
hub of Publicis
Groupe
THE POWER OF ONE
RECOGNISED AS
INDUSTRY LEADERS
DEEP INDUSTRY EXPERTISE
Consumer Products, Energy & Commodities, Financial Services, Health, Public Sector, Retail, Telco/Media/Technology, Transportation & Mobility, Travel & Hospitality
A Leader in the Forrester WaveTM:
Global Digital Business Transformation
Accelerators, Q1 2019
Publicis Sapient | Digital Business Transformation
5. 5
APIs and microservices
have boundaries, structures
and hierarchies
Determining what belongs
inside is the challenge of
drawing the right lines. Example from MS Up and Running
6. Eric Evans:
Domain-Driven
Design
A simple and elegant
vision
Find the ubiquitous
language
Use model driven
development
Communicate with the
language of DDD
6
But, it’s hard to pull off.
7. In practice, there
are three areas
you need to get
right for your
boundaries to
work
7
Situational Assessment
Where are you and what can you do?
Initial Design
What does the first model look like?
Model Realisation
How do you breathe life into the model?
8. Situational Assessment
2
Situational Assessment
1
Situational Assessment
3
8
gauge the
culture
find the true
focus
explore what’s
already there
• How big is the org?
• How adaptable are the
teams?
• What are the politics?
• What drives behaviour
and decisions?
• What are the *primary*
optimisation goals?
• What is the *core*
business?
• What are the pains that
the business is trying to
relieve?
• What models or
architectures have been
designed previously?
• What exists in the
industry?
• What does the code
and org structure look
like?
9. Initial Model Design
2
Initial Model Design
1
Initial Model Design
3
9
design rapidly use tools and
processes
find a strong
facilitator
• The first model needs to
be developed quickly
• Constrain the scope –
try to focus on software
• Get into a “test and
validate” cycle as
quickly as possible
Lots of tools and methods
to use:
• Event storming
• Event modelling
• Microservice Canvas
• Context Mapping
• Interview and analysis
• Service design
• The tools won’t make
the decisions for you
• More than a workshop
host
• Requires experience to
pull the right questions
out and gain consensus
to move forward
10. Design in the Covid World
Apply for
product
Update
Account
Details
Get eligible
proeducts
Create account
(gen. iban, sort
code, etc)
Update
Mortgage
Details
Send welcome
pack Link an
account with
customer
record
ID&V Check
ID Document
submission
Verify
Evidence
(manual)
Ongoing KYC
trigger check
Evidence
required check
Update KYC
check criteria
Search for
Customer
Capture
Customer Info
Bereau
Check
(customer
exists at
address)
Create
prospect
customer
Customer KYC
status
Update
Customer
Prospect
Status
Activate
customer
Update
address
Update name
Communicate
with customer
Link an
account with
customer
record
Update
Payment
Details
Issue Card
Issue
Checkbook
Request card
Request
chequebook
Sanctions
check triggered
Sanctions
checked
Sanctions
assertions
validated
Sanctions
alerts raised
Sanctions
check
completed
Authentication
process
selected
Payment Fraud
risk detected
Step-up auth
need
determined
Fraud decision
made
call recording
stopped
call recording
startedCall recorded
safely
Verify
customer
(login)
omnichannel
Create
Credentials
Domain design can require intensive collaboration.
This is difficult to achieve remotely.
Tips:
1. Use collaboration tools if you can (e.g. Mural,
Miro, etc)
2. Supplement collaborative sessions with ”pre-
work”: interviews in smaller groups, analysis,
homework
3. Plan for this work to take longer and put in the
effort to be transparent and inclusive.
11. Realising the model
2
Realising the model
1
Realising the model
3
11
express it in the
architecture
express it in the
organisation
design it for
change
• Define an initial set of
architectural principles
tied to the model
• Identify how the model
boundaries translate to
the API/MS code
• Translate context maps
into arch examples
• Define an initial set of
organization principles
• Map domain boundaries
to team boundaries
• Use coordination
models to bring the
boundaries to life (e.g.
Team Topologies)
• Define KPIs/measures
for boundary changes
now
• Document how
components can be split
and merged
• Define inclusion and
exclusion properties for
each boundary
12. Putting it all together
12
Get context and focus
quickly
Make decisions in key
areas
Initial domain boundaries
Domain structures
Core and generic domains
Context Mapping
Doman Implementation
Integration Patterns
Data Patterns
Team structures
Evolutionary principles
Domain Model
Organizational
Delivery Model
Modular Software
Architecture
Domain Model
Bring the model to life
through expression in
your solution
Optimisation goals
Existing models
Business focus