SlideShare a Scribd company logo
1 of 94
Download to read offline
Orchestration vs Choreography
A Guide To Composing Your Monolith
Ian Thomas
www.ian-thomas.net | @anatomic | linkedin.com/in/anatomic 2023
www.footyheadlines.com
Adidas
https://www.flickr.com/photos/bounder/2878997040
Hi 👋, I’m Ian
I’m a software engineer from the UK, currently
building work products at Meta as part of
Reality Labs.
Previously, I was VP of Web Architecture for
Genesis and Chief Digital Technology Architect
for PokerStars.
www.ian-thomas.net | @anatomic | linkedin.com/in/anatomic
󰞽 On The Menu Today…
● The need for change and how our decisions impact it
● How complexity and coupling are conspiring to slow your progress
● Orchestration and choreography patterns
● State, data, failure and humans
● Tooling and processes to help smooth the road
I encourage you to keep in mind five “C”s:
Communication, Consistency, Coordination, Coupling and Complexity
Lehman’s Laws of
Software
Evolution
Programs, Life Cycles and Laws of Software Evolution
Continuing Change
Self Regulation
Conservation of
Familiarity
Declining Quality
Increasing Complexity
Conservation of
Organisational Stability
Continuing Growth
Feedback System
Continuing Change
Self Regulation
Conservation of
Familiarity
Declining Quality
Increasing Complexity
Conservation of
Organisational Stability
Continuing Growth
Feedback System
Requires continual adaptation
or it becomes progressively less
satisfactory
Complexity increases unless
work is done to maintain or
reduce it
Functional content must be
continually increased to
maintain user satisfaction
Quality will appear to be
declining unless a system is
rigorously maintained and
adapted to operational
environment changes
Continuing Change
Self Regulation
Conservation of
Familiarity
Declining Quality
Increasing Complexity
Conservation of
Organisational Stability
Continuing Growth
Feedback System
Continuing Change
Self Regulation
Conservation of
Familiarity
Declining Quality
Increasing Complexity
Conservation of
Organisational Stability
Continuing Growth
Feedback System
Change in the
world outside
systems drives the
need for growth
and change within
Continuing Change
Self Regulation
Conservation of
Familiarity
Declining Quality
Increasing Complexity
Conservation of
Organisational Stability
Continuing Growth
Feedback System
Change in the
world outside
systems drives the
need for growth
and change within
Change in the
system itself is
self-limiting
unless deliberate
effort is exerted
“[..] shows the continuing growth of the system
(first law) albeit at a declining rate
(demonstrably due to increasing difficulty of
change, growing complexity (second law)”
M. Lehman - Program, Life Cycles, and Laws of Software Evolution
Which chart most closely matches your situation?
Which chart most closely matches your situation?
Workflows
Place
order
Check
stock
Wait for
stock
Cancel
order
Process
payment
Update
payment
details
Ship
product
Order
complete
Abyss of
shipping
support
Accepted
Unavailable
Available
Allocated Billed
Delivered
N
o
s
h
o
w
Timeout
Timeout
R
e
t
r
y
E
r
r
o
r
Start
Place
order
Check
stock
Wait for
stock
Cancel
order
Process
payment
Update
payment
details
Ship
product
Order
complete
Start
Order
Inventory
Payment Fulfilment
Bounded Contexts
Ubiquitous Languages
Bounded Contexts
Svc
Svc
Svc
Svc Svc
Svc
Svc
Svc
Svc
Ubiquitous Languages
Bounded Contexts
Svc
Svc
Svc
Svc Svc
Svc
Svc
Svc
Svc
Subdomain
Ubiquitous Languages
Bounded Contexts
Ubiquitous Languages
Svc
Svc
Svc
Svc Svc
Svc
Svc
Svc
Svc
Subdomain
Interchange Contexts
Place
order
Check
stock
Wait for
stock
Cancel
order
Process
payment
Update
payment
details
Ship
product
Order
complete
Start
EXTERNAL
INTERNAL
INTERNAL
EXTERNAL
EXTERNAL
EXTERNAL
Interaction Patterns
Interaction Patterns
Orchestration
Human-in-the-loop and long
running workflows
The orchestrator can manage compensatory actions
��
Circuit Breakers Timeouts*
Service Discovery Retries
Healthchecks Auto-scaling
Bulkheads Mutual TLS
Handling Failure
Many of these requirements can be pushed to the platform
Orchestration
Pro Con
Single controller managing workflow state Single point of failure
Complex error handling is easier to manage Additional latency
Platform tooling increasingly removing complexity from
applications (especially for synchronous calls)
Scalability
Recoverability Responsiveness
Lower cognitive load Coupling between orchestrator and services
Version controllable workflow definitions
Lots of tooling to support o11y of API driven services
Interaction Patterns
Choreography
Events or Commands?
Events or Commands?
https://nedroidcomics.tumblr.com/post/41879001445/the-internet
Types of Event
Event Notification Announcing facts, with no expectation of action or response
Event-Carried State Transfer Reduce chattiness between services by including data in the event
Event Sourcing Events are recorded in a persistent log, allowing for replay and state reconstruction
CQRS Separate reading and writing, handles broad variation in access patterns
Martin Fowler - What do you mean by “Event-Driven”?
Message size Extra infrastructure
Infinite loops Error handling
Delivery semantics Workflow level timeouts
Idempotency Ordering
Versioning State management
Choreography Considerations
Place
order
Check
stock
Wait for
stock
Cancel
order
Process
payment
Update
payment
details
Ship
product
Order
complete
Abyss of
shipping
support
Accepted
Unavailable
Available
Allocated Billed
Delivered
N
o
s
h
o
w
Timeout
Timeout
R
e
t
r
y
E
r
r
o
r
Start
Choreography
Pro Con
Weak coupling between services Complexity grows rapidly with event cardinality
Scalability Typically requires intermediate infrastructure
Responsiveness Versioning of events
Fault tolerance, no single point of failure No single view of workflow state
High throughput Hard to version control workflow
Error handling (especially at the workflow level)
Choosing Your PAtterns
…use orchestration within the bounded
context of a microservice, but use
choreography between bounded-contexts.
Yan Cui – Choreography vs Orchestration in the land of serverless
…use orchestration within the bounded
context of a microservice, but use
choreography between bounded-contexts.
Yan Cui – Choreography vs Orchestration in the land of serverless
Place
order
Check
stock
Wait for
stock
Cancel
order
Process
payment
Update
payment
details
Ship
product
Order
complete
Start
EXTERNAL
INTERNAL
INTERNAL
EXTERNAL
EXTERNAL
EXTERNAL
Formally Specified Informally Specified
How formally do you need to specify your workflow?
Orchestration
service, workflow
defined using
DSL/programming
language
(declarative)
Custom
orchestrator,
workflow defined in
general purpose
programming
language
(imperative)
Front controller
knows about
workflow
Stateless, hopefully
documented,
potentially just in a
few people’s heads
Orchestration Choreography
An architect can never reduce semantic
coupling via implementation, but they
can make it worse.
Neal Ford, Mark Richards, Pramod Sadalage & Zhamak Dehghani – Software Architecture: The Hard Parts
Coupling
Essential Accidental
Systems necessarily coupled to deliver value
Poor or non-existent system design or
development processes
Types of Coupling
Operational A consumer can’t run without a provider
Developmental Changes in producers and consumers must be coordinated
Semantic Change together because of shared concepts
Functional Change together because of shared responsibility
Incidental Change together for no good reason
Michael Nygard - Uncoupling
Temporal effects?
Will you be seated?
What about 3 people?
12.5% chance of being seated
Adding further people quickly reduces your chances
of being seated on time to (effectively) 0
Adding further people quickly reduces your chances
of being seated on time to (effectively) 0
6% 1.6% 0.1%
Types of Coupling
Operational A consumer can’t run without a provider
Developmental Changes in producers and consumers must be coordinated
Semantic Change together because of shared concepts
Functional Change together because of shared responsibility
Incidental Change together for no good reason
Michael Nygard - Uncoupling
Organisational Progress can only be achieved through others
Decomposition != Decoupling
The value of orchestration increases with workflow
complexity, notably with complex error scenarios.
Comparatively, responsiveness and scalability
requirements favour choreography, especially when
error handling is minimal.
Orchestration Choreography
Operational Coupling Strong Very weak
Developmental Coupling Strong Weaker, caution advised
Semantic Coupling Less Strong Weak
Functional Coupling Less Strong Weak
Incidental Coupling Less likely, potentially easier to find Harder to find, more sinister when present
Scalability Scale cascades, less suitable for parallelism Backpressure to decouple, easier to parallelise
Reliability Only as good as your weakest link Careful design decouples uptime
Responsiveness Central bottleneck, processing chains add latency Highly responsive due to reduced operational coupling
Fault Tolerance Low, due to single point of failure effect Excellent
Error Handling Eased through central state management Harder, risk of event explosion and passive/aggressive
Cognitive Load Lower Complexity grows with number of events
Observability Traditional tooling and central state make o11y easier Potentially more difficult, requires strong platform support
Orchestration vs Choreography
@anatomic’s rough guide to
Making “IT” Work
Avoiding gotcha’s, no matter the pattern
What’s inside the boxes?
Four pillars of Event Streaming Capabilities
Business Function Instrumentation Control Plane Operational Plane
Actually doing the
work we need, the
business function (or
“core” plane) is where
the value lies for our
customers and the
business.
The metrics and
telemetry necessary
for us to determine if
the system is working
as expected.
Systems will keep on
chugging, even when
we might need them
to stop. Control
planes help manage
change, including
pausing, scaling and
rate-limiting.
Tooling and processes
to help run our
systems, including
addressing failure
modes (wiping data
and corrective
actions), upgrade
processes and
evolutionary support.
https://www.confluent.io/en-gb/blog/journey-to-event-driven-part-4-four-pillars-of-event-streaming-microservices/
More difficult to implement in
event-driven systems
What’s between the boxes?
A B
What’s in a line?
A B
What’s in a line?
Inter-process communication
Traffic flow
DNS
Service discovery
Routing
Schemas
Certificates
Firewall
Physical connection
Load balancing
AuthN/AuthZ
Secrets
Data format
Protocol
Failure modes
A B
What’s in a line?
Inter-process communication
Traffic flow
DNS
Service discovery
Routing
Schemas
Certificates
Firewall
Physical connection
Load balancing
AuthN/AuthZ
Secrets
Data format
Protocol
Failure modes
A B
What’s in a line?
Inter-process communication
Traffic flow
DNS
Service discovery
Routing
Schemas
Certificates
Firewall
Physical connection
Load balancing
AuthN/AuthZ
Secrets
Data format
Protocol
Failure modes
Different priorities
Required changes
Change management
ITIL
Change Advisory Boards
Time zones
Backlogs
Scrum of Scrums
Language
A B
What’s in a line?
Inter-process communication
Traffic flow
DNS
Service discovery
Routing
Schemas
Certificates
Firewall
Physical connection
Load balancing
AuthN/AuthZ
Secrets
Data format
Protocol
Failure modes
Different priorities
Required changes
Change management
ITIL
Change Advisory Boards
Time zones
Backlogs
Scrum of Scrums
Language
🤯
A B
What’s in a line?
Inter-process communication
Traffic flow
DNS
Service discovery
Routing
Schemas
Certificates
Firewall
Physical connection
Load balancing
AuthN/AuthZ
Secrets
Data format
Protocol
Failure modes
Different priorities
Required changes
Change management
ITIL
Change Advisory Boards
Time zones
Backlogs
Scrum of Scrums
Language
Testing Long-running workflows
Schema evolution Ownership of workflow state
Fallacies of distributed computing Team geo-distribution
Serialisation formats Distributed tracing
Accidental coupling Self-service infrastructure
How are you going to handle…
And all the other stuff that won’t fit on a slide
Schema Evolution
Operational Changes Allowed Schemas Validated Upgrade First
Backward
● Delete fields
● Add optional fields
Last version Consumers
Backward transitive
● Delete fields
● Add optional fields
All previous versions Consumers
Forward
● Add fields
● Delete optional fields
Last version Producers
Forward transitive
● Add fields
● Delete optional fields
All previous versions Producers
Full
● Add optional fields
● Delete optional fields
Last version Any order
Full transitive
● Add optional fields
● Delete optional fields
All previous versions Any order
None ● All changes accepted None Depends
https://docs.confluent.io/platform/current/schema-registry/avro.html - compatibility-types
A B
What’s in a line?
Inter-process communication
Traffic flow
DNS
Service discovery
Routing
Schemas
Certificates
Firewall
Physical connection
Load balancing
AuthN/AuthZ
Secrets
Data format
Protocol
Failure modes
Different priorities
Required changes
Change management
ITIL
Change Advisory Boards
Time zones
Backlogs
Scrum of Scrums
Language
Testing Long-running workflows
Schema evolution Ownership of workflow state
Fallacies of distributed computing Team geo-distribution
Serialisation formats Distributed tracing
Accidental coupling Self-service infrastructure
How are you going to handle…
And all the other stuff that won’t fit on a slide
Favour orchestration for complex workflows,
choreography for scalability + weaker coupling
Enable long-term changeability through
deliberate design + trade-off analysis
Complexity breeds in the bits between our systems,
handle with care (+ don’t forget about the humans!)
www.ian-thomas.net | @anatomic | linkedin.com/in/anatomic
Thanks 🖖
If you’re interested in chatting more about any
of the topics covered in this talk, come and grab
me in the hallway track or virtually through
Twitter or LinkedIn.
Thank you for coming to hear me speak!
www.ian-thomas.net | @anatomic | linkedin.com/in/anatomic
2023

More Related Content

What's hot

Product Vision and Roadmap for Anypoint Platform
Product Vision and Roadmap for Anypoint PlatformProduct Vision and Roadmap for Anypoint Platform
Product Vision and Roadmap for Anypoint PlatformMuleSoft
 
Introduction To Micro Frontends
Introduction To Micro Frontends Introduction To Micro Frontends
Introduction To Micro Frontends Meitar Karas
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQAraf Karsh Hamid
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkTimothy Spann
 
Observability on Kubernetes - High Availability on Prometheus
Observability on Kubernetes - High Availability on PrometheusObservability on Kubernetes - High Availability on Prometheus
Observability on Kubernetes - High Availability on PrometheusJulian Alarcon Alarcon
 
Asynchronous Microservices in nodejs
Asynchronous Microservices in nodejsAsynchronous Microservices in nodejs
Asynchronous Microservices in nodejsBruno Pedro
 
A Pattern Language for Microservices
A Pattern Language for MicroservicesA Pattern Language for Microservices
A Pattern Language for MicroservicesChris Richardson
 
MSA ( Microservices Architecture ) 발표 자료 다운로드
MSA ( Microservices Architecture ) 발표 자료 다운로드MSA ( Microservices Architecture ) 발표 자료 다운로드
MSA ( Microservices Architecture ) 발표 자료 다운로드Opennaru, inc.
 
오픈소스를 활용한 Batch_처리_플랫폼_공유
오픈소스를 활용한 Batch_처리_플랫폼_공유오픈소스를 활용한 Batch_처리_플랫폼_공유
오픈소스를 활용한 Batch_처리_플랫폼_공유knight1128
 
MuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft AutomationMuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft AutomationJitendra Bafna
 
Clean architecture
Clean architectureClean architecture
Clean architectureandbed
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsasync_io
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examplesPeter Lawrey
 
Dapr - A 10x Developer Framework for Any Language
Dapr - A 10x Developer Framework for Any LanguageDapr - A 10x Developer Framework for Any Language
Dapr - A 10x Developer Framework for Any LanguageBilgin Ibryam
 
4+ yrs_Exp .Net Resume
4+ yrs_Exp .Net Resume4+ yrs_Exp .Net Resume
4+ yrs_Exp .Net ResumeGandhi Goli
 
[오픈소스컨설팅]Tomcat6&7 How To
[오픈소스컨설팅]Tomcat6&7 How To[오픈소스컨설팅]Tomcat6&7 How To
[오픈소스컨설팅]Tomcat6&7 How ToJi-Woong Choi
 
Azure API Management
Azure API ManagementAzure API Management
Azure API ManagementDaniel Toomey
 

What's hot (20)

Product Vision and Roadmap for Anypoint Platform
Product Vision and Roadmap for Anypoint PlatformProduct Vision and Roadmap for Anypoint Platform
Product Vision and Roadmap for Anypoint Platform
 
React context
React context  React context
React context
 
Introduction To Micro Frontends
Introduction To Micro Frontends Introduction To Micro Frontends
Introduction To Micro Frontends
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQ
 
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and FlinkDBA Fundamentals Group: Continuous SQL with Kafka and Flink
DBA Fundamentals Group: Continuous SQL with Kafka and Flink
 
APEX Low Code
APEX Low CodeAPEX Low Code
APEX Low Code
 
Observability on Kubernetes - High Availability on Prometheus
Observability on Kubernetes - High Availability on PrometheusObservability on Kubernetes - High Availability on Prometheus
Observability on Kubernetes - High Availability on Prometheus
 
Oracle JET overview
Oracle JET overviewOracle JET overview
Oracle JET overview
 
Asynchronous Microservices in nodejs
Asynchronous Microservices in nodejsAsynchronous Microservices in nodejs
Asynchronous Microservices in nodejs
 
A Pattern Language for Microservices
A Pattern Language for MicroservicesA Pattern Language for Microservices
A Pattern Language for Microservices
 
MSA ( Microservices Architecture ) 발표 자료 다운로드
MSA ( Microservices Architecture ) 발표 자료 다운로드MSA ( Microservices Architecture ) 발표 자료 다운로드
MSA ( Microservices Architecture ) 발표 자료 다운로드
 
오픈소스를 활용한 Batch_처리_플랫폼_공유
오픈소스를 활용한 Batch_처리_플랫폼_공유오픈소스를 활용한 Batch_처리_플랫폼_공유
오픈소스를 활용한 Batch_처리_플랫폼_공유
 
MuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft AutomationMuleSoft Surat Meetup#54 - MuleSoft Automation
MuleSoft Surat Meetup#54 - MuleSoft Automation
 
Clean architecture
Clean architectureClean architecture
Clean architecture
 
Practical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.jsPractical Use of MongoDB for Node.js
Practical Use of MongoDB for Node.js
 
Reactive programming with examples
Reactive programming with examplesReactive programming with examples
Reactive programming with examples
 
Dapr - A 10x Developer Framework for Any Language
Dapr - A 10x Developer Framework for Any LanguageDapr - A 10x Developer Framework for Any Language
Dapr - A 10x Developer Framework for Any Language
 
4+ yrs_Exp .Net Resume
4+ yrs_Exp .Net Resume4+ yrs_Exp .Net Resume
4+ yrs_Exp .Net Resume
 
[오픈소스컨설팅]Tomcat6&7 How To
[오픈소스컨설팅]Tomcat6&7 How To[오픈소스컨설팅]Tomcat6&7 How To
[오픈소스컨설팅]Tomcat6&7 How To
 
Azure API Management
Azure API ManagementAzure API Management
Azure API Management
 

Similar to Orchestration vs Choreography - A Guide To Composing Your Monolith

The Reactive Principles: Design Principles For Cloud Native Applications
The Reactive Principles: Design Principles For Cloud Native ApplicationsThe Reactive Principles: Design Principles For Cloud Native Applications
The Reactive Principles: Design Principles For Cloud Native ApplicationsJonas Bonér
 
The Reactive Principles: Eight Tenets For Building Cloud Native Applications
The Reactive Principles: Eight Tenets For Building Cloud Native ApplicationsThe Reactive Principles: Eight Tenets For Building Cloud Native Applications
The Reactive Principles: Eight Tenets For Building Cloud Native ApplicationsLightbend
 
Software Architecture Anti-Patterns
Software Architecture Anti-PatternsSoftware Architecture Anti-Patterns
Software Architecture Anti-PatternsEduards Sizovs
 
SQLBits VI - Improving database performance by removing the database
SQLBits VI - Improving database performance by removing the databaseSQLBits VI - Improving database performance by removing the database
SQLBits VI - Improving database performance by removing the databaseSimon Munro
 
TDC2017 | São Paulo - Trilha Arquitetura Java How we figured out we had a SRE...
TDC2017 | São Paulo - Trilha Arquitetura Java How we figured out we had a SRE...TDC2017 | São Paulo - Trilha Arquitetura Java How we figured out we had a SRE...
TDC2017 | São Paulo - Trilha Arquitetura Java How we figured out we had a SRE...tdc-globalcode
 
RailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your DomainRailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your DomainLourens Naudé
 
From Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.auFrom Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.auevanbottcher
 
SOPRANO Ambient Middleware (AAL)
SOPRANO Ambient Middleware (AAL)SOPRANO Ambient Middleware (AAL)
SOPRANO Ambient Middleware (AAL)Andreas Schmidt
 
Production Readiness Strategies in an Automated World
Production Readiness Strategies in an Automated WorldProduction Readiness Strategies in an Automated World
Production Readiness Strategies in an Automated WorldSean Chittenden
 
Designing for the Cloud Tutorial - QCon SF 2009
Designing for the Cloud Tutorial - QCon SF 2009Designing for the Cloud Tutorial - QCon SF 2009
Designing for the Cloud Tutorial - QCon SF 2009Stuart Charlton
 
Optimizing Your SOA with Event Processing
Optimizing Your SOA with Event ProcessingOptimizing Your SOA with Event Processing
Optimizing Your SOA with Event ProcessingTim Bass
 
Surviving SOA - delivering (somewhat) continuously on a hostile planet
Surviving SOA - delivering (somewhat) continuously on a hostile planetSurviving SOA - delivering (somewhat) continuously on a hostile planet
Surviving SOA - delivering (somewhat) continuously on a hostile planetTomAkehurst
 
Influx/Days 2017 San Francisco | Christine Yen
Influx/Days 2017 San Francisco | Christine YenInflux/Days 2017 San Francisco | Christine Yen
Influx/Days 2017 San Francisco | Christine YenInfluxData
 
Cloudstate - Towards Stateful Serverless
Cloudstate - Towards Stateful ServerlessCloudstate - Towards Stateful Serverless
Cloudstate - Towards Stateful ServerlessLightbend
 
Real-time Search at Yammer - By Aleksandrovsky Boris
Real-time Search at Yammer - By Aleksandrovsky BorisReal-time Search at Yammer - By Aleksandrovsky Boris
Real-time Search at Yammer - By Aleksandrovsky Borislucenerevolution
 
Mmckeown hadr that_conf
Mmckeown hadr that_confMmckeown hadr that_conf
Mmckeown hadr that_confMike McKeown
 

Similar to Orchestration vs Choreography - A Guide To Composing Your Monolith (20)

The Reactive Principles: Design Principles For Cloud Native Applications
The Reactive Principles: Design Principles For Cloud Native ApplicationsThe Reactive Principles: Design Principles For Cloud Native Applications
The Reactive Principles: Design Principles For Cloud Native Applications
 
The Reactive Principles: Eight Tenets For Building Cloud Native Applications
The Reactive Principles: Eight Tenets For Building Cloud Native ApplicationsThe Reactive Principles: Eight Tenets For Building Cloud Native Applications
The Reactive Principles: Eight Tenets For Building Cloud Native Applications
 
Software Architecture Anti-Patterns
Software Architecture Anti-PatternsSoftware Architecture Anti-Patterns
Software Architecture Anti-Patterns
 
SQLBits VI - Improving database performance by removing the database
SQLBits VI - Improving database performance by removing the databaseSQLBits VI - Improving database performance by removing the database
SQLBits VI - Improving database performance by removing the database
 
TDC2017 | São Paulo - Trilha Arquitetura Java How we figured out we had a SRE...
TDC2017 | São Paulo - Trilha Arquitetura Java How we figured out we had a SRE...TDC2017 | São Paulo - Trilha Arquitetura Java How we figured out we had a SRE...
TDC2017 | São Paulo - Trilha Arquitetura Java How we figured out we had a SRE...
 
RailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your DomainRailswayCon 2010 - Command Your Domain
RailswayCon 2010 - Command Your Domain
 
From Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.auFrom Monoliths to Microservices at Realestate.com.au
From Monoliths to Microservices at Realestate.com.au
 
SOPRANO Ambient Middleware (AAL)
SOPRANO Ambient Middleware (AAL)SOPRANO Ambient Middleware (AAL)
SOPRANO Ambient Middleware (AAL)
 
Production Readiness Strategies in an Automated World
Production Readiness Strategies in an Automated WorldProduction Readiness Strategies in an Automated World
Production Readiness Strategies in an Automated World
 
Bloom plseminar-sp15
Bloom plseminar-sp15Bloom plseminar-sp15
Bloom plseminar-sp15
 
Designing for the Cloud Tutorial - QCon SF 2009
Designing for the Cloud Tutorial - QCon SF 2009Designing for the Cloud Tutorial - QCon SF 2009
Designing for the Cloud Tutorial - QCon SF 2009
 
Optimizing Your SOA with Event Processing
Optimizing Your SOA with Event ProcessingOptimizing Your SOA with Event Processing
Optimizing Your SOA with Event Processing
 
Surviving SOA - delivering (somewhat) continuously on a hostile planet
Surviving SOA - delivering (somewhat) continuously on a hostile planetSurviving SOA - delivering (somewhat) continuously on a hostile planet
Surviving SOA - delivering (somewhat) continuously on a hostile planet
 
Surviving SOA
Surviving SOASurviving SOA
Surviving SOA
 
Influx/Days 2017 San Francisco | Christine Yen
Influx/Days 2017 San Francisco | Christine YenInflux/Days 2017 San Francisco | Christine Yen
Influx/Days 2017 San Francisco | Christine Yen
 
Cloudstate - Towards Stateful Serverless
Cloudstate - Towards Stateful ServerlessCloudstate - Towards Stateful Serverless
Cloudstate - Towards Stateful Serverless
 
Realtime search at Yammer
Realtime search at YammerRealtime search at Yammer
Realtime search at Yammer
 
Real-time Search at Yammer - By Aleksandrovsky Boris
Real-time Search at Yammer - By Aleksandrovsky BorisReal-time Search at Yammer - By Aleksandrovsky Boris
Real-time Search at Yammer - By Aleksandrovsky Boris
 
Real Time Search at Yammer
Real Time Search at YammerReal Time Search at Yammer
Real Time Search at Yammer
 
Mmckeown hadr that_conf
Mmckeown hadr that_confMmckeown hadr that_conf
Mmckeown hadr that_conf
 

More from Ian Thomas

Whose Stack Is It Anyway?
Whose Stack Is It Anyway?Whose Stack Is It Anyway?
Whose Stack Is It Anyway?Ian Thomas
 
Influencing Without Authority: Effective Staff+ Engineering
Influencing Without Authority: Effective Staff+ EngineeringInfluencing Without Authority: Effective Staff+ Engineering
Influencing Without Authority: Effective Staff+ EngineeringIan Thomas
 
Strategies For High Quality Serverless Applications on AWS
Strategies For High Quality Serverless Applications on AWSStrategies For High Quality Serverless Applications on AWS
Strategies For High Quality Serverless Applications on AWSIan Thomas
 
Breaking Out Of The Fear Cycle (LambdaConf 2018)
Breaking Out Of The Fear Cycle (LambdaConf 2018)Breaking Out Of The Fear Cycle (LambdaConf 2018)
Breaking Out Of The Fear Cycle (LambdaConf 2018)Ian Thomas
 
Why Speed Matters
Why Speed MattersWhy Speed Matters
Why Speed MattersIan Thomas
 
What Is Software Engineering?
What Is Software Engineering?What Is Software Engineering?
What Is Software Engineering?Ian Thomas
 
Practical functional programming in JavaScript for the non-mathematician
Practical functional programming in JavaScript for the non-mathematicianPractical functional programming in JavaScript for the non-mathematician
Practical functional programming in JavaScript for the non-mathematicianIan Thomas
 
Does Anyone Remember YAGNI?
Does Anyone Remember YAGNI?Does Anyone Remember YAGNI?
Does Anyone Remember YAGNI?Ian Thomas
 
Patterns For React Application Design
Patterns For React Application DesignPatterns For React Application Design
Patterns For React Application DesignIan Thomas
 

More from Ian Thomas (9)

Whose Stack Is It Anyway?
Whose Stack Is It Anyway?Whose Stack Is It Anyway?
Whose Stack Is It Anyway?
 
Influencing Without Authority: Effective Staff+ Engineering
Influencing Without Authority: Effective Staff+ EngineeringInfluencing Without Authority: Effective Staff+ Engineering
Influencing Without Authority: Effective Staff+ Engineering
 
Strategies For High Quality Serverless Applications on AWS
Strategies For High Quality Serverless Applications on AWSStrategies For High Quality Serverless Applications on AWS
Strategies For High Quality Serverless Applications on AWS
 
Breaking Out Of The Fear Cycle (LambdaConf 2018)
Breaking Out Of The Fear Cycle (LambdaConf 2018)Breaking Out Of The Fear Cycle (LambdaConf 2018)
Breaking Out Of The Fear Cycle (LambdaConf 2018)
 
Why Speed Matters
Why Speed MattersWhy Speed Matters
Why Speed Matters
 
What Is Software Engineering?
What Is Software Engineering?What Is Software Engineering?
What Is Software Engineering?
 
Practical functional programming in JavaScript for the non-mathematician
Practical functional programming in JavaScript for the non-mathematicianPractical functional programming in JavaScript for the non-mathematician
Practical functional programming in JavaScript for the non-mathematician
 
Does Anyone Remember YAGNI?
Does Anyone Remember YAGNI?Does Anyone Remember YAGNI?
Does Anyone Remember YAGNI?
 
Patterns For React Application Design
Patterns For React Application DesignPatterns For React Application Design
Patterns For React Application Design
 

Recently uploaded

What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationJuha-Pekka Tolvanen
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxalwaysnagaraju26
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrandmasabamasaba
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Bert Jan Schrijver
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...masabamasaba
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnAmarnathKambale
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareJim McKeeth
 
tonesoftg
tonesoftgtonesoftg
tonesoftglanshi9
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...masabamasaba
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburgmasabamasaba
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...masabamasaba
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...Jittipong Loespradit
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park masabamasaba
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...masabamasaba
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park masabamasaba
 

Recently uploaded (20)

What Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the SituationWhat Goes Wrong with Language Definitions and How to Improve the Situation
What Goes Wrong with Language Definitions and How to Improve the Situation
 
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
Abortion Pill Prices Tembisa [(+27832195400*)] 🏥 Women's Abortion Clinic in T...
 
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptxBUS PASS MANGEMENT SYSTEM USING PHP.pptx
BUS PASS MANGEMENT SYSTEM USING PHP.pptx
 
%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand%in Midrand+277-882-255-28 abortion pills for sale in midrand
%in Midrand+277-882-255-28 abortion pills for sale in midrand
 
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
Devoxx UK 2024 - Going serverless with Quarkus, GraalVM native images and AWS...
 
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital TransformationWSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
WSO2Con2024 - WSO2's IAM Vision: Identity-Led Digital Transformation
 
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
%+27788225528 love spells in Boston Psychic Readings, Attraction spells,Bring...
 
VTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learnVTU technical seminar 8Th Sem on Scikit-learn
VTU technical seminar 8Th Sem on Scikit-learn
 
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
WSO2Con2024 - GitOps in Action: Navigating Application Deployment in the Plat...
 
Announcing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK SoftwareAnnouncing Codolex 2.0 from GDK Software
Announcing Codolex 2.0 from GDK Software
 
tonesoftg
tonesoftgtonesoftg
tonesoftg
 
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
%+27788225528 love spells in Atlanta Psychic Readings, Attraction spells,Brin...
 
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
%in Rustenburg+277-882-255-28 abortion pills for sale in Rustenburg
 
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
%+27788225528 love spells in Colorado Springs Psychic Readings, Attraction sp...
 
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
MarTech Trend 2024 Book : Marketing Technology Trends (2024 Edition) How Data...
 
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park %in kempton park+277-882-255-28 abortion pills for sale in kempton park
%in kempton park+277-882-255-28 abortion pills for sale in kempton park
 
WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?WSO2CON 2024 - Does Open Source Still Matter?
WSO2CON 2024 - Does Open Source Still Matter?
 
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
%+27788225528 love spells in new york Psychic Readings, Attraction spells,Bri...
 
WSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go PlatformlessWSO2CON2024 - It's time to go Platformless
WSO2CON2024 - It's time to go Platformless
 
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park %in ivory park+277-882-255-28 abortion pills for sale in ivory park
%in ivory park+277-882-255-28 abortion pills for sale in ivory park
 

Orchestration vs Choreography - A Guide To Composing Your Monolith

  • 1. Orchestration vs Choreography A Guide To Composing Your Monolith Ian Thomas www.ian-thomas.net | @anatomic | linkedin.com/in/anatomic 2023
  • 4.
  • 6. Hi 👋, I’m Ian I’m a software engineer from the UK, currently building work products at Meta as part of Reality Labs. Previously, I was VP of Web Architecture for Genesis and Chief Digital Technology Architect for PokerStars. www.ian-thomas.net | @anatomic | linkedin.com/in/anatomic
  • 7. 󰞽 On The Menu Today… ● The need for change and how our decisions impact it ● How complexity and coupling are conspiring to slow your progress ● Orchestration and choreography patterns ● State, data, failure and humans ● Tooling and processes to help smooth the road I encourage you to keep in mind five “C”s: Communication, Consistency, Coordination, Coupling and Complexity
  • 8. Lehman’s Laws of Software Evolution Programs, Life Cycles and Laws of Software Evolution
  • 9. Continuing Change Self Regulation Conservation of Familiarity Declining Quality Increasing Complexity Conservation of Organisational Stability Continuing Growth Feedback System
  • 10. Continuing Change Self Regulation Conservation of Familiarity Declining Quality Increasing Complexity Conservation of Organisational Stability Continuing Growth Feedback System Requires continual adaptation or it becomes progressively less satisfactory Complexity increases unless work is done to maintain or reduce it Functional content must be continually increased to maintain user satisfaction Quality will appear to be declining unless a system is rigorously maintained and adapted to operational environment changes
  • 11. Continuing Change Self Regulation Conservation of Familiarity Declining Quality Increasing Complexity Conservation of Organisational Stability Continuing Growth Feedback System
  • 12. Continuing Change Self Regulation Conservation of Familiarity Declining Quality Increasing Complexity Conservation of Organisational Stability Continuing Growth Feedback System Change in the world outside systems drives the need for growth and change within
  • 13. Continuing Change Self Regulation Conservation of Familiarity Declining Quality Increasing Complexity Conservation of Organisational Stability Continuing Growth Feedback System Change in the world outside systems drives the need for growth and change within Change in the system itself is self-limiting unless deliberate effort is exerted
  • 14. “[..] shows the continuing growth of the system (first law) albeit at a declining rate (demonstrably due to increasing difficulty of change, growing complexity (second law)” M. Lehman - Program, Life Cycles, and Laws of Software Evolution
  • 15.
  • 16.
  • 17. Which chart most closely matches your situation?
  • 18. Which chart most closely matches your situation?
  • 25. Bounded Contexts Ubiquitous Languages Svc Svc Svc Svc Svc Svc Svc Svc Svc Subdomain Interchange Contexts
  • 29.
  • 30.
  • 31.
  • 32.
  • 34.
  • 35. The orchestrator can manage compensatory actions ��
  • 36. Circuit Breakers Timeouts* Service Discovery Retries Healthchecks Auto-scaling Bulkheads Mutual TLS Handling Failure Many of these requirements can be pushed to the platform
  • 37.
  • 38. Orchestration Pro Con Single controller managing workflow state Single point of failure Complex error handling is easier to manage Additional latency Platform tooling increasingly removing complexity from applications (especially for synchronous calls) Scalability Recoverability Responsiveness Lower cognitive load Coupling between orchestrator and services Version controllable workflow definitions Lots of tooling to support o11y of API driven services
  • 40.
  • 41.
  • 44. Types of Event Event Notification Announcing facts, with no expectation of action or response Event-Carried State Transfer Reduce chattiness between services by including data in the event Event Sourcing Events are recorded in a persistent log, allowing for replay and state reconstruction CQRS Separate reading and writing, handles broad variation in access patterns Martin Fowler - What do you mean by “Event-Driven”?
  • 45.
  • 46.
  • 47.
  • 48.
  • 49.
  • 50.
  • 51. Message size Extra infrastructure Infinite loops Error handling Delivery semantics Workflow level timeouts Idempotency Ordering Versioning State management Choreography Considerations
  • 53. Choreography Pro Con Weak coupling between services Complexity grows rapidly with event cardinality Scalability Typically requires intermediate infrastructure Responsiveness Versioning of events Fault tolerance, no single point of failure No single view of workflow state High throughput Hard to version control workflow Error handling (especially at the workflow level)
  • 55. …use orchestration within the bounded context of a microservice, but use choreography between bounded-contexts. Yan Cui – Choreography vs Orchestration in the land of serverless
  • 56. …use orchestration within the bounded context of a microservice, but use choreography between bounded-contexts. Yan Cui – Choreography vs Orchestration in the land of serverless
  • 58. Formally Specified Informally Specified How formally do you need to specify your workflow? Orchestration service, workflow defined using DSL/programming language (declarative) Custom orchestrator, workflow defined in general purpose programming language (imperative) Front controller knows about workflow Stateless, hopefully documented, potentially just in a few people’s heads Orchestration Choreography
  • 59. An architect can never reduce semantic coupling via implementation, but they can make it worse. Neal Ford, Mark Richards, Pramod Sadalage & Zhamak Dehghani – Software Architecture: The Hard Parts
  • 60. Coupling Essential Accidental Systems necessarily coupled to deliver value Poor or non-existent system design or development processes
  • 61. Types of Coupling Operational A consumer can’t run without a provider Developmental Changes in producers and consumers must be coordinated Semantic Change together because of shared concepts Functional Change together because of shared responsibility Incidental Change together for no good reason Michael Nygard - Uncoupling Temporal effects?
  • 62.
  • 63. Will you be seated?
  • 64.
  • 65.
  • 66.
  • 67.
  • 68. What about 3 people?
  • 69.
  • 70. 12.5% chance of being seated
  • 71. Adding further people quickly reduces your chances of being seated on time to (effectively) 0
  • 72. Adding further people quickly reduces your chances of being seated on time to (effectively) 0
  • 74. Types of Coupling Operational A consumer can’t run without a provider Developmental Changes in producers and consumers must be coordinated Semantic Change together because of shared concepts Functional Change together because of shared responsibility Incidental Change together for no good reason Michael Nygard - Uncoupling Organisational Progress can only be achieved through others
  • 76. The value of orchestration increases with workflow complexity, notably with complex error scenarios. Comparatively, responsiveness and scalability requirements favour choreography, especially when error handling is minimal.
  • 77. Orchestration Choreography Operational Coupling Strong Very weak Developmental Coupling Strong Weaker, caution advised Semantic Coupling Less Strong Weak Functional Coupling Less Strong Weak Incidental Coupling Less likely, potentially easier to find Harder to find, more sinister when present Scalability Scale cascades, less suitable for parallelism Backpressure to decouple, easier to parallelise Reliability Only as good as your weakest link Careful design decouples uptime Responsiveness Central bottleneck, processing chains add latency Highly responsive due to reduced operational coupling Fault Tolerance Low, due to single point of failure effect Excellent Error Handling Eased through central state management Harder, risk of event explosion and passive/aggressive Cognitive Load Lower Complexity grows with number of events Observability Traditional tooling and central state make o11y easier Potentially more difficult, requires strong platform support Orchestration vs Choreography @anatomic’s rough guide to
  • 78. Making “IT” Work Avoiding gotcha’s, no matter the pattern
  • 79.
  • 81. Four pillars of Event Streaming Capabilities Business Function Instrumentation Control Plane Operational Plane Actually doing the work we need, the business function (or “core” plane) is where the value lies for our customers and the business. The metrics and telemetry necessary for us to determine if the system is working as expected. Systems will keep on chugging, even when we might need them to stop. Control planes help manage change, including pausing, scaling and rate-limiting. Tooling and processes to help run our systems, including addressing failure modes (wiping data and corrective actions), upgrade processes and evolutionary support. https://www.confluent.io/en-gb/blog/journey-to-event-driven-part-4-four-pillars-of-event-streaming-microservices/ More difficult to implement in event-driven systems
  • 83. A B What’s in a line?
  • 84. A B What’s in a line? Inter-process communication Traffic flow DNS Service discovery Routing Schemas Certificates Firewall Physical connection Load balancing AuthN/AuthZ Secrets Data format Protocol Failure modes
  • 85. A B What’s in a line? Inter-process communication Traffic flow DNS Service discovery Routing Schemas Certificates Firewall Physical connection Load balancing AuthN/AuthZ Secrets Data format Protocol Failure modes
  • 86. A B What’s in a line? Inter-process communication Traffic flow DNS Service discovery Routing Schemas Certificates Firewall Physical connection Load balancing AuthN/AuthZ Secrets Data format Protocol Failure modes Different priorities Required changes Change management ITIL Change Advisory Boards Time zones Backlogs Scrum of Scrums Language
  • 87. A B What’s in a line? Inter-process communication Traffic flow DNS Service discovery Routing Schemas Certificates Firewall Physical connection Load balancing AuthN/AuthZ Secrets Data format Protocol Failure modes Different priorities Required changes Change management ITIL Change Advisory Boards Time zones Backlogs Scrum of Scrums Language 🤯
  • 88. A B What’s in a line? Inter-process communication Traffic flow DNS Service discovery Routing Schemas Certificates Firewall Physical connection Load balancing AuthN/AuthZ Secrets Data format Protocol Failure modes Different priorities Required changes Change management ITIL Change Advisory Boards Time zones Backlogs Scrum of Scrums Language Testing Long-running workflows Schema evolution Ownership of workflow state Fallacies of distributed computing Team geo-distribution Serialisation formats Distributed tracing Accidental coupling Self-service infrastructure How are you going to handle… And all the other stuff that won’t fit on a slide
  • 89.
  • 90. Schema Evolution Operational Changes Allowed Schemas Validated Upgrade First Backward ● Delete fields ● Add optional fields Last version Consumers Backward transitive ● Delete fields ● Add optional fields All previous versions Consumers Forward ● Add fields ● Delete optional fields Last version Producers Forward transitive ● Add fields ● Delete optional fields All previous versions Producers Full ● Add optional fields ● Delete optional fields Last version Any order Full transitive ● Add optional fields ● Delete optional fields All previous versions Any order None ● All changes accepted None Depends https://docs.confluent.io/platform/current/schema-registry/avro.html - compatibility-types
  • 91. A B What’s in a line? Inter-process communication Traffic flow DNS Service discovery Routing Schemas Certificates Firewall Physical connection Load balancing AuthN/AuthZ Secrets Data format Protocol Failure modes Different priorities Required changes Change management ITIL Change Advisory Boards Time zones Backlogs Scrum of Scrums Language Testing Long-running workflows Schema evolution Ownership of workflow state Fallacies of distributed computing Team geo-distribution Serialisation formats Distributed tracing Accidental coupling Self-service infrastructure How are you going to handle… And all the other stuff that won’t fit on a slide
  • 92.
  • 93. Favour orchestration for complex workflows, choreography for scalability + weaker coupling Enable long-term changeability through deliberate design + trade-off analysis Complexity breeds in the bits between our systems, handle with care (+ don’t forget about the humans!) www.ian-thomas.net | @anatomic | linkedin.com/in/anatomic
  • 94. Thanks 🖖 If you’re interested in chatting more about any of the topics covered in this talk, come and grab me in the hallway track or virtually through Twitter or LinkedIn. Thank you for coming to hear me speak! www.ian-thomas.net | @anatomic | linkedin.com/in/anatomic 2023