SlideShare a Scribd company logo
1 of 43
Download to read offline
@crichardson
Designing loosely coupled
microservices
Chris Richardson
Microservice architecture consultant and trainer
Founder of Eventuate.io
Founder of the original CloudFoundry.com
Author of POJOs in Action and Microservices Patterns
@crichardson
chris@chrisrichardson.net
http://adopt.microservices.io
Copyright © 2020. Chris Richardson Consulting, Inc. All rights reserved
@crichardson
What you will learn
The different types of coupling
Their drawbacks
How to design loosely coupled services
@crichardson
About Chris
http://adopt.microservices.io
@crichardson
Discounts
35% discount
ctwcloudnativev20
$120 discount coupon
YKXQSOXG
http://adopt.microservices.io
@crichardson
Agenda
• Microservices and coupling
• Minimizing design time coupling
• Reducing runtime coupling
• Avoiding infrastructure coupling
Pattern: microservice
architecture
Highly maintainable and
testable
Minimal lead time (time from
commit to deploy)
Loosely coupled
Independently deployable
Implements a business
capability
Owned/developed/tested/
deployed by a small team
An architectural
style
that structures an
application as a
set of deployable/
executable units,
a.k.a. services
A service is:
@crichardson
Food to Go: Microservice
architecture
Browser
Mobile
Application
API
Gateway
Order
Service
Restaurant
Service
Delivery
Service
…
Service
Order
Database
Restaurant
Database
Delivery
Database
…
Database
REST
REST
JavaScript
Message
Broker
@crichardson
Why microservices: success triangle
Process: Lean + DevOps/Continuous Delivery & Deployment
Organization:
Network of small,
loosely coupled, teams
Architecture:
Microservices
(sometimes)
IT must deliver software
rapidly, frequently, reliably and
sustainably
Enables:
Loose
coupling
Enables:
Testability
DeployabilityBusinesses must be
nimble, agile and
innovate faster
S/W VUCA
@crichardson
Loose coupling is essential
Services collaborate, e.g. Order Service must
reserve customer credit
Coupling is inevitable
BUT
Services must be loosely coupled
API
Order
Service
Customer
Service
reserveCredit()
Runtime coupling
Order Service cannot respond to a synchronous request (e.g.
HTTP POST) until Customer Service responds
Reduces availability
VS
Design time coupling
Change Customer Service change Order Service
Reduces development velocity
Neither is guaranteed: you must design your
services to be loosely coupled
@crichardson
Degree of coupling
=
f( )
Service boundaries
Service responsibilities
Service APIs
Service collaborations
@crichardson
Agenda
• Microservices and coupling
• Minimizing design time coupling
• Reducing runtime coupling
• Avoiding infrastructure coupling
Development in high performing
organizations
“Complete their work without communicating and
coordinating with people outside their team”
“Make large-scale changes to the design of their system
without depending on other teams to make changes in
their systems or creating significant work for other teams”
….
Loose design-time coupling/modularity
=
Need to avoid lock step
changes
Design-time coupling requires
coordination between teams:
e.g. Meetings to discuss API
changes
Slows down development
Worst case is a distributed
monolith: multiple services
frequently changing in lock step
Essential to minimize design time
coupling
API
Order
Service
Customer
Service
reserveCredit()
Change
Requires change here
Order team
Customer team
@crichardson
Example change: adding a
COVID delivery surcharge
interface OrderService {
Order getOrder()
…
}
class Order
…
Money tax
Money serviceFee
Money deliveryFee
…
}
No explicit
total
Money covidSurchargeNew!
Order
Service
Accounting
Service
…
Service
…
Service
Update
Calculate Calculate Calculate
Calculate
@crichardson
DRY (Don't repeat yourself)
services
"Every piece of
knowledge must have
a single, unambiguous,
authoritative
representation within a
system"
https://en.wikipedia.org/wiki/Don%27t_repeat_yourself
For example:
Order Total
Shared library that calculates Order
Total != DRY
Shared libraries containing
business logic that changes
requires multiple services
to change/rebuild/
redeployed in lock step ❌
Shared utility libraries ✅
Service A
Library
Service B
Library
Service …
Library
Change
@crichardson
DRY: calculate Order Total in
the Order Service
interface OrderService {
Order getOrder()
…
}
class Order
…
Money tax
Money serviceFee
Money deliveryFee
…
}
Money total
Order
Service
Accounting
Service
…
Service
…
Service
Update
Calculate
@crichardson
Icebergs: expose as little as possible
Implementation
API
Small, stable
API
Large, complex
implementation
Change
What’s hidden can be
changed without
impacting client
Twilio: sendSms(from, to, message)
Consumer
Consume as little as possible
Postel’s Robustness
principle: https://
en.wikipedia.org/wiki/
Robustness_principle
Consumer-driven contract
tests verify compliance
Swagger/Protobuf-
generated stubs parse
everything!
{
…
"tax": …
"serviceFee": …
"deliveryFee": …
"total": "12.34"
…
}
class Order {
Money total;
}
What you ignore can’t affect you
The downside of sharing
database tables
Schema changes require
Coordination across teams
Overhead of maintaining
backwards compatibility
Duplication of data access logic
Updates require duplication of
consistency enforcement
business logic
Order
Service
Customer
Service
Database
Customer
table
Tight design-
time/runtime
coupling
Duplicated
code
Duplicated
code
Use a database-per-service
Order
Service
Customer
Service
Database
Customer
table
Tight design-
time/runtime
coupling
Order
Service
Customer
Service
Order database
Order
table
Customer database
Customer
table
APIs
only
@crichardson
Agenda
• Microservices and coupling
• Minimizing design time coupling
• Reducing runtime coupling
• Avoiding infrastructure coupling
@crichardson
The trouble with synchronous IPC :
runtime coupling reduced availability
Order
Service
Customer
Service
PUT /customer/id/credit
availability(createOrder) =
availability(OrderService) x
availability(CustomerService)
POST /order
😢
Order Customer
creditLimit
availableCredit
Problem:
Developers treat services as if they are programming
language-level modules (that communicate via HTTP)
Consequences:
IPC is relatively expensive high latency
Synchronous communication temporal coupling
reduced availability - serviceAvailabilitynumber of services
Anti-pattern: Distribution is
free
@crichardson
Essential: Use resilience patterns for
synchronous communication
https://github.com/resilience4j/resilience4j#resilience-patterns
@crichardson
Self-contained service:
Can handle a synchronous
request without waiting for a
response from another service
https://microservices.io/patterns/decomposition/self-contained-service.html
@crichardson
Order
Service
Order Management
Customer Management
Improving availability: replace
service with module
POST /order
Order
Customer
creditLimit
availableCredit
availability(createOrder) =
availability(OrderService)
More available 😄
Larger service/
team 😢
Response =
validation
outcome 😄
@crichardson
messaging system
Use asynchronous messaging
Sender Recipient
Message
Channel
Payload
Header
http://bit.ly/books-eip
Channel types:
• Point-to-point
• Publish/Subscribe
@crichardson
Improving availability: sagas
Order
Service
Customer
Service
availability(createOrder) =
availability(OrderService)
POST /order
Credit Reserved
More available 😄
Complexity of sagas 😢
Order created
Response =! Validation
outcome 😢
Order events
Customer events
https://microservices.io/patterns/data/saga.html
@crichardson
Improving availability: move
responsibility + CQRS
Order
Service Customer
Service
availability(createOrder) =
availability(OrderService)
POST /order
Customer
Created
More available 😄
Complex/Costly 😢
Response =
validation
outcome 😄
Customer
creditLimit
availableCredit
Replicated
Owned
Customer
creditLimit
availableCredit
Credit Limit
Changed
https://microservices.io/patterns/data/cqrs.html
Stale data? 😢
Confusing? 😢
@crichardson
Agenda
• Microservices and coupling
• Minimizing design time coupling
• Reducing runtime coupling
• Avoiding infrastructure coupling
@crichardson
Indirect coupling via infrastructure
Virtual infrastructure:
compute, storage, network
Kubernetes
Service Mesh
Infrastructure services:
databases, message,
brokers, …
Service
A
Service
B
Service
…
Static
Dynamic
Susceptible to
operator
misconfiguration
global impact
Services compete for
limited resources
Loosely coupled
BUT
The trouble with shared
infrastructure: resource contention
Order
Service
Customer
Service
Database Server
Order
Database
Customer
Database
Runaway
scenario
High resource
utilization
Unavailable
The trouble with shared
infrastructure: misconfiguration
Order
Service
Customer
Service
Database Server
Order
Database
Customer
Database
Unavailable
Risk of
misconfiguration
Unavailable
Clustering doesn’t help with
misconfiguration
Monzo bank, July 29th, 2019
Single large Cassandra
cluster that was
misconfigured
Adding capacity outage
https://monzo.com/blog/
2019/09/08/why-monzo-
wasnt-working-on-
july-29th
AWS Kinesis, Nov 25th,
2020
Attempted to expand
Kinesis “front-end fleet”
# threads (one-per-peer)
exceeded max OS limit
https://aws.amazon.com/
message/11201/
Database Server
Use private infrastructure: minimizes
resource contention and blast radius
Order
Service
Customer
Service
Database Server
Order
Database
Customer
Database
@crichardson
Message broker
Message brokers need to be
shared!
Broker
Node
Order
Service
Customer
Service
Broker
Node
Control plane What about
misconfiguration?
@crichardson
Message
broker
cluster
Use “Private” message brokers
Order
Service
Customer
Service
Message
broker
cluster
Control plane Control plane
Bridge
Critical Less Critical
@crichardson
Shared infrastructure: Service
mesh
What about
misconfiguration?
Synchronous communication =
runtime coupling!
Fault isolated swim lanes
Partition/Route by
“value”, e.g.
CustomerID
And/Or
function, e.g.
User
management,
Order
Management
Virtual Infra.
Kubernetes
Service Mesh
Infra. services
Service
A
Service
B
Service
…
Routing
Async
Swim lane 1 Swim lane 2
Virtual Infra.
Kubernetes
Service Mesh
Infra. services
Service
A
Service
B
Service
…
@crichardson
Summary
Rapid and frequent development requires loose design-time
coupling
Loose runtime coupling is important for availability
Avoid synchronous communication but use resilience patterns
when you do
Strive for self-contained services
Avoid coupling at the infrastructure level: avoid shared
services, use swim lanes, ….
@crichardson
@crichardson chris@chrisrichardson.net
http://adopt.microservices.io
Questions?
ctwcloudnativev20 YKXQSOXG

More Related Content

What's hot

Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitecturePaul Mooney
 
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
Scenarios_and_Architecture_SkillsMatter_April_2022.pdfScenarios_and_Architecture_SkillsMatter_April_2022.pdf
Scenarios_and_Architecture_SkillsMatter_April_2022.pdfChris Richardson
 
From Monolithic to Microservices
From Monolithic to Microservices From Monolithic to Microservices
From Monolithic to Microservices Amazon Web Services
 
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...Chris Richardson
 
Building Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache KafkaBuilding Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache KafkaGuido Schmutz
 
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...Edureka!
 
Developing event-driven microservices with event sourcing and CQRS (london Ja...
Developing event-driven microservices with event sourcing and CQRS (london Ja...Developing event-driven microservices with event sourcing and CQRS (london Ja...
Developing event-driven microservices with event sourcing and CQRS (london Ja...Chris Richardson
 
Tieto Application Operations
Tieto Application OperationsTieto Application Operations
Tieto Application OperationsAdrian Gafrik
 
Service Mesh with Apache Kafka, Kubernetes, Envoy, Istio and Linkerd
Service Mesh with Apache Kafka, Kubernetes, Envoy, Istio and LinkerdService Mesh with Apache Kafka, Kubernetes, Envoy, Istio and Linkerd
Service Mesh with Apache Kafka, Kubernetes, Envoy, Istio and LinkerdKai Wähner
 
Architecting security and governance through policy guardrails in Amazon EKS ...
Architecting security and governance through policy guardrails in Amazon EKS ...Architecting security and governance through policy guardrails in Amazon EKS ...
Architecting security and governance through policy guardrails in Amazon EKS ...Amazon Web Services
 
Webinar: Implementation of 10 Integration Patterns on iPaaS Platform
Webinar: Implementation of 10 Integration Patterns on iPaaS PlatformWebinar: Implementation of 10 Integration Patterns on iPaaS Platform
Webinar: Implementation of 10 Integration Patterns on iPaaS PlatformAPPSeCONNECT
 
Migrating Enterprise Applications to AWS: Best Practices & Techniques (ENT303...
Migrating Enterprise Applications to AWS: Best Practices & Techniques (ENT303...Migrating Enterprise Applications to AWS: Best Practices & Techniques (ENT303...
Migrating Enterprise Applications to AWS: Best Practices & Techniques (ENT303...Amazon Web Services
 
Mucon: Not Just Events: Developing Asynchronous Microservices
Mucon: Not Just Events: Developing Asynchronous MicroservicesMucon: Not Just Events: Developing Asynchronous Microservices
Mucon: Not Just Events: Developing Asynchronous MicroservicesChris Richardson
 
Big Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingBig Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingAraf Karsh Hamid
 
More the merrier: a microservices anti-pattern
More the merrier: a microservices anti-patternMore the merrier: a microservices anti-pattern
More the merrier: a microservices anti-patternChris Richardson
 
Micro services Architecture
Micro services ArchitectureMicro services Architecture
Micro services ArchitectureAraf Karsh Hamid
 

What's hot (20)

Microservice vs. Monolithic Architecture
Microservice vs. Monolithic ArchitectureMicroservice vs. Monolithic Architecture
Microservice vs. Monolithic Architecture
 
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
Scenarios_and_Architecture_SkillsMatter_April_2022.pdfScenarios_and_Architecture_SkillsMatter_April_2022.pdf
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
 
Introduction to microservices
Introduction to microservicesIntroduction to microservices
Introduction to microservices
 
From Monolithic to Microservices
From Monolithic to Microservices From Monolithic to Microservices
From Monolithic to Microservices
 
Introduction to Microservices
Introduction to MicroservicesIntroduction to Microservices
Introduction to Microservices
 
Why Microservice
Why Microservice Why Microservice
Why Microservice
 
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
 
Building Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache KafkaBuilding Event Driven (Micro)services with Apache Kafka
Building Event Driven (Micro)services with Apache Kafka
 
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
Microservice Architecture | Microservices Tutorial for Beginners | Microservi...
 
Developing event-driven microservices with event sourcing and CQRS (london Ja...
Developing event-driven microservices with event sourcing and CQRS (london Ja...Developing event-driven microservices with event sourcing and CQRS (london Ja...
Developing event-driven microservices with event sourcing and CQRS (london Ja...
 
Tieto Application Operations
Tieto Application OperationsTieto Application Operations
Tieto Application Operations
 
Service Mesh with Apache Kafka, Kubernetes, Envoy, Istio and Linkerd
Service Mesh with Apache Kafka, Kubernetes, Envoy, Istio and LinkerdService Mesh with Apache Kafka, Kubernetes, Envoy, Istio and Linkerd
Service Mesh with Apache Kafka, Kubernetes, Envoy, Istio and Linkerd
 
Architecting security and governance through policy guardrails in Amazon EKS ...
Architecting security and governance through policy guardrails in Amazon EKS ...Architecting security and governance through policy guardrails in Amazon EKS ...
Architecting security and governance through policy guardrails in Amazon EKS ...
 
Webinar: Implementation of 10 Integration Patterns on iPaaS Platform
Webinar: Implementation of 10 Integration Patterns on iPaaS PlatformWebinar: Implementation of 10 Integration Patterns on iPaaS Platform
Webinar: Implementation of 10 Integration Patterns on iPaaS Platform
 
Migrating Enterprise Applications to AWS: Best Practices & Techniques (ENT303...
Migrating Enterprise Applications to AWS: Best Practices & Techniques (ENT303...Migrating Enterprise Applications to AWS: Best Practices & Techniques (ENT303...
Migrating Enterprise Applications to AWS: Best Practices & Techniques (ENT303...
 
Mucon: Not Just Events: Developing Asynchronous Microservices
Mucon: Not Just Events: Developing Asynchronous MicroservicesMucon: Not Just Events: Developing Asynchronous Microservices
Mucon: Not Just Events: Developing Asynchronous Microservices
 
Big Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingBig Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb Sharding
 
Event Storming and Saga
Event Storming and SagaEvent Storming and Saga
Event Storming and Saga
 
More the merrier: a microservices anti-pattern
More the merrier: a microservices anti-patternMore the merrier: a microservices anti-pattern
More the merrier: a microservices anti-pattern
 
Micro services Architecture
Micro services ArchitectureMicro services Architecture
Micro services Architecture
 

Similar to Designing loosely coupled services

QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice ArchitectureQConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice ArchitectureChris Richardson
 
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...Chris Richardson
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architectureChris Richardson
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonJAXLondon2014
 
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...Chris Richardson
 
Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)Chris Richardson
 
A pattern language for microservices - June 2021
A pattern language for microservices - June 2021 A pattern language for microservices - June 2021
A pattern language for microservices - June 2021 Chris Richardson
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Chris Richardson
 
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...Chris Richardson
 
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...Chris Richardson
 
Microservices pattern language (microxchg microxchg2016)
Microservices pattern language (microxchg microxchg2016)Microservices pattern language (microxchg microxchg2016)
Microservices pattern language (microxchg microxchg2016)Chris Richardson
 
A pattern language for microservices
A pattern language for microservicesA pattern language for microservices
A pattern language for microservicesVMware Tanzu
 
A pattern language for microservices (melbourne)
A pattern language for microservices (melbourne)A pattern language for microservices (melbourne)
A pattern language for microservices (melbourne)Chris Richardson
 
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...Chris Richardson
 
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...Docker, Inc.
 
Microservices + Events + Docker = A Perfect Trio (dockercon)
Microservices + Events + Docker = A Perfect Trio (dockercon)Microservices + Events + Docker = A Perfect Trio (dockercon)
Microservices + Events + Docker = A Perfect Trio (dockercon)Chris Richardson
 
Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...Chris Richardson
 
SVCC Microservices: Decomposing Applications for Testability and Deployability
SVCC Microservices: Decomposing Applications for Testability and Deployability SVCC Microservices: Decomposing Applications for Testability and Deployability
SVCC Microservices: Decomposing Applications for Testability and Deployability Chris Richardson
 
There is no such thing as a microservice! (oracle code nyc)
There is no such thing as a microservice! (oracle code nyc)There is no such thing as a microservice! (oracle code nyc)
There is no such thing as a microservice! (oracle code nyc)Chris Richardson
 
Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!Chris Richardson
 

Similar to Designing loosely coupled services (20)

QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice ArchitectureQConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
 
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
 
#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture#JaxLondon keynote: Developing applications with a microservice architecture
#JaxLondon keynote: Developing applications with a microservice architecture
 
Developing Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris RichardsonDeveloping Applications with a Micro Service Architecture - Chris Richardson
Developing Applications with a Micro Service Architecture - Chris Richardson
 
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...
 
Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)Developing applications with a microservice architecture (svcc)
Developing applications with a microservice architecture (svcc)
 
A pattern language for microservices - June 2021
A pattern language for microservices - June 2021 A pattern language for microservices - June 2021
A pattern language for microservices - June 2021
 
Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...Developing applications with a microservice architecture (SVforum, microservi...
Developing applications with a microservice architecture (SVforum, microservi...
 
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
 
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
 
Microservices pattern language (microxchg microxchg2016)
Microservices pattern language (microxchg microxchg2016)Microservices pattern language (microxchg microxchg2016)
Microservices pattern language (microxchg microxchg2016)
 
A pattern language for microservices
A pattern language for microservicesA pattern language for microservices
A pattern language for microservices
 
A pattern language for microservices (melbourne)
A pattern language for microservices (melbourne)A pattern language for microservices (melbourne)
A pattern language for microservices (melbourne)
 
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
Omnikron webbinar - Microservices: enabling the rapid, frequent, and reliable...
 
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
 
Microservices + Events + Docker = A Perfect Trio (dockercon)
Microservices + Events + Docker = A Perfect Trio (dockercon)Microservices + Events + Docker = A Perfect Trio (dockercon)
Microservices + Events + Docker = A Perfect Trio (dockercon)
 
Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...Decompose your monolith: Six principles for refactoring a monolith to microse...
Decompose your monolith: Six principles for refactoring a monolith to microse...
 
SVCC Microservices: Decomposing Applications for Testability and Deployability
SVCC Microservices: Decomposing Applications for Testability and Deployability SVCC Microservices: Decomposing Applications for Testability and Deployability
SVCC Microservices: Decomposing Applications for Testability and Deployability
 
There is no such thing as a microservice! (oracle code nyc)
There is no such thing as a microservice! (oracle code nyc)There is no such thing as a microservice! (oracle code nyc)
There is no such thing as a microservice! (oracle code nyc)
 
Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!Dark Energy, Dark Matter and the Microservices Patterns?!
Dark Energy, Dark Matter and the Microservices Patterns?!
 

More from Chris Richardson

The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?Chris Richardson
 
Dark energy, dark matter and microservice architecture collaboration patterns
Dark energy, dark matter and microservice architecture collaboration patternsDark energy, dark matter and microservice architecture collaboration patterns
Dark energy, dark matter and microservice architecture collaboration patternsChris Richardson
 
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...Chris Richardson
 
Events to the rescue: solving distributed data problems in a microservice arc...
Events to the rescue: solving distributed data problems in a microservice arc...Events to the rescue: solving distributed data problems in a microservice arc...
Events to the rescue: solving distributed data problems in a microservice arc...Chris Richardson
 
Microservices - an architecture that enables DevOps (T Systems DevOps day)
Microservices - an architecture that enables DevOps (T Systems DevOps day)Microservices - an architecture that enables DevOps (T Systems DevOps day)
Microservices - an architecture that enables DevOps (T Systems DevOps day)Chris Richardson
 
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...Chris Richardson
 
Overview of the Eventuate Tram Customers and Orders application
Overview of the Eventuate Tram Customers and Orders applicationOverview of the Eventuate Tram Customers and Orders application
Overview of the Eventuate Tram Customers and Orders applicationChris Richardson
 
An overview of the Eventuate Platform
An overview of the Eventuate PlatformAn overview of the Eventuate Platform
An overview of the Eventuate PlatformChris Richardson
 
#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolith#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolithChris Richardson
 
Decompose your monolith: strategies for migrating to microservices (Tide)
Decompose your monolith: strategies for migrating to microservices (Tide)Decompose your monolith: strategies for migrating to microservices (Tide)
Decompose your monolith: strategies for migrating to microservices (Tide)Chris Richardson
 
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...Chris Richardson
 
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...Chris Richardson
 
MicroCPH - Managing data consistency in a microservice architecture using Sagas
MicroCPH - Managing data consistency in a microservice architecture using SagasMicroCPH - Managing data consistency in a microservice architecture using Sagas
MicroCPH - Managing data consistency in a microservice architecture using SagasChris Richardson
 
GotoChgo 2019: Not Just Events: Developing Asynchronous Microservices
GotoChgo 2019: Not Just Events: Developing Asynchronous MicroservicesGotoChgo 2019: Not Just Events: Developing Asynchronous Microservices
GotoChgo 2019: Not Just Events: Developing Asynchronous MicroservicesChris Richardson
 
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...Chris Richardson
 
YOW2018 - Events and Commands: Developing Asynchronous Microservices
YOW2018 - Events and Commands: Developing Asynchronous MicroservicesYOW2018 - Events and Commands: Developing Asynchronous Microservices
YOW2018 - Events and Commands: Developing Asynchronous MicroservicesChris Richardson
 
OReilly SACON London: Potholes in the road from monolithic hell: Microservice...
OReilly SACON London: Potholes in the road from monolithic hell: Microservice...OReilly SACON London: Potholes in the road from monolithic hell: Microservice...
OReilly SACON London: Potholes in the road from monolithic hell: Microservice...Chris Richardson
 

More from Chris Richardson (17)

The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?The microservice architecture: what, why, when and how?
The microservice architecture: what, why, when and how?
 
Dark energy, dark matter and microservice architecture collaboration patterns
Dark energy, dark matter and microservice architecture collaboration patternsDark energy, dark matter and microservice architecture collaboration patterns
Dark energy, dark matter and microservice architecture collaboration patterns
 
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
 
Events to the rescue: solving distributed data problems in a microservice arc...
Events to the rescue: solving distributed data problems in a microservice arc...Events to the rescue: solving distributed data problems in a microservice arc...
Events to the rescue: solving distributed data problems in a microservice arc...
 
Microservices - an architecture that enables DevOps (T Systems DevOps day)
Microservices - an architecture that enables DevOps (T Systems DevOps day)Microservices - an architecture that enables DevOps (T Systems DevOps day)
Microservices - an architecture that enables DevOps (T Systems DevOps day)
 
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
 
Overview of the Eventuate Tram Customers and Orders application
Overview of the Eventuate Tram Customers and Orders applicationOverview of the Eventuate Tram Customers and Orders application
Overview of the Eventuate Tram Customers and Orders application
 
An overview of the Eventuate Platform
An overview of the Eventuate PlatformAn overview of the Eventuate Platform
An overview of the Eventuate Platform
 
#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolith#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolith
 
Decompose your monolith: strategies for migrating to microservices (Tide)
Decompose your monolith: strategies for migrating to microservices (Tide)Decompose your monolith: strategies for migrating to microservices (Tide)
Decompose your monolith: strategies for migrating to microservices (Tide)
 
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
 
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...
 
MicroCPH - Managing data consistency in a microservice architecture using Sagas
MicroCPH - Managing data consistency in a microservice architecture using SagasMicroCPH - Managing data consistency in a microservice architecture using Sagas
MicroCPH - Managing data consistency in a microservice architecture using Sagas
 
GotoChgo 2019: Not Just Events: Developing Asynchronous Microservices
GotoChgo 2019: Not Just Events: Developing Asynchronous MicroservicesGotoChgo 2019: Not Just Events: Developing Asynchronous Microservices
GotoChgo 2019: Not Just Events: Developing Asynchronous Microservices
 
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom...
 
YOW2018 - Events and Commands: Developing Asynchronous Microservices
YOW2018 - Events and Commands: Developing Asynchronous MicroservicesYOW2018 - Events and Commands: Developing Asynchronous Microservices
YOW2018 - Events and Commands: Developing Asynchronous Microservices
 
OReilly SACON London: Potholes in the road from monolithic hell: Microservice...
OReilly SACON London: Potholes in the road from monolithic hell: Microservice...OReilly SACON London: Potholes in the road from monolithic hell: Microservice...
OReilly SACON London: Potholes in the road from monolithic hell: Microservice...
 

Recently uploaded

Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...OnePlan Solutions
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogueitservices996
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfDrew Moseley
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfRTS corp
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolsosttopstonverter
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...OnePlan Solutions
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identityteam-WIBU
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringHironori Washizaki
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonApplitools
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLionel Briand
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorTier1 app
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecturerahul_net
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldRoberto Pérez Alcolea
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencessuser9e7c64
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?Alexandre Beguel
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slidesvaideheekore1
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxAndreas Kunz
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesKrzysztofKkol1
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingShane Coughlan
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 

Recently uploaded (20)

Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
Revolutionizing the Digital Transformation Office - Leveraging OnePlan’s AI a...
 
Ronisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited CatalogueRonisha Informatics Private Limited Catalogue
Ronisha Informatics Private Limited Catalogue
 
Comparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdfComparing Linux OS Image Update Models - EOSS 2024.pdf
Comparing Linux OS Image Update Models - EOSS 2024.pdf
 
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdfEnhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
Enhancing Supply Chain Visibility with Cargo Cloud Solutions.pdf
 
eSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration toolseSoftTools IMAP Backup Software and migration tools
eSoftTools IMAP Backup Software and migration tools
 
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
Tech Tuesday Slides - Introduction to Project Management with OnePlan's Work ...
 
Post Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on IdentityPost Quantum Cryptography – The Impact on Identity
Post Quantum Cryptography – The Impact on Identity
 
Machine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their EngineeringMachine Learning Software Engineering Patterns and Their Engineering
Machine Learning Software Engineering Patterns and Their Engineering
 
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + KobitonLeveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
Leveraging AI for Mobile App Testing on Real Devices | Applitools + Kobiton
 
Large Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and RepairLarge Language Models for Test Case Evolution and Repair
Large Language Models for Test Case Evolution and Repair
 
Effectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryErrorEffectively Troubleshoot 9 Types of OutOfMemoryError
Effectively Troubleshoot 9 Types of OutOfMemoryError
 
Understanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM ArchitectureUnderstanding Flamingo - DeepMind's VLM Architecture
Understanding Flamingo - DeepMind's VLM Architecture
 
Keeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository worldKeeping your build tool updated in a multi repository world
Keeping your build tool updated in a multi repository world
 
Patterns for automating API delivery. API conference
Patterns for automating API delivery. API conferencePatterns for automating API delivery. API conference
Patterns for automating API delivery. API conference
 
SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?SAM Training Session - How to use EXCEL ?
SAM Training Session - How to use EXCEL ?
 
Introduction to Firebase Workshop Slides
Introduction to Firebase Workshop SlidesIntroduction to Firebase Workshop Slides
Introduction to Firebase Workshop Slides
 
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptxUI5ers live - Custom Controls wrapping 3rd-party libs.pptx
UI5ers live - Custom Controls wrapping 3rd-party libs.pptx
 
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilitiesAmazon Bedrock in Action - presentation of the Bedrock's capabilities
Amazon Bedrock in Action - presentation of the Bedrock's capabilities
 
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full RecordingOpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
OpenChain AI Study Group - Europe and Asia Recap - 2024-04-11 - Full Recording
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 

Designing loosely coupled services

  • 1. @crichardson Designing loosely coupled microservices Chris Richardson Microservice architecture consultant and trainer Founder of Eventuate.io Founder of the original CloudFoundry.com Author of POJOs in Action and Microservices Patterns @crichardson chris@chrisrichardson.net http://adopt.microservices.io Copyright © 2020. Chris Richardson Consulting, Inc. All rights reserved
  • 2. @crichardson What you will learn The different types of coupling Their drawbacks How to design loosely coupled services
  • 4. @crichardson Discounts 35% discount ctwcloudnativev20 $120 discount coupon YKXQSOXG http://adopt.microservices.io
  • 5. @crichardson Agenda • Microservices and coupling • Minimizing design time coupling • Reducing runtime coupling • Avoiding infrastructure coupling
  • 6. Pattern: microservice architecture Highly maintainable and testable Minimal lead time (time from commit to deploy) Loosely coupled Independently deployable Implements a business capability Owned/developed/tested/ deployed by a small team An architectural style that structures an application as a set of deployable/ executable units, a.k.a. services A service is:
  • 7. @crichardson Food to Go: Microservice architecture Browser Mobile Application API Gateway Order Service Restaurant Service Delivery Service … Service Order Database Restaurant Database Delivery Database … Database REST REST JavaScript Message Broker
  • 8. @crichardson Why microservices: success triangle Process: Lean + DevOps/Continuous Delivery & Deployment Organization: Network of small, loosely coupled, teams Architecture: Microservices (sometimes) IT must deliver software rapidly, frequently, reliably and sustainably Enables: Loose coupling Enables: Testability DeployabilityBusinesses must be nimble, agile and innovate faster S/W VUCA
  • 9. @crichardson Loose coupling is essential Services collaborate, e.g. Order Service must reserve customer credit Coupling is inevitable BUT Services must be loosely coupled API Order Service Customer Service reserveCredit()
  • 10. Runtime coupling Order Service cannot respond to a synchronous request (e.g. HTTP POST) until Customer Service responds Reduces availability VS Design time coupling Change Customer Service change Order Service Reduces development velocity Neither is guaranteed: you must design your services to be loosely coupled
  • 11. @crichardson Degree of coupling = f( ) Service boundaries Service responsibilities Service APIs Service collaborations
  • 12. @crichardson Agenda • Microservices and coupling • Minimizing design time coupling • Reducing runtime coupling • Avoiding infrastructure coupling
  • 13. Development in high performing organizations “Complete their work without communicating and coordinating with people outside their team” “Make large-scale changes to the design of their system without depending on other teams to make changes in their systems or creating significant work for other teams” …. Loose design-time coupling/modularity =
  • 14. Need to avoid lock step changes Design-time coupling requires coordination between teams: e.g. Meetings to discuss API changes Slows down development Worst case is a distributed monolith: multiple services frequently changing in lock step Essential to minimize design time coupling API Order Service Customer Service reserveCredit() Change Requires change here Order team Customer team
  • 15. @crichardson Example change: adding a COVID delivery surcharge interface OrderService { Order getOrder() … } class Order … Money tax Money serviceFee Money deliveryFee … } No explicit total Money covidSurchargeNew! Order Service Accounting Service … Service … Service Update Calculate Calculate Calculate Calculate
  • 16. @crichardson DRY (Don't repeat yourself) services "Every piece of knowledge must have a single, unambiguous, authoritative representation within a system" https://en.wikipedia.org/wiki/Don%27t_repeat_yourself For example: Order Total
  • 17. Shared library that calculates Order Total != DRY Shared libraries containing business logic that changes requires multiple services to change/rebuild/ redeployed in lock step ❌ Shared utility libraries ✅ Service A Library Service B Library Service … Library Change
  • 18. @crichardson DRY: calculate Order Total in the Order Service interface OrderService { Order getOrder() … } class Order … Money tax Money serviceFee Money deliveryFee … } Money total Order Service Accounting Service … Service … Service Update Calculate
  • 19. @crichardson Icebergs: expose as little as possible Implementation API Small, stable API Large, complex implementation Change What’s hidden can be changed without impacting client Twilio: sendSms(from, to, message)
  • 20. Consumer Consume as little as possible Postel’s Robustness principle: https:// en.wikipedia.org/wiki/ Robustness_principle Consumer-driven contract tests verify compliance Swagger/Protobuf- generated stubs parse everything! { … "tax": … "serviceFee": … "deliveryFee": … "total": "12.34" … } class Order { Money total; } What you ignore can’t affect you
  • 21. The downside of sharing database tables Schema changes require Coordination across teams Overhead of maintaining backwards compatibility Duplication of data access logic Updates require duplication of consistency enforcement business logic Order Service Customer Service Database Customer table Tight design- time/runtime coupling Duplicated code Duplicated code
  • 22. Use a database-per-service Order Service Customer Service Database Customer table Tight design- time/runtime coupling Order Service Customer Service Order database Order table Customer database Customer table APIs only
  • 23. @crichardson Agenda • Microservices and coupling • Minimizing design time coupling • Reducing runtime coupling • Avoiding infrastructure coupling
  • 24. @crichardson The trouble with synchronous IPC : runtime coupling reduced availability Order Service Customer Service PUT /customer/id/credit availability(createOrder) = availability(OrderService) x availability(CustomerService) POST /order 😢 Order Customer creditLimit availableCredit
  • 25. Problem: Developers treat services as if they are programming language-level modules (that communicate via HTTP) Consequences: IPC is relatively expensive high latency Synchronous communication temporal coupling reduced availability - serviceAvailabilitynumber of services Anti-pattern: Distribution is free
  • 26. @crichardson Essential: Use resilience patterns for synchronous communication https://github.com/resilience4j/resilience4j#resilience-patterns
  • 27. @crichardson Self-contained service: Can handle a synchronous request without waiting for a response from another service https://microservices.io/patterns/decomposition/self-contained-service.html
  • 28. @crichardson Order Service Order Management Customer Management Improving availability: replace service with module POST /order Order Customer creditLimit availableCredit availability(createOrder) = availability(OrderService) More available 😄 Larger service/ team 😢 Response = validation outcome 😄
  • 29. @crichardson messaging system Use asynchronous messaging Sender Recipient Message Channel Payload Header http://bit.ly/books-eip Channel types: • Point-to-point • Publish/Subscribe
  • 30. @crichardson Improving availability: sagas Order Service Customer Service availability(createOrder) = availability(OrderService) POST /order Credit Reserved More available 😄 Complexity of sagas 😢 Order created Response =! Validation outcome 😢 Order events Customer events https://microservices.io/patterns/data/saga.html
  • 31. @crichardson Improving availability: move responsibility + CQRS Order Service Customer Service availability(createOrder) = availability(OrderService) POST /order Customer Created More available 😄 Complex/Costly 😢 Response = validation outcome 😄 Customer creditLimit availableCredit Replicated Owned Customer creditLimit availableCredit Credit Limit Changed https://microservices.io/patterns/data/cqrs.html Stale data? 😢 Confusing? 😢
  • 32. @crichardson Agenda • Microservices and coupling • Minimizing design time coupling • Reducing runtime coupling • Avoiding infrastructure coupling
  • 33. @crichardson Indirect coupling via infrastructure Virtual infrastructure: compute, storage, network Kubernetes Service Mesh Infrastructure services: databases, message, brokers, … Service A Service B Service … Static Dynamic Susceptible to operator misconfiguration global impact Services compete for limited resources Loosely coupled BUT
  • 34. The trouble with shared infrastructure: resource contention Order Service Customer Service Database Server Order Database Customer Database Runaway scenario High resource utilization Unavailable
  • 35. The trouble with shared infrastructure: misconfiguration Order Service Customer Service Database Server Order Database Customer Database Unavailable Risk of misconfiguration Unavailable
  • 36. Clustering doesn’t help with misconfiguration Monzo bank, July 29th, 2019 Single large Cassandra cluster that was misconfigured Adding capacity outage https://monzo.com/blog/ 2019/09/08/why-monzo- wasnt-working-on- july-29th AWS Kinesis, Nov 25th, 2020 Attempted to expand Kinesis “front-end fleet” # threads (one-per-peer) exceeded max OS limit https://aws.amazon.com/ message/11201/
  • 37. Database Server Use private infrastructure: minimizes resource contention and blast radius Order Service Customer Service Database Server Order Database Customer Database
  • 38. @crichardson Message broker Message brokers need to be shared! Broker Node Order Service Customer Service Broker Node Control plane What about misconfiguration?
  • 39. @crichardson Message broker cluster Use “Private” message brokers Order Service Customer Service Message broker cluster Control plane Control plane Bridge Critical Less Critical
  • 40. @crichardson Shared infrastructure: Service mesh What about misconfiguration? Synchronous communication = runtime coupling!
  • 41. Fault isolated swim lanes Partition/Route by “value”, e.g. CustomerID And/Or function, e.g. User management, Order Management Virtual Infra. Kubernetes Service Mesh Infra. services Service A Service B Service … Routing Async Swim lane 1 Swim lane 2 Virtual Infra. Kubernetes Service Mesh Infra. services Service A Service B Service …
  • 42. @crichardson Summary Rapid and frequent development requires loose design-time coupling Loose runtime coupling is important for availability Avoid synchronous communication but use resilience patterns when you do Strive for self-contained services Avoid coupling at the infrastructure level: avoid shared services, use swim lanes, ….