SlideShare a Scribd company logo
Serverless Domain-Driven
Design
At last some productivity
Asher Sterkin
asher.sterkin@gmail.com
Serverless Meetup
April 25, 2017, Tel-Aviv
About Myself
● Close to 40 years of experience in the software technology field
● VP Technology, Chief Technology Advisor Group, NDS (2010 - 2012)
● Distinguished Engineer, Office of CTO, Cisco Engineering (2012 - 2016)
● Today CTO at IRKI
● Focusing on software product line strategy
○ Lean Startup
○ Wardley Maps
○ (Strategic) Domain-Driven Design
○ Cynefin
○ Promise Theory
○ Serverless Architecture
○ ...
Metallic Sage Green Luster,
Opaque Metallic Matte
Galvanized SF Pink Blush,
Opaque Galvanized
Semi-Matte
Metallic Dark Raspberry
Iris,
Opaque Metallic Matte
Light Olive Luster,
Opaque Metallic Matte
Serverless ←→ DDD
● DDD & Microservices
● Serverless → DDD
○ Strategic DDD
○ Tactical DDD
○ Serverless AI → DDD
● Serverless ← DDD
● Serverless DDD → Productivity
Video, Slides
Key Messages
Domain Model
Ubiquitous Language
Bounded Context
Permeable Context Boundaries Result in BBoM
Symptoms of Rotting Design
● Rigidity - hard to change
● Fragility - easy to break
● Immobility - hard to reuse
● Viscosity - hard to do the right thing
● Opacity - disorganized expression
● ...
10
4+1 View of Software Architecture
Conceptual Physical
Process View Deployment View
Logical View
Use-Case View
Implementation View
End-user
Functionality
Programmers
Software management
Performance
Scalability
Throughput
System integrators
System topology
Delivery, installation
communication
System engineering
Analysts/Designers
Structure
P. Krutchen, “Architectural Blueprints - The “4+1” View Model of Software Architecture
11
4+1 View of Software Architecture
Conceptual Physical
Process View Deployment View
Logical View
Use-Case View
Implementation View
End-user
Functionality
Programmers
Software management
Performance
Scalability
Throughput
System integrators
System topology
Delivery, installation
communication
System engineering
Analysts/Designers
Structure
Bounded Context → Microservice
Serverless → Strategic
DDD
Strategic Domain-Driven Design
Vernon Vaughn, “Implementing Domain-Driven Design”
Strategic Domain-Driven Design
Strategic Domain-Driven Design
Fashion Accessories
Strategic Domain-Driven Design
Fashion Accessories
Strategic Domain-Driven Design
Fashion Accessories
Disorder
Disorder
Disorder
Pull Up/Push Down
Pull up useful
abstractions
Push down support and
generic stuff; control
through OSS contributions
Fashion Accessories
There is no ideal
core domain model
sitting and waiting to
be discovered.
It’s more like
attractor gradually
emerging out of
multiple “safe-to-fail”
experimentations
Strategic Domain-Driven Design
● Compute
● Network
● Storage
● Intelligence
Serverless
● 2D Shape
● 3D Shape
● ...
Geometry
● Color
● ...
Graphics
Microservice = CF Stack?
ERP, CRM,
SCM, PLM,
ECM, CAD, ...
Taxes
Shipment
Web Site
Inventory
....
Fashion Accessories
Strategic Domain-Driven Design
● Compute
● Network
● Storage
● Intelligence
Serverless BC
● 2D Shape
● 3D Shape
● ...
Geometry
● Color
● ...
Graphics
Microservice = CF Stack?
ERP, CRM,
SCM, PLM,
ECM, ...
Taxes
Shipment
Web Site
Inventory
....
Fashion Accessories
Strategic Domain-Driven Design
● Compute
● Network
● Storage
● Intelligence
Serverless BC
● 2D Shape
● 3D Shape
● ...
Geometry
● Color
● ...
Graphics
Microservice = CF Stack?
ERP, CRM,
SCM, PLM,
ECM, ...
Taxes
Shipment
Web Site
Inventory
....
Fashion Accessories
Strategic Domain-Driven Design
● 2D Shape
● 3D Shape
● ...
Geometry
● Color
● ...
Graphics
● Compute
● Network
● Storage
● Intelligence
Serverless BC
Microservice = CF Stack?
ERP, CRM,
SCM, PLM,
ECM, ...
Taxes
Shipment
Web Site
Inventory
....
Fashion Accessories
...
Context Map is the Key
● 2D Shape
● 3D Shape
● ...
Geometry
● Color
● ...
Graphics
● Compute
● Network
● Storage
● Intelligence
Serverless BC
Microservice = CF Stack?
ERP, CRM,
SCM, PLM,
ECM, ...
Taxes
Shipment
Web Site
Inventory
....
Fashion Accessories
...
ACL
ACL
ACL
Emerging Core
Domain so Far
Types
Components Products
Inventory
Items Customers
Manufacturers
Vendors
Catalog
Items
Shapes
Colors
Pictures
Amazon is Eating Software ...
valuechain
evolutionG C P U
eTailer
Service
AIaaS
FaaS
PaaS
IaaS
SCM
...
Web Scale
Operation
New
Service
Amazon is Eating Software ...
valuechain
evolutionG C P U
Video
Service
AIaaS
FaaS
PaaS
IaaS
Recommendations
...
Cloud
Native
Ability to build a Web Scale Application is
not a differentiator anymore!
Serverless Strategic DDD
Prefer utility AIaaS
Prefer product
or utility SaaS
Major effort
Pull up useful
abstractions
Proper timing for API
Push down support and
generic stuff; control
through OSS contributions
Serverless → Tactical
DDD
Bounded Context
Tactical DDD Patterns
Domain Model
Ubiquitous Language Nouns, Adjectives, Imperative Verbs, Interrogative Verbs, Perfect Tense Verbs
Entities, Values, Commands, Queries, Events, Aggregates, Repository,
Computational Services, Factories, ACL, Saga (Process Manager)
Serverless Cloud
Environment
Repository
Strong Transaction
Consistency + Invariant
DDD Aggregate and Repository
<<Aggregate Root>>
Entity
Entity Value
Value
Eventual
Transaction
Consistency
Storage
Command/
Query
Request
Processor
Command or Query
Requests
Domain Events
(AWS) Serverless DDD Patterns
● Repository
○ CRUD
○ CQRS
○ CQRS/ES
○ CQRS/ES IoT Scale
● Computation Service
○ Function
○ Batch
○ Map/Reduce
● Saga (Process Manager)
Default Serverless DDD Repository (CRUD)
DynamoDB Streams
Command/Query
Handler
Domain Event
Handler
Strong vs. Eventual Consistency
Bead Shape
Bead Color
Bead
Product Type
Component Type
Serverless DDD Repository (CQRS)
DynamoDB Streams
Command Handler Query View Builder
Query Handler
● Ad-hoc vs. precomputed
● Inter- vs. Intra Aggregate
Query View Store
SOT Store
● Command vs. Query
Storage optimization
● Query interface
complexity
Bead Color/Shape Compatibility
Serverless DDD Repository (CQRS/ES)
DynamoDB Streams
Command Handler Projection Builders
Query Handler
● Ad-hoc vs. precomputed
● Inter- vs. Intra Aggregate
Query View Store
Event Store
Snapshot Store
● Immutability
● Auditing
Product Spec
Product/Component Inventory
Event Store Patterns
● State Change Events (git style)
● Measurement/Observation (telemetry)
● Transaction/Account/Entry (accounting)
● Meaningful Domain Events
Snapshot Store Patterns
● Most Recent State
● State Change History
● Multiple Worlds
Serverless DDD Repository (CQRS/ES IoT Scale)
Edge
Command/Event
Handler
Cloud
Command/Event
Handler
Thing Event Stream
Thing Event Handlers
Thing Snapshot View
Thing Projection Builder
Thing Event Store
Serverless DDD Computation Services
Command/Query/Event
Handler
Computation Service
Bead Color/Shape Permutations
Bead Color
Bead Shape
Bead Component
Most popular products
Most popular colors per country
Minimal inventory level per product
...
Serverless DDD Saga (Process Manager)
Product Picture Album Building
Raw Pictures Catalog Pictures
Product Catalog
Background Cleanup Color/Light Adjustments Resolution Transcoding
Serverless AI → DDD
ignore AI
Irrelevance
adopt AI
Wasted time
and resources
Serverless DDD AI Patterns
● Pereferrial Adapters: audio, video, picture, text
● Application Services: dynamic state machines
● Command/Query Request Processors: classification, matching
● Event Handlers: anomaly detection
● Computation Services: analysis, generation, transformation, optimization
● Batch Processing: feedback and learning
Serverless AI ← DDD
Pereferrial Adapters Application Services
Dynamic State
Machines
Application-level Stimulo
Domain Services
Command/Query Requests EventsRaw A/V/T
Inputs
Dynamic
Classifications
Anomaly
Detection
Event Processors
Feedback and
Training
Pinterest/Instagram/Facebook/Twitter Feedback Processing
Best Earrings Match
Best Necklace Match
Historical
Data
Serverless → DDD
What is Missing?
Serverless → DDD Wish List
● Support for Actor Model
● Support for Reactive Programming
● JavaScript, JSON and YAML are (cloud) machine-level languages - need something at higher
level
● Simple modeling tool (lightweight UML)
● Fully fledged IDE supporting above
● Support for Semantic Maps (kind of AI service)
Serverless ← DDD
Serverless
Creating this
mess from
Lambda
Functions
would not
make it better
DDD for Serverless
Use DDD Strategic and Tactical
patterns as Serverless Architecture
organizing principles to prevent
ending with just a distributed version
of BBoM.
One who increases flesh, increases worms; one who
increases possessions, increases worry; one who
increases wives, increases witchcraft; one who increases
maidservants, increases promiscuity; one who increases
man-servants, increases thievery;
Pirkey Avot Chapter 2/7
‫כשפים‬ ‫מרבה‬ ‫נשים‬ ‫מרבה‬ .‫דאגה‬ ‫מרבה‬ ‫נכסים‬ ‫מרבה‬ .‫רימה‬ ‫מרבה‬ ‫בשר‬ ‫.מרבה‬
‫גזל‬ ‫מרבה‬ ‫עבדים‬ ‫מרבה‬ .‫זימה‬ ‫מרבה‬ ‫שפחות‬ ‫מרבה‬
Kohelet Chapter 1/18
18For in much wisdom is much vexation, and he who increases knowledge,
increases pain.
:‫ְאוֹב‬‫כ‬ַ‫מ‬ ‫ִיף‬‫ס‬‫יוֹ‬ ‫ַת‬‫ע‬ַ‫דּ‬ ‫ִיף‬‫ס‬‫ְיוֹ‬‫ו‬ ‫ַס‬‫ע‬ָ‫כּ‬ ‫ב‬ ָ‫ר‬ ‫ָה‬‫מ‬ְ‫כ‬ָ‫ח‬ ‫ֹב‬ ‫ְר‬‫בּ‬ ‫ִי‬‫כּ‬‫יח‬
Too Many Moving Parts
...
DDD for Serverless
Treat ‘em all as Aggregate
Repositories within the
corresponding Bounded Context of
Generic Infrastructure Sub-Domain
At Last Some Productivity
How to Measure Productivity?
● Lines of Code - well known anti-pattern
● Story Points - less well known anti-pattern (velocity is not productivity)
● Features - “feature train” (producing many features nobody needs)
● Value - too much depends on Product Owner; not under direct control
● Domain Insights - only domain experts could bring it → a lot of experimentation
“Software Development is a
Learning Process. Running code is
byproduct.”
A.Brandolini
“Consensus is poisonous
for innovation”
D. Snowden
The last slide

More Related Content

What's hot

TechnicalTerraformLandingZones121120229238.pdf
TechnicalTerraformLandingZones121120229238.pdfTechnicalTerraformLandingZones121120229238.pdf
TechnicalTerraformLandingZones121120229238.pdf
MIlton788007
 
Data Center Migration to the AWS Cloud
Data Center Migration to the AWS CloudData Center Migration to the AWS Cloud
Data Center Migration to the AWS Cloud
Tom Laszewski
 

What's hot (20)

Cloud First: New Architecture for New Infrastructure
Cloud First: New Architecture for New InfrastructureCloud First: New Architecture for New Infrastructure
Cloud First: New Architecture for New Infrastructure
 
Getting started on your AWS migration journey
Getting started on your AWS migration journeyGetting started on your AWS migration journey
Getting started on your AWS migration journey
 
AWS Containers Day.pdf
AWS Containers Day.pdfAWS Containers Day.pdf
AWS Containers Day.pdf
 
TechnicalTerraformLandingZones121120229238.pdf
TechnicalTerraformLandingZones121120229238.pdfTechnicalTerraformLandingZones121120229238.pdf
TechnicalTerraformLandingZones121120229238.pdf
 
AWS Builders - Industry Edition: DevSecOps on AWS - 시작은 IAM 부터
AWS Builders - Industry Edition: DevSecOps on AWS - 시작은 IAM 부터AWS Builders - Industry Edition: DevSecOps on AWS - 시작은 IAM 부터
AWS Builders - Industry Edition: DevSecOps on AWS - 시작은 IAM 부터
 
Domain Driven Design
Domain Driven DesignDomain Driven Design
Domain Driven Design
 
Designing loosely coupled services
Designing loosely coupled servicesDesigning loosely coupled services
Designing loosely coupled services
 
DDD - 1 - A gentle introduction to Domain Driven Design.pdf
DDD - 1 - A gentle introduction to Domain Driven Design.pdfDDD - 1 - A gentle introduction to Domain Driven Design.pdf
DDD - 1 - A gentle introduction to Domain Driven Design.pdf
 
Microservices: Decomposing Applications for Deployability and Scalability (ja...
Microservices: Decomposing Applications for Deployability and Scalability (ja...Microservices: Decomposing Applications for Deployability and Scalability (ja...
Microservices: Decomposing Applications for Deployability and Scalability (ja...
 
AWS CDK Introduction
AWS CDK IntroductionAWS CDK Introduction
AWS CDK Introduction
 
Cloud Migration, Application Modernization, and Security
Cloud Migration, Application Modernization, and Security Cloud Migration, Application Modernization, and Security
Cloud Migration, Application Modernization, and Security
 
Data Center Migration to the AWS Cloud
Data Center Migration to the AWS CloudData Center Migration to the AWS Cloud
Data Center Migration to the AWS Cloud
 
Are you Well-Architected?
Are you Well-Architected?Are you Well-Architected?
Are you Well-Architected?
 
Journey to Cloud: Fast Track to Azure
Journey to Cloud: Fast Track to AzureJourney to Cloud: Fast Track to Azure
Journey to Cloud: Fast Track to Azure
 
Domain Driven Design(DDD) Presentation
Domain Driven Design(DDD) PresentationDomain Driven Design(DDD) Presentation
Domain Driven Design(DDD) Presentation
 
Cloud Native In-Depth
Cloud Native In-DepthCloud Native In-Depth
Cloud Native In-Depth
 
Application Portfolio Migration
Application Portfolio MigrationApplication Portfolio Migration
Application Portfolio Migration
 
SAP Modernization with AWS
SAP Modernization with AWSSAP Modernization with AWS
SAP Modernization with AWS
 
Deconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven DesignDeconstructing Monoliths with Domain Driven Design
Deconstructing Monoliths with Domain Driven Design
 
Micro services Architecture
Micro services ArchitectureMicro services Architecture
Micro services Architecture
 

Viewers also liked

My Robot Can Learn -Using Reinforcement Learning to Teach my Robot
My Robot Can Learn -Using Reinforcement Learning to Teach my RobotMy Robot Can Learn -Using Reinforcement Learning to Teach my Robot
My Robot Can Learn -Using Reinforcement Learning to Teach my Robot
Rising Media Ltd.
 

Viewers also liked (20)

Data strategy in a Big Data world
Data strategy in a Big Data worldData strategy in a Big Data world
Data strategy in a Big Data world
 
Predictive Analytics World for Industry 4.0 Munich
Predictive Analytics World for Industry 4.0 MunichPredictive Analytics World for Industry 4.0 Munich
Predictive Analytics World for Industry 4.0 Munich
 
CNCF and Fujitsu
CNCF and FujitsuCNCF and Fujitsu
CNCF and Fujitsu
 
Predictive Analytics World for Business Deutschland 2017
Predictive Analytics World for Business Deutschland 2017Predictive Analytics World for Business Deutschland 2017
Predictive Analytics World for Business Deutschland 2017
 
Software strategy for startups
Software strategy for startupsSoftware strategy for startups
Software strategy for startups
 
My Robot Can Learn -Using Reinforcement Learning to Teach my Robot
My Robot Can Learn -Using Reinforcement Learning to Teach my RobotMy Robot Can Learn -Using Reinforcement Learning to Teach my Robot
My Robot Can Learn -Using Reinforcement Learning to Teach my Robot
 
Industrial Analytics and Predictive Maintenance 2017 - 2022
Industrial Analytics and Predictive Maintenance 2017 - 2022Industrial Analytics and Predictive Maintenance 2017 - 2022
Industrial Analytics and Predictive Maintenance 2017 - 2022
 
Predictive Analytics World Manufacturing Düsseldorf 2017 - EN
Predictive Analytics World Manufacturing Düsseldorf 2017 - ENPredictive Analytics World Manufacturing Düsseldorf 2017 - EN
Predictive Analytics World Manufacturing Düsseldorf 2017 - EN
 
Office of the Chief Data Officer. How is your office organized?
Office of the Chief Data Officer. How is your office organized?Office of the Chief Data Officer. How is your office organized?
Office of the Chief Data Officer. How is your office organized?
 
Chief Data Officer: Top Ten Learnings...
Chief Data Officer: Top Ten Learnings...Chief Data Officer: Top Ten Learnings...
Chief Data Officer: Top Ten Learnings...
 
Process Mining based on the Internet of Events
Process Mining based on the Internet of EventsProcess Mining based on the Internet of Events
Process Mining based on the Internet of Events
 
BDA310 An Introduction to the AI services at AWS
BDA310 An Introduction to the AI services at AWSBDA310 An Introduction to the AI services at AWS
BDA310 An Introduction to the AI services at AWS
 
Overview of IBM Watson Services via Blue Mix
Overview of IBM Watson Services via Blue Mix Overview of IBM Watson Services via Blue Mix
Overview of IBM Watson Services via Blue Mix
 
2分で分かる富士通クラウドWebセミナー
2分で分かる富士通クラウドWebセミナー2分で分かる富士通クラウドWebセミナー
2分で分かる富士通クラウドWebセミナー
 
How does semantic technology work?
How does semantic technology work? How does semantic technology work?
How does semantic technology work?
 
Chief Data Officer: DataOps - Transformation of the Business Data Environment
Chief Data Officer: DataOps - Transformation of the Business Data EnvironmentChief Data Officer: DataOps - Transformation of the Business Data Environment
Chief Data Officer: DataOps - Transformation of the Business Data Environment
 
IoT and AI Services in Healthcare | AWS Public Sector Summit 2017
 IoT and AI Services in Healthcare | AWS Public Sector Summit 2017 IoT and AI Services in Healthcare | AWS Public Sector Summit 2017
IoT and AI Services in Healthcare | AWS Public Sector Summit 2017
 
Strategy toolbox for startsups
Strategy toolbox for startsupsStrategy toolbox for startsups
Strategy toolbox for startsups
 
Overview of Microsoft Azure AI Services
Overview of Microsoft Azure AI ServicesOverview of Microsoft Azure AI Services
Overview of Microsoft Azure AI Services
 
Compared: IBM Watson Services / Microsoft Azure Services
Compared: IBM Watson Services / Microsoft Azure ServicesCompared: IBM Watson Services / Microsoft Azure Services
Compared: IBM Watson Services / Microsoft Azure Services
 

Similar to Serverless ddd

Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3  Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3
Omid Vahdaty
 
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
Omid Vahdaty
 
How to combine Db2 on Z, IBM Db2 Analytics Accelerator and IBM Machine Learni...
How to combine Db2 on Z, IBM Db2 Analytics Accelerator and IBM Machine Learni...How to combine Db2 on Z, IBM Db2 Analytics Accelerator and IBM Machine Learni...
How to combine Db2 on Z, IBM Db2 Analytics Accelerator and IBM Machine Learni...
Gustav Lundström
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
David Galeano
 
From Flat to Stacked - Alicia C Newberry - City of Milton
From Flat to Stacked - Alicia C Newberry - City of MiltonFrom Flat to Stacked - Alicia C Newberry - City of Milton
From Flat to Stacked - Alicia C Newberry - City of Milton
Alicia Newberry
 

Similar to Serverless ddd (20)

Domain driven design: a gentle introduction
Domain driven design:  a gentle introductionDomain driven design:  a gentle introduction
Domain driven design: a gentle introduction
 
AI as a service
AI as a serviceAI as a service
AI as a service
 
Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3  Big Data in 200 km/h | AWS Big Data Demystified #1.3
Big Data in 200 km/h | AWS Big Data Demystified #1.3
 
WSO2Con USA 2015: An Introduction to the WSO2 Analytics Platform
WSO2Con USA 2015: An Introduction to the WSO2 Analytics PlatformWSO2Con USA 2015: An Introduction to the WSO2 Analytics Platform
WSO2Con USA 2015: An Introduction to the WSO2 Analytics Platform
 
AWS vs Azure vs Google (GCP) - Slides
AWS vs Azure vs Google (GCP) - SlidesAWS vs Azure vs Google (GCP) - Slides
AWS vs Azure vs Google (GCP) - Slides
 
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
AWS Big Data Demystified #1.2 | Big Data architecture lessons learned
 
Worldwide Local Latency With ScyllaDB
Worldwide Local Latency With ScyllaDB Worldwide Local Latency With ScyllaDB
Worldwide Local Latency With ScyllaDB
 
Serious Application Development In Serverless
Serious Application Development In ServerlessSerious Application Development In Serverless
Serious Application Development In Serverless
 
AWS Techniques and lessons writing a minimal cost gitlab runner
AWS Techniques and lessons writing a minimal cost gitlab runnerAWS Techniques and lessons writing a minimal cost gitlab runner
AWS Techniques and lessons writing a minimal cost gitlab runner
 
Zeotap: Moving to ScyllaDB - A Graph of Billions Scale
Zeotap: Moving to ScyllaDB - A Graph of Billions ScaleZeotap: Moving to ScyllaDB - A Graph of Billions Scale
Zeotap: Moving to ScyllaDB - A Graph of Billions Scale
 
Zeotap: Moving to ScyllaDB - A Graph of Billions Scale
Zeotap: Moving to ScyllaDB - A Graph of Billions ScaleZeotap: Moving to ScyllaDB - A Graph of Billions Scale
Zeotap: Moving to ScyllaDB - A Graph of Billions Scale
 
Shaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsShaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patterns
 
Shaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patternsShaping serverless architecture with domain driven design patterns
Shaping serverless architecture with domain driven design patterns
 
DDD&Scalaで作られたプロダクトはその後どうなったか?(Current state of products made with DDD & Scala)
DDD&Scalaで作られたプロダクトはその後どうなったか?(Current state of products made with DDD & Scala)DDD&Scalaで作られたプロダクトはその後どうなったか?(Current state of products made with DDD & Scala)
DDD&Scalaで作られたプロダクトはその後どうなったか?(Current state of products made with DDD & Scala)
 
How to combine Db2 on Z, IBM Db2 Analytics Accelerator and IBM Machine Learni...
How to combine Db2 on Z, IBM Db2 Analytics Accelerator and IBM Machine Learni...How to combine Db2 on Z, IBM Db2 Analytics Accelerator and IBM Machine Learni...
How to combine Db2 on Z, IBM Db2 Analytics Accelerator and IBM Machine Learni...
 
mloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game developmentmloc.js 2014 - JavaScript and the browser as a platform for game development
mloc.js 2014 - JavaScript and the browser as a platform for game development
 
Generative Design 101 for Architecture, Engineering & Construction by Jad Del...
Generative Design 101 for Architecture, Engineering & Construction by Jad Del...Generative Design 101 for Architecture, Engineering & Construction by Jad Del...
Generative Design 101 for Architecture, Engineering & Construction by Jad Del...
 
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB AtlasMongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
MongoDB SoCal 2020: Migrate Anything* to MongoDB Atlas
 
From Flat to Stacked - Alicia C Newberry - City of Milton
From Flat to Stacked - Alicia C Newberry - City of MiltonFrom Flat to Stacked - Alicia C Newberry - City of Milton
From Flat to Stacked - Alicia C Newberry - City of Milton
 
Build Low-Latency Applications in Rust on ScyllaDB
Build Low-Latency Applications in Rust on ScyllaDBBuild Low-Latency Applications in Rust on ScyllaDB
Build Low-Latency Applications in Rust on ScyllaDB
 

More from Asher Sterkin

What is exactly anti fragile in dev ops - v3
What is exactly anti fragile in dev ops - v3What is exactly anti fragile in dev ops - v3
What is exactly anti fragile in dev ops - v3
Asher Sterkin
 

More from Asher Sterkin (10)

Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024Essence of Requirements Engineering: Pragmatic Insights for 2024
Essence of Requirements Engineering: Pragmatic Insights for 2024
 
Cloud Infrastructure from Python Code: PyCon DE-23
Cloud Infrastructure from Python Code: PyCon DE-23Cloud Infrastructure from Python Code: PyCon DE-23
Cloud Infrastructure from Python Code: PyCon DE-23
 
PyCascades-23.pdf
PyCascades-23.pdfPyCascades-23.pdf
PyCascades-23.pdf
 
PyConFR-23 Talk.pdf
PyConFR-23 Talk.pdfPyConFR-23 Talk.pdf
PyConFR-23 Talk.pdf
 
pyjamas22_ generic composite in python.pdf
pyjamas22_ generic composite in python.pdfpyjamas22_ generic composite in python.pdf
pyjamas22_ generic composite in python.pdf
 
If your computer is cloud what its Operating System look like?
If your computer is cloud what its Operating System look like?If your computer is cloud what its Operating System look like?
If your computer is cloud what its Operating System look like?
 
Serverless flow programming a new perspective (py web meetup, sept 2nd, 2019...
Serverless flow programming  a new perspective (py web meetup, sept 2nd, 2019...Serverless flow programming  a new perspective (py web meetup, sept 2nd, 2019...
Serverless flow programming a new perspective (py web meetup, sept 2nd, 2019...
 
Documenting serverless architectures could we do it better - o'reily sa con...
Documenting serverless architectures  could we do it better  - o'reily sa con...Documenting serverless architectures  could we do it better  - o'reily sa con...
Documenting serverless architectures could we do it better - o'reily sa con...
 
Developing cloud serverless components in Python: DDD Perspective
Developing cloud serverless components in Python: DDD PerspectiveDeveloping cloud serverless components in Python: DDD Perspective
Developing cloud serverless components in Python: DDD Perspective
 
What is exactly anti fragile in dev ops - v3
What is exactly anti fragile in dev ops - v3What is exactly anti fragile in dev ops - v3
What is exactly anti fragile in dev ops - v3
 

Recently uploaded

JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
Max Lee
 

Recently uploaded (20)

GraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysisGraphAware - Transforming policing with graph-based intelligence analysis
GraphAware - Transforming policing with graph-based intelligence analysis
 
AI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning FrameworkAI/ML Infra Meetup | Perspective on Deep Learning Framework
AI/ML Infra Meetup | Perspective on Deep Learning Framework
 
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdfA Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
A Comprehensive Appium Guide for Hybrid App Automation Testing.pdf
 
Into the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdfInto the Box 2024 - Keynote Day 2 Slides.pdf
Into the Box 2024 - Keynote Day 2 Slides.pdf
 
top nidhi software solution freedownload
top nidhi software solution freedownloadtop nidhi software solution freedownload
top nidhi software solution freedownload
 
AI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in MichelangeloAI/ML Infra Meetup | ML explainability in Michelangelo
AI/ML Infra Meetup | ML explainability in Michelangelo
 
How To Build a Successful SaaS Design.pdf
How To Build a Successful SaaS Design.pdfHow To Build a Successful SaaS Design.pdf
How To Build a Successful SaaS Design.pdf
 
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product UpdatesGraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
GraphSummit Stockholm - Neo4j - Knowledge Graphs and Product Updates
 
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
Paketo Buildpacks : la meilleure façon de construire des images OCI? DevopsDa...
 
Designing for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web ServicesDesigning for Privacy in Amazon Web Services
Designing for Privacy in Amazon Web Services
 
How to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabberHow to install and activate eGrabber JobGrabber
How to install and activate eGrabber JobGrabber
 
Accelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with PlatformlessAccelerate Enterprise Software Engineering with Platformless
Accelerate Enterprise Software Engineering with Platformless
 
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERRORTROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
TROUBLESHOOTING 9 TYPES OF OUTOFMEMORYERROR
 
INGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by DesignINGKA DIGITAL: Linked Metadata by Design
INGKA DIGITAL: Linked Metadata by Design
 
Advanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should KnowAdvanced Flow Concepts Every Developer Should Know
Advanced Flow Concepts Every Developer Should Know
 
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
Tree in the Forest - Managing Details in BDD Scenarios (live2test 2024)
 
JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)JustNaik Solution Deck (stage bus sector)
JustNaik Solution Deck (stage bus sector)
 
Breaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdfBreaking the Code : A Guide to WhatsApp Business API.pdf
Breaking the Code : A Guide to WhatsApp Business API.pdf
 
Benefits of Employee Monitoring Software
Benefits of  Employee Monitoring SoftwareBenefits of  Employee Monitoring Software
Benefits of Employee Monitoring Software
 
Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024Secure Software Ecosystem Teqnation 2024
Secure Software Ecosystem Teqnation 2024
 

Serverless ddd

  • 1. Serverless Domain-Driven Design At last some productivity Asher Sterkin asher.sterkin@gmail.com Serverless Meetup April 25, 2017, Tel-Aviv
  • 2. About Myself ● Close to 40 years of experience in the software technology field ● VP Technology, Chief Technology Advisor Group, NDS (2010 - 2012) ● Distinguished Engineer, Office of CTO, Cisco Engineering (2012 - 2016) ● Today CTO at IRKI ● Focusing on software product line strategy ○ Lean Startup ○ Wardley Maps ○ (Strategic) Domain-Driven Design ○ Cynefin ○ Promise Theory ○ Serverless Architecture ○ ...
  • 3.
  • 4. Metallic Sage Green Luster, Opaque Metallic Matte Galvanized SF Pink Blush, Opaque Galvanized Semi-Matte Metallic Dark Raspberry Iris, Opaque Metallic Matte Light Olive Luster, Opaque Metallic Matte
  • 5.
  • 6. Serverless ←→ DDD ● DDD & Microservices ● Serverless → DDD ○ Strategic DDD ○ Tactical DDD ○ Serverless AI → DDD ● Serverless ← DDD ● Serverless DDD → Productivity
  • 9. Domain Model Ubiquitous Language Bounded Context Permeable Context Boundaries Result in BBoM Symptoms of Rotting Design ● Rigidity - hard to change ● Fragility - easy to break ● Immobility - hard to reuse ● Viscosity - hard to do the right thing ● Opacity - disorganized expression ● ...
  • 10. 10 4+1 View of Software Architecture Conceptual Physical Process View Deployment View Logical View Use-Case View Implementation View End-user Functionality Programmers Software management Performance Scalability Throughput System integrators System topology Delivery, installation communication System engineering Analysts/Designers Structure P. Krutchen, “Architectural Blueprints - The “4+1” View Model of Software Architecture
  • 11. 11 4+1 View of Software Architecture Conceptual Physical Process View Deployment View Logical View Use-Case View Implementation View End-user Functionality Programmers Software management Performance Scalability Throughput System integrators System topology Delivery, installation communication System engineering Analysts/Designers Structure Bounded Context → Microservice
  • 13. Strategic Domain-Driven Design Vernon Vaughn, “Implementing Domain-Driven Design”
  • 21. Pull Up/Push Down Pull up useful abstractions Push down support and generic stuff; control through OSS contributions Fashion Accessories There is no ideal core domain model sitting and waiting to be discovered. It’s more like attractor gradually emerging out of multiple “safe-to-fail” experimentations
  • 22. Strategic Domain-Driven Design ● Compute ● Network ● Storage ● Intelligence Serverless ● 2D Shape ● 3D Shape ● ... Geometry ● Color ● ... Graphics Microservice = CF Stack? ERP, CRM, SCM, PLM, ECM, CAD, ... Taxes Shipment Web Site Inventory .... Fashion Accessories
  • 23. Strategic Domain-Driven Design ● Compute ● Network ● Storage ● Intelligence Serverless BC ● 2D Shape ● 3D Shape ● ... Geometry ● Color ● ... Graphics Microservice = CF Stack? ERP, CRM, SCM, PLM, ECM, ... Taxes Shipment Web Site Inventory .... Fashion Accessories
  • 24. Strategic Domain-Driven Design ● Compute ● Network ● Storage ● Intelligence Serverless BC ● 2D Shape ● 3D Shape ● ... Geometry ● Color ● ... Graphics Microservice = CF Stack? ERP, CRM, SCM, PLM, ECM, ... Taxes Shipment Web Site Inventory .... Fashion Accessories
  • 25. Strategic Domain-Driven Design ● 2D Shape ● 3D Shape ● ... Geometry ● Color ● ... Graphics ● Compute ● Network ● Storage ● Intelligence Serverless BC Microservice = CF Stack? ERP, CRM, SCM, PLM, ECM, ... Taxes Shipment Web Site Inventory .... Fashion Accessories ...
  • 26. Context Map is the Key ● 2D Shape ● 3D Shape ● ... Geometry ● Color ● ... Graphics ● Compute ● Network ● Storage ● Intelligence Serverless BC Microservice = CF Stack? ERP, CRM, SCM, PLM, ECM, ... Taxes Shipment Web Site Inventory .... Fashion Accessories ... ACL ACL ACL
  • 27. Emerging Core Domain so Far Types Components Products Inventory Items Customers Manufacturers Vendors Catalog Items Shapes Colors Pictures
  • 28. Amazon is Eating Software ... valuechain evolutionG C P U eTailer Service AIaaS FaaS PaaS IaaS SCM ... Web Scale Operation New Service
  • 29. Amazon is Eating Software ... valuechain evolutionG C P U Video Service AIaaS FaaS PaaS IaaS Recommendations ... Cloud Native Ability to build a Web Scale Application is not a differentiator anymore!
  • 30. Serverless Strategic DDD Prefer utility AIaaS Prefer product or utility SaaS Major effort Pull up useful abstractions Proper timing for API Push down support and generic stuff; control through OSS contributions
  • 32. Bounded Context Tactical DDD Patterns Domain Model Ubiquitous Language Nouns, Adjectives, Imperative Verbs, Interrogative Verbs, Perfect Tense Verbs Entities, Values, Commands, Queries, Events, Aggregates, Repository, Computational Services, Factories, ACL, Saga (Process Manager) Serverless Cloud Environment
  • 33. Repository Strong Transaction Consistency + Invariant DDD Aggregate and Repository <<Aggregate Root>> Entity Entity Value Value Eventual Transaction Consistency Storage Command/ Query Request Processor Command or Query Requests Domain Events
  • 34. (AWS) Serverless DDD Patterns ● Repository ○ CRUD ○ CQRS ○ CQRS/ES ○ CQRS/ES IoT Scale ● Computation Service ○ Function ○ Batch ○ Map/Reduce ● Saga (Process Manager)
  • 35. Default Serverless DDD Repository (CRUD) DynamoDB Streams Command/Query Handler Domain Event Handler Strong vs. Eventual Consistency Bead Shape Bead Color Bead Product Type Component Type
  • 36. Serverless DDD Repository (CQRS) DynamoDB Streams Command Handler Query View Builder Query Handler ● Ad-hoc vs. precomputed ● Inter- vs. Intra Aggregate Query View Store SOT Store ● Command vs. Query Storage optimization ● Query interface complexity Bead Color/Shape Compatibility
  • 37. Serverless DDD Repository (CQRS/ES) DynamoDB Streams Command Handler Projection Builders Query Handler ● Ad-hoc vs. precomputed ● Inter- vs. Intra Aggregate Query View Store Event Store Snapshot Store ● Immutability ● Auditing Product Spec Product/Component Inventory
  • 38. Event Store Patterns ● State Change Events (git style) ● Measurement/Observation (telemetry) ● Transaction/Account/Entry (accounting) ● Meaningful Domain Events
  • 39. Snapshot Store Patterns ● Most Recent State ● State Change History ● Multiple Worlds
  • 40. Serverless DDD Repository (CQRS/ES IoT Scale) Edge Command/Event Handler Cloud Command/Event Handler Thing Event Stream Thing Event Handlers Thing Snapshot View Thing Projection Builder Thing Event Store
  • 41. Serverless DDD Computation Services Command/Query/Event Handler Computation Service Bead Color/Shape Permutations Bead Color Bead Shape Bead Component Most popular products Most popular colors per country Minimal inventory level per product ...
  • 42. Serverless DDD Saga (Process Manager) Product Picture Album Building Raw Pictures Catalog Pictures Product Catalog Background Cleanup Color/Light Adjustments Resolution Transcoding
  • 45. Serverless DDD AI Patterns ● Pereferrial Adapters: audio, video, picture, text ● Application Services: dynamic state machines ● Command/Query Request Processors: classification, matching ● Event Handlers: anomaly detection ● Computation Services: analysis, generation, transformation, optimization ● Batch Processing: feedback and learning
  • 46. Serverless AI ← DDD Pereferrial Adapters Application Services Dynamic State Machines Application-level Stimulo Domain Services Command/Query Requests EventsRaw A/V/T Inputs Dynamic Classifications Anomaly Detection Event Processors Feedback and Training Pinterest/Instagram/Facebook/Twitter Feedback Processing Best Earrings Match Best Necklace Match Historical Data
  • 47. Serverless → DDD What is Missing?
  • 48. Serverless → DDD Wish List ● Support for Actor Model ● Support for Reactive Programming ● JavaScript, JSON and YAML are (cloud) machine-level languages - need something at higher level ● Simple modeling tool (lightweight UML) ● Fully fledged IDE supporting above ● Support for Semantic Maps (kind of AI service)
  • 51. DDD for Serverless Use DDD Strategic and Tactical patterns as Serverless Architecture organizing principles to prevent ending with just a distributed version of BBoM.
  • 52. One who increases flesh, increases worms; one who increases possessions, increases worry; one who increases wives, increases witchcraft; one who increases maidservants, increases promiscuity; one who increases man-servants, increases thievery; Pirkey Avot Chapter 2/7 ‫כשפים‬ ‫מרבה‬ ‫נשים‬ ‫מרבה‬ .‫דאגה‬ ‫מרבה‬ ‫נכסים‬ ‫מרבה‬ .‫רימה‬ ‫מרבה‬ ‫בשר‬ ‫.מרבה‬ ‫גזל‬ ‫מרבה‬ ‫עבדים‬ ‫מרבה‬ .‫זימה‬ ‫מרבה‬ ‫שפחות‬ ‫מרבה‬ Kohelet Chapter 1/18 18For in much wisdom is much vexation, and he who increases knowledge, increases pain. :‫ְאוֹב‬‫כ‬ַ‫מ‬ ‫ִיף‬‫ס‬‫יוֹ‬ ‫ַת‬‫ע‬ַ‫דּ‬ ‫ִיף‬‫ס‬‫ְיוֹ‬‫ו‬ ‫ַס‬‫ע‬ָ‫כּ‬ ‫ב‬ ָ‫ר‬ ‫ָה‬‫מ‬ְ‫כ‬ָ‫ח‬ ‫ֹב‬ ‫ְר‬‫בּ‬ ‫ִי‬‫כּ‬‫יח‬
  • 53. Too Many Moving Parts ...
  • 54. DDD for Serverless Treat ‘em all as Aggregate Repositories within the corresponding Bounded Context of Generic Infrastructure Sub-Domain
  • 55. At Last Some Productivity
  • 56. How to Measure Productivity? ● Lines of Code - well known anti-pattern ● Story Points - less well known anti-pattern (velocity is not productivity) ● Features - “feature train” (producing many features nobody needs) ● Value - too much depends on Product Owner; not under direct control ● Domain Insights - only domain experts could bring it → a lot of experimentation “Software Development is a Learning Process. Running code is byproduct.” A.Brandolini
  • 57. “Consensus is poisonous for innovation” D. Snowden The last slide