Mucon: Not Just Events: Developing Asynchronous Microservices

Chris Richardson
Chris RichardsonFounder of Eventuate, Inc - a microservices startup
@crichardson
Not Just Events: Developing
Asynchronous Microservices 
Chris Richardson
Founder of Eventuate.io
Founder of the original CloudFoundry.com
Author of POJOs in Action and Microservices Patterns
@crichardson
chris@chrisrichardson.net
http://learn.microservices.io
Copyright © 2018 Chris Richardson Consulting, Inc. All rights reserved
@crichardson
Presentation goal
Using asynchronous
messaging to implement
transactions and queries in a
microservice architecture
@crichardson
Presentation goal
Microservices != REST
Microservices != Events
Microservices != Event Sourcing
Apache Kafka != Event Store
@crichardson
About Chris
@crichardson
About Chris
Consultant and trainer
focussed on helping
organizations adopt the
microservice architecture
(http://www.chrisrichardson.net/)
@crichardson
About Chris
Founder of a startup that is creating
an open-source/SaaS platform
that simplifies the development of
transactional microservices
(http://eventuate.io)
@crichardson
About Chris
https://www.manning.com/books/microservices-patterns
40% discount with code
ctwmucon18
About Chris: microservices.io
Microservices pattern
language
Articles
Code examples
Microservices Assessment
Platform - coming soon
@crichardson
Agenda
Transactions, queries and microservices
Managing transactions with sagas
Implementing queries with CQRS
The microservice architecture
structures
an application as a
set of loosely coupled
services
@crichardson
API
Service = independently deployable
component
Operations
Event
Publisher
Commands
Queries
Synchronous
REST/gRPC
Asynchronous
Messaging
Events
Event
Subscriber
API
Client
Invokes
Operations
Events
Service
Database
@crichardson
Microservices enable
continuous delivery/deployment
Process:
Continuous delivery/deployment
Organization:
Small, agile, autonomous,
cross functional teams
Architecture:
Microservice architecture
Enables
Enables
Enables
Successful
Software
Development
Services
=
testability
and
deployability
Teams own services
@crichardson
Let’s imagine that you are
building an online store API
createCustomer(creditLimit)
createOrder(customerId, orderTotal)
findOrdersForCustomer(customerId)
findRecentCustomers()
Order
Management
Customer
Management
REST API
…
@crichardson
Order
Service
createCustomer()
createOrder()
findOrdersForCustomer()
findRecentCustomers()
API Gateway
createCustomer()
createOrder()
Order DatabaseCustomer Database
Order tableCustomer table
REST API
REST API
Essential for loose
coupling
Must reserve
customer’s credit
Retrieve data
from both
services
Customer
Service
REST API
availableCredit
….
OrderTotal
….
@crichardson
No ACID transactions that span
services
BEGIN TRANSACTION
…
SELECT ORDER_TOTAL
FROM ORDERS WHERE CUSTOMER_ID = ?
…
SELECT CREDIT_LIMIT
FROM CUSTOMERS WHERE CUSTOMER_ID = ?
…
INSERT INTO ORDERS …
…
COMMIT TRANSACTION
Private to the
Order Service
Private to the
Customer Service
Distributed transactions
@crichardson
Querying across services is
not straightforward
SELECT *
FROM CUSTOMER c, ORDER o
WHERE
c.id = o.ID
AND c.id = ?
Private to Customer
Service
Private to Order
Service
Find customer and their orders
@crichardson
Agenda
Transactions, queries and microservices
Managing transactions with sagas
Implementing queries with CQRS
@crichardson
From a 1987 paper
@crichardson
Saga
Use Sagas instead of 2PC
Distributed transaction
Service A Service B
Service A
Local
transaction
Service B
Local
transaction
Service C
Local
transaction
X Service C
https://microservices.io/patterns/data/saga.html
@crichardson
Order Service
Create Order Saga
Local transaction
Order
state=PENDING
createOrder()
Customer Service
Local transaction
Customer
reserveCredit()
Order Service
Local transaction
Order
state=APPROVED
approve
order()
createOrder() Initiates saga
@crichardson
Saga design challenges
API design
Synchronous REST API initiates asynchronous saga
When to send back a response?
Rollback compensating transactions
Sagas are ACD - No I
Sagas are interleaved anomalies, such as lost updates
Must use countermeasures
https://www.slideshare.net/chris.e.richardson/saturn-2018-managing-data-consistency-in-a-microservice-architecture-using-sagas
How do the saga participants
communicate?
Synchronous
communication, e.g. REST
= temporal coupling
Client and server need to
be both available
Customer Service fails
retry provided it’s
idempotent
Order Service fails Oops
Order
Service
createOrder()
REST
Customer
Service
reserveCredit()
REST
@crichardson
Collaboration using asynchronous,
broker-based messaging
Order Service
Customer
Service
….
Message broker
@crichardson
About the message broker
At least once delivery
Ensures a saga completes when its participants are
temporarily unavailable
Ordered delivery
Mechanism for scaling consumers that preserves ordering e.g.
Apache Kafka consumer group
ActiveMQ message group
@crichardson
Saga step = a transaction
local to a service
Service
Database Message Broker
update publish message/event
How to
make atomic
without 2PC?
@crichardson
How to sequence the saga
transactions?
After the completion of transaction Ti “something” must
decide what step to execute next
Success: which T(i+1) - branching
Failure: C(i - 1)
@crichardson
Choreography: distributed decision making
vs.
Orchestration: centralized decision making
@crichardson
Agenda
Overview
Choreography
Orchestration
Transactional
messaging
Transactions, queries and microservices
Managing transactions with sagas
Implementing queries with CQRS
@crichardson
Choreography-based coordination
using events
Order cancelled
Order
Service
Customer
Service
DB DB
Order created
Domain event
Subscriber
updates its DB
Abstracts
message broker
Message channel
@crichardson
Message broker
Choreography-based Create Order
Saga
Order created
Credit Reserved
Credit Limit Exceeded
Create Order
OR
Customer
creditLimit
creditReservations
Order
state
total
create()
reserveCredit()
approve()/
reject()
Order events channel
Customer events channel
Order
Service
Customer
Service
@crichardson
API
Order Service
Operations
createOrder()
Event
Publisher
Order
events
Event
Subscriber
Customer
Events
Service
Database
@crichardson
API
Customer Service
Operations
createCustomer()
Event
Publisher
Customer
Events
Event
Subscriber
Order
Events
Service
Database
Benefits and drawbacks of
choreography
Benefits
Simple, especially when using
event sourcing
Participants are loosely coupled
Drawbacks
Cyclic dependencies - services
listen to each other’s events,
e.g. Customer Service must
know about all Order events
that affect credit
Overloads domain objects, e.g.
Order and Customer know too
much
Events = indirect way to make
something happen
https://github.com/eventuate-examples/eventuate-examples-java-customers-and-orders
@crichardson
Overview
Choreography
Orchestration
Transactional
messaging
Agenda
Transactions, queries and microservices
Managing transactions with sagas
Implementing queries with CQRS
@crichardson
Order Service
Orchestration-based coordination using
command messages
Local transaction
Order
state=PENDING
createOrder()
Customer Service
Local transaction
Customer
reserveCredit()
Order Service
Local transaction
Order
state=APPROVED
approve
order()
createOrder() CreateOrderSaga
InvokesInvokesInvokes
@crichardson
Request/asynchronous reply-
based communication
Release credit
Order
Service
Customer
Service
DB
DB
Reserve credit
Command
Customer service
command channel
Create Order saga
Reply channel
Reply
Orchestrator
Update Credit
@crichardson
A saga (orchestrator)
is a persistent object
that
tracks the state of the saga
and
invokes the participants
Saga orchestrator behavior
On create:
Invokes a saga participant
Persists state in database
Wait for a reply
On reply:
Load state from database
Determine which saga
participant to invoke next
Invokes saga participant
Updates its state
Persists updated state
Wait for a reply
…
@crichardson
Order Service
CreateOrderSaga orchestrator
Customer Service
Create Order
Customer
creditLimit
creditReservations
...
Order
state
total…
reserveCredit()
CreateOrder
Saga
OrderService
create()
create()
approve()
Credit Reserved
Customer command channel
Saga reply channel
@crichardson
API
Order Service
Operations
createOrder()
API
Client
Invokes
Customer
Service
Service
Database
reserveCredit()
releaseCredit()
@crichardson
API
Customer Service
Operations
createCustomer()
reserveCredit()
releaseCredit()
Service
Database
Simple
API
@crichardson
Eventuate Tram Sagas
Open-source Saga orchestration framework
Currently for Java
https://github.com/eventuate-tram/eventuate-tram-sagas
https://github.com/eventuate-tram/eventuate-tram-sagas-
examples-customers-and-orders
Benefits and drawbacks of
orchestration
Benefits
Centralized coordination
logic is easier to understand
Reduced coupling, e.g.
Customer Service knows
less. Simply has API for
managing available credit.
Reduces cyclic
dependencies
Drawbacks
Risk of smart sagas
directing dumb services
@crichardson
Overview
Choreography
Orchestration
Transactional
messaging
Agenda
Transactions, queries and microservices
Managing transactions with sagas
Implementing queries with CQRS
@crichardson
Messaging must be
transactional
Service
Database Message Broker
update publish
How to
make atomic
without 2PC?
Publish to message broker
first?
Guarantees atomicity
BUT
Service can’t read its own
writes
Difficult to write business
logic
Service
Database
Message Broker
update
publish
@crichardson
Option: Event sourcing
=
Event centric approach to
business logic and persistence
http://eventuate.io/
@crichardson
Event sourcing: persists an object
as a sequence of events
Event table
Entity type
Event
id
Entity
id
Event
data
Order 902101 …OrderApproved
Order 903101 …OrderShipped
Event
type
Order 901101 …OrderCreated
Order
create()
approve()
ship()
Event Store
@crichardson
Replay events to recreate in memory state
Order
state
apply(event)
Event table
Entity type
Event
id
Entity
id
Event
data
Order 902101 …OrderApproved
Order 903101 …OrderShipped
Event
type
Order 901101 …OrderCreated
Event Store
Load events by ID and call apply()
Instantiate with
default
constructor
Event store =
database
@crichardson
FYI:
Apache Kafka != event store
@crichardson
Event sourcing guarantees: state
change event is published
Event table
Entity type
Event
id
Entity
id
Event
data
Order 902101 …OrderApproved
Order 903101 …OrderShipped
Event
type
Order 901101 …OrderCreated
Event Store
Customer
Service
Subscribe
Event store =
message broker
@crichardson
Preserves history of domain objects
Supports temporal queries
Simplifies retroactive correction
Built-in auditing
Other benefits of event sourcing
@crichardson
Unfamiliar programming model
Evolving the schema of long-lived events
Event store only supports PK-based access
requires CQRS less consistent reads
Drawbacks of event sourcing
@crichardson
Good fit for choreography-based sagas
BUT orchestration is more challenging
Use event handler to translate event
into command/reply message
Drawbacks of event sourcing
@crichardson
Option:
Traditional persistence
(JPA, MyBatis,…)
+
Transactional outbox pattern
https://github.com/eventuate-tram/eventuate-tram-core
@crichardson
Spring Data for JPA example
Publish event
Save order
http://eventuate.io/exampleapps.html
@crichardson
Customer Service: consuming
domain events…
https://github.com/eventuate-tram/eventuate-tram-examples-customers-and-orders
Subscribe to event
@crichardson
Atomically updating state and
publishing events
ACID
transaction
See BASE: An Acid Alternative, http://bit.ly/ebaybase
DELETE
?
Customer
Service
ORDER_ID CUSTOMER_ID TOTAL
99
CUSTOMER_CREDIT_RESERVATIONS table
101 1234
ID TYPE DATA DESTINATION
MESSAGE table
84784 CreditReserved {…} …
INSERT INSERT
Message
Publisher
QUERY
Message
Broker
Publish
Local transaction
reserveCredit()
@crichardson
Transaction log tailing
Order
Service
Datastore
ORDER table
Transaction log
Update
Transaction log
miner
Message
Broker
Publish
Changes
MySQL binlog
Postgres WAL
AWS DynamoDB table streams
MongoDB change streams
@crichardson
Polling the message table
Simple
Works for all databases
BUT what about polling frequency
MESSAGE
Table
Message
Publisher
Message
Broker
SELECT * FROM MESSAGE…
UPDATE MESSAGE
@crichardson
Agenda
Transactions, queries and microservices
Managing transactions with sagas
Implementing queries with CQRS
@crichardson
Queries often retrieve data
owned by multiple services
@crichardson
API Composition pattern
Customer Service
Customer
…
Order Service
Order
…
API Gateway
findOrdersForCustomer(customerId)
GET /customer/id GET /orders?customerId=id
FK query!
https://microservices.io/patterns/data/api-composition.html
@crichardson
Find recent, valuable
customers
SELECT *
FROM CUSTOMER c, ORDER o
WHERE
c.id = o.ID
AND o.ORDER_TOTAL > 100000
AND o.STATE = 'SHIPPED'
AND c.CREATION_DATE > ?
Customer
Service
Order Service
…. is even more difficult!
API Composition would be
inefficient
1 + N strategy:
Fetch recent customers
Iterate through customers
fetching their shipped
orders
Lots of round trips
high-latency
Alternative strategy:
Fetch recent customers
Fetch recent orders
Join
2 roundtrips but
potentially large datasets
inefficient
@crichardson
Using events to update a queryable
replica = CQRS
Order
Service
Customer
Service
Order events
Customer events
findCustomersAndOrders()
Order events channel
Customer events channel
Customer
Order
View
Service
Replica
View
Database
https://microservices.io/patterns/data/cqrs.html
@crichardson
API
Order Service
Operations
createOrder()
Event
Publisher
Order
events
Service
Database
@crichardson
API
Customer Service
Operations
createCustomer()
Event
Publisher
Customer
events
Service
Database
@crichardson
Customer Order View Service
Operations
findOrder()
findOrders….()
Event
Subscriber
Order
Events
Service
Database
Customer
Events
@crichardson
Query side data model
Command Query Responsibility
Segregation (CQRS)
Command side data model
Commands
Aggregate
Message broker or Event Store
Events
Queries
(Materialized)
View
Events
POST
PUT
DELETE
GET
@crichardson
Queries database (type)
Command side
POST
PUT
DELETE
Aggregate
Event Store/Message Broker
Events
Query side
GET /customers/id
MongoDB
Query side
GET /orders?text=xyz
ElasticSearch
Query side
GET …
Neo4j
@crichardson
A CQRS view can be part of a
service
Restaurant
Service
Restaurant events channel
Transactional
Source of truth
CQRS replica for
geo/text search
createRestaurant()
…
findRestaurantsNear(location, keywords)
MySQL
Elastic

Search
@crichardson
Use a CQRS replica to validate
commands
Order Service
createOrder()
Customer
Service
Orders
Customers
creditLimit
availableCredit
Customer events
Replica
Checks available credit
without invoking Customer
Service
@crichardson
CQRS views are disposable
Rebuild when needed from source of truth
Using event sourcing
(Conceptually) replay all events from beginning of time
Using traditional persistence
“ETL” from source of truth databases
@crichardson
Handling replication lag
Lag between updating command side and CQRS view
Risk of showing stale data to user
Either:
Update UI/client-side model without querying
Use updated aggregate version to “wait” for query view to
be updated
@crichardson
Summary
Use synchronous protocols, e.g. REST or gRPC:
External APIs
(Read only) API Composition
Use asynchronous messaging to solve distributed data management problems
Services publish events to implement
choreography-based sagas
queries using CQRS views
Services publish events using either event sourcing or explicit publishing
Services send command/reply messages to implement orchestration-based sagas
@crichardson
@crichardson chris@chrisrichardson.net
http://learn.microservices.io
Questions?
40% discount with code
ctwmucon18
1 of 77

Recommended

Saturn 2018: Managing data consistency in a microservice architecture using S... by
Saturn 2018: Managing data consistency in a microservice architecture using S...Saturn 2018: Managing data consistency in a microservice architecture using S...
Saturn 2018: Managing data consistency in a microservice architecture using S...Chris Richardson
107.8K views86 slides
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture by
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
3.8K views36 slides
Events on the outside, on the inside and at the core (jfokus jfokus2016) by
Events on the outside, on the inside and at the core (jfokus jfokus2016)Events on the outside, on the inside and at the core (jfokus jfokus2016)
Events on the outside, on the inside and at the core (jfokus jfokus2016)Chris Richardson
11K views77 slides
MicroCPH - Managing data consistency in a microservice architecture using Sagas by
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
27.8K views51 slides
GotoChgo 2019: Not Just Events: Developing Asynchronous Microservices by
GotoChgo 2019: Not Just Events: Developing Asynchronous MicroservicesGotoChgo 2019: Not Just Events: Developing Asynchronous Microservices
GotoChgo 2019: Not Just Events: Developing Asynchronous MicroservicesChris Richardson
19K views65 slides
Developing event-driven microservices with event sourcing and CQRS (london Ja... by
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
1.6K views61 slides

More Related Content

What's hot

Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom... by
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
76.5K views84 slides
Building and deploying microservices with event sourcing, CQRS and Docker (Be... by
Building and deploying microservices with event sourcing, CQRS and Docker (Be...Building and deploying microservices with event sourcing, CQRS and Docker (Be...
Building and deploying microservices with event sourcing, CQRS and Docker (Be...Chris Richardson
38.7K views65 slides
An overview of the Eventuate Platform by
An overview of the Eventuate PlatformAn overview of the Eventuate Platform
An overview of the Eventuate PlatformChris Richardson
7.6K views34 slides
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr... by
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
4K views58 slides
Developing event-driven microservices with event sourcing and CQRS (phillyete) by
Developing event-driven microservices with event sourcing and CQRS (phillyete)Developing event-driven microservices with event sourcing and CQRS (phillyete)
Developing event-driven microservices with event sourcing and CQRS (phillyete)Chris Richardson
9K views84 slides
Developing event-driven microservices with event sourcing and CQRS (svcc, sv... by
Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...
Developing event-driven microservices with event sourcing and CQRS (svcc, sv...Chris Richardson
55.2K views92 slides

What's hot(20)

Melbourne Jan 2019 - Microservices adoption anti-patterns: Obstacles to decom... by Chris 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...
Chris Richardson76.5K views
Building and deploying microservices with event sourcing, CQRS and Docker (Be... by Chris Richardson
Building and deploying microservices with event sourcing, CQRS and Docker (Be...Building and deploying microservices with event sourcing, CQRS and Docker (Be...
Building and deploying microservices with event sourcing, CQRS and Docker (Be...
Chris Richardson38.7K views
An overview of the Eventuate Platform by Chris Richardson
An overview of the Eventuate PlatformAn overview of the Eventuate Platform
An overview of the Eventuate Platform
Chris Richardson7.6K views
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr... by Chris 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...
Chris Richardson4K views
Developing event-driven microservices with event sourcing and CQRS (phillyete) by Chris Richardson
Developing event-driven microservices with event sourcing and CQRS (phillyete)Developing event-driven microservices with event sourcing and CQRS (phillyete)
Developing event-driven microservices with event sourcing and CQRS (phillyete)
Chris Richardson9K views
Developing event-driven microservices with event sourcing and CQRS (svcc, sv... by Chris Richardson
Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...Developing event-driven microservices with event sourcing and CQRS  (svcc, sv...
Developing event-driven microservices with event sourcing and CQRS (svcc, sv...
Chris Richardson55.2K views
Event Sourcing & CQRS, Kafka, Rabbit MQ by Araf Karsh Hamid
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQ
Araf Karsh Hamid1.3K views
Designing loosely coupled services by Chris Richardson
Designing loosely coupled servicesDesigning loosely coupled services
Designing loosely coupled services
Chris Richardson10.1K views
Developing microservices with aggregates (SpringOne platform, #s1p) by Chris Richardson
Developing microservices with aggregates (SpringOne platform, #s1p)Developing microservices with aggregates (SpringOne platform, #s1p)
Developing microservices with aggregates (SpringOne platform, #s1p)
Chris Richardson54.6K views
Microservices Architecture Part 2 Event Sourcing and Saga by Araf Karsh Hamid
Microservices Architecture Part 2 Event Sourcing and SagaMicroservices Architecture Part 2 Event Sourcing and Saga
Microservices Architecture Part 2 Event Sourcing and Saga
Araf Karsh Hamid9.1K views
Big Data Redis Mongodb Dynamodb Sharding by Araf Karsh Hamid
Big Data Redis Mongodb Dynamodb ShardingBig Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb Sharding
Araf Karsh Hamid207 views
Saga about distributed business transactions in microservices world by Mikalai Alimenkou
Saga about distributed business transactions in microservices worldSaga about distributed business transactions in microservices world
Saga about distributed business transactions in microservices world
Mikalai Alimenkou2.6K views
Developing functional domain models with event sourcing (sbtb, sbtb2015) by Chris Richardson
Developing functional domain models with event sourcing (sbtb, sbtb2015)Developing functional domain models with event sourcing (sbtb, sbtb2015)
Developing functional domain models with event sourcing (sbtb, sbtb2015)
Chris Richardson10.3K views
MicroService Architecture by Fred George
MicroService ArchitectureMicroService Architecture
MicroService Architecture
Fred George66.6K views
Agile, User Stories, Domain Driven Design by Araf Karsh Hamid
Agile, User Stories, Domain Driven DesignAgile, User Stories, Domain Driven Design
Agile, User Stories, Domain Driven Design
Araf Karsh Hamid1.2K views
CQRS and Event Sourcing, An Alternative Architecture for DDD by Dennis Doomen
CQRS and Event Sourcing, An Alternative Architecture for DDDCQRS and Event Sourcing, An Alternative Architecture for DDD
CQRS and Event Sourcing, An Alternative Architecture for DDD
Dennis Doomen51.3K views
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith... by 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...
Chris Richardson7.7K views

Similar to Mucon: Not Just Events: Developing Asynchronous Microservices

Oracle Code One: Events and commands: developing asynchronous microservices by
Oracle Code One: Events and commands: developing asynchronous microservicesOracle Code One: Events and commands: developing asynchronous microservices
Oracle Code One: Events and commands: developing asynchronous microservicesChris Richardson
2.5K views65 slides
YOW2018 - Events and Commands: Developing Asynchronous Microservices by
YOW2018 - Events and Commands: Developing Asynchronous MicroservicesYOW2018 - Events and Commands: Developing Asynchronous Microservices
YOW2018 - Events and Commands: Developing Asynchronous MicroservicesChris Richardson
3K views62 slides
JavaOne2017: ACID Is So Yesterday: Maintaining Data Consistency with Sagas by
JavaOne2017: ACID Is So Yesterday: Maintaining Data Consistency with SagasJavaOne2017: ACID Is So Yesterday: Maintaining Data Consistency with Sagas
JavaOne2017: ACID Is So Yesterday: Maintaining Data Consistency with SagasChris Richardson
1.4K views52 slides
Solving distributed data management problems in a microservice architecture (... by
Solving distributed data management problems in a microservice architecture (...Solving distributed data management problems in a microservice architecture (...
Solving distributed data management problems in a microservice architecture (...Chris Richardson
8.6K views57 slides
SVCC Developing Asynchronous, Message-Driven Microservices by
SVCC Developing Asynchronous, Message-Driven Microservices  SVCC Developing Asynchronous, Message-Driven Microservices
SVCC Developing Asynchronous, Message-Driven Microservices Chris Richardson
1.4K views76 slides
Gluecon: Using sagas to maintain data consistency in a microservice architecture by
Gluecon: Using sagas to maintain data consistency in a microservice architectureGluecon: Using sagas to maintain data consistency in a microservice architecture
Gluecon: Using sagas to maintain data consistency in a microservice architectureChris Richardson
2.6K views44 slides

Similar to Mucon: Not Just Events: Developing Asynchronous Microservices(20)

Oracle Code One: Events and commands: developing asynchronous microservices by Chris Richardson
Oracle Code One: Events and commands: developing asynchronous microservicesOracle Code One: Events and commands: developing asynchronous microservices
Oracle Code One: Events and commands: developing asynchronous microservices
Chris Richardson2.5K views
YOW2018 - Events and Commands: Developing Asynchronous Microservices by Chris Richardson
YOW2018 - Events and Commands: Developing Asynchronous MicroservicesYOW2018 - Events and Commands: Developing Asynchronous Microservices
YOW2018 - Events and Commands: Developing Asynchronous Microservices
Chris Richardson3K views
JavaOne2017: ACID Is So Yesterday: Maintaining Data Consistency with Sagas by Chris Richardson
JavaOne2017: ACID Is So Yesterday: Maintaining Data Consistency with SagasJavaOne2017: ACID Is So Yesterday: Maintaining Data Consistency with Sagas
JavaOne2017: ACID Is So Yesterday: Maintaining Data Consistency with Sagas
Chris Richardson1.4K views
Solving distributed data management problems in a microservice architecture (... by Chris Richardson
Solving distributed data management problems in a microservice architecture (...Solving distributed data management problems in a microservice architecture (...
Solving distributed data management problems in a microservice architecture (...
Chris Richardson8.6K views
SVCC Developing Asynchronous, Message-Driven Microservices by Chris Richardson
SVCC Developing Asynchronous, Message-Driven Microservices  SVCC Developing Asynchronous, Message-Driven Microservices
SVCC Developing Asynchronous, Message-Driven Microservices
Chris Richardson1.4K views
Gluecon: Using sagas to maintain data consistency in a microservice architecture by Chris Richardson
Gluecon: Using sagas to maintain data consistency in a microservice architectureGluecon: Using sagas to maintain data consistency in a microservice architecture
Gluecon: Using sagas to maintain data consistency in a microservice architecture
Chris Richardson2.6K views
Building microservices with Scala, functional domain models and Spring Boot (... by Chris Richardson
Building microservices with Scala, functional domain models and Spring Boot (...Building microservices with Scala, functional domain models and Spring Boot (...
Building microservices with Scala, functional domain models and Spring Boot (...
Chris Richardson3.7K views
Microservices in Java and Scala (sfscala) by Chris Richardson
Microservices in Java and Scala (sfscala)Microservices in Java and Scala (sfscala)
Microservices in Java and Scala (sfscala)
Chris Richardson2.4K views
QCONSF - ACID Is So Yesterday: Maintaining Data Consistency with Sagas by Chris Richardson
QCONSF - ACID Is So Yesterday: Maintaining Data Consistency with SagasQCONSF - ACID Is So Yesterday: Maintaining Data Consistency with Sagas
QCONSF - ACID Is So Yesterday: Maintaining Data Consistency with Sagas
Chris Richardson9.6K views
Events to the rescue: solving distributed data problems in a microservice arc... by 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...
Chris Richardson3.1K views
ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv... by Chris Richardson
ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...
ArchSummit Shenzhen - Using sagas to maintain data consistency in a microserv...
Chris Richardson1.6K views
Building microservices with Scala, functional domain models and Spring Boot by Chris Richardson
Building microservices with Scala, functional domain models and Spring BootBuilding microservices with Scala, functional domain models and Spring Boot
Building microservices with Scala, functional domain models and Spring Boot
Chris Richardson41K views
Building and deploying microservices with event sourcing, CQRS and Docker (QC... by Chris Richardson
Building and deploying microservices with event sourcing, CQRS and Docker (QC...Building and deploying microservices with event sourcing, CQRS and Docker (QC...
Building and deploying microservices with event sourcing, CQRS and Docker (QC...
Chris Richardson17.7K views
Developing event-driven microservices with event sourcing and CQRS (Shanghai) by Chris Richardson
Developing event-driven microservices with event sourcing and CQRS (Shanghai)Developing event-driven microservices with event sourcing and CQRS (Shanghai)
Developing event-driven microservices with event sourcing and CQRS (Shanghai)
Chris Richardson2.8K views
Developing Event-driven Microservices with Event Sourcing & CQRS (gotoams) by Chris Richardson
Developing Event-driven Microservices with Event Sourcing & CQRS (gotoams)Developing Event-driven Microservices with Event Sourcing & CQRS (gotoams)
Developing Event-driven Microservices with Event Sourcing & CQRS (gotoams)
Chris Richardson4.6K views
#hacksummit 2016 - event-driven microservices – Events on the outside, on the... by Chris Richardson
#hacksummit 2016 - event-driven microservices – Events on the outside, on the...#hacksummit 2016 - event-driven microservices – Events on the outside, on the...
#hacksummit 2016 - event-driven microservices – Events on the outside, on the...
Chris Richardson8.8K views
microXchg: Managing data consistency in a microservice architecture using Sagas by Chris Richardson
microXchg: Managing data consistency in a microservice architecture using SagasmicroXchg: Managing data consistency in a microservice architecture using Sagas
microXchg: Managing data consistency in a microservice architecture using Sagas
Chris Richardson11.2K views
Developing functional domain models with event sourcing (oakjug, sfscala) by Chris Richardson
Developing functional domain models with event sourcing (oakjug, sfscala)Developing functional domain models with event sourcing (oakjug, sfscala)
Developing functional domain models with event sourcing (oakjug, sfscala)
Chris Richardson3.3K views
OReilly SACON2018 - Events on the outside, on the inside, and at the core by Chris Richardson
OReilly SACON2018 - Events on the outside, on the inside, and at the coreOReilly SACON2018 - Events on the outside, on the inside, and at the core
OReilly SACON2018 - Events on the outside, on the inside, and at the core
Chris Richardson417 views
Building and deploying microservices with event sourcing, CQRS and Docker (Ha... by Chris Richardson
Building and deploying microservices with event sourcing, CQRS and Docker (Ha...Building and deploying microservices with event sourcing, CQRS and Docker (Ha...
Building and deploying microservices with event sourcing, CQRS and Docker (Ha...
Chris Richardson16.6K views

More from Chris Richardson

The microservice architecture: what, why, when and how? by
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
1.5K views59 slides
More the merrier: a microservices anti-pattern by
More the merrier: a microservices anti-patternMore the merrier: a microservices anti-pattern
More the merrier: a microservices anti-patternChris Richardson
2.1K views49 slides
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy... by
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
10.9K views50 slides
Dark Energy, Dark Matter and the Microservices Patterns?! by
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
2.7K views50 slides
Dark energy, dark matter and microservice architecture collaboration patterns by
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
2.1K views55 slides
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf by
Scenarios_and_Architecture_SkillsMatter_April_2022.pdfScenarios_and_Architecture_SkillsMatter_April_2022.pdf
Scenarios_and_Architecture_SkillsMatter_April_2022.pdfChris Richardson
2.9K views55 slides

More from Chris Richardson(18)

The microservice architecture: what, why, when and how? by 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?
Chris Richardson1.5K views
More the merrier: a microservices anti-pattern by Chris Richardson
More the merrier: a microservices anti-patternMore the merrier: a microservices anti-pattern
More the merrier: a microservices anti-pattern
Chris Richardson2.1K views
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy... by 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...
Chris Richardson10.9K views
Dark Energy, Dark Matter and the Microservices Patterns?! by 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?!
Chris Richardson2.7K views
Dark energy, dark matter and microservice architecture collaboration patterns by Chris Richardson
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
Chris Richardson2.1K views
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf by Chris Richardson
Scenarios_and_Architecture_SkillsMatter_April_2022.pdfScenarios_and_Architecture_SkillsMatter_April_2022.pdf
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
Chris Richardson2.9K views
Using patterns and pattern languages to make better architectural decisions by Chris Richardson
Using patterns and pattern languages to make better architectural decisions Using patterns and pattern languages to make better architectural decisions
Using patterns and pattern languages to make better architectural decisions
Chris Richardson5.7K views
A pattern language for microservices - June 2021 by Chris Richardson
A pattern language for microservices - June 2021 A pattern language for microservices - June 2021
A pattern language for microservices - June 2021
Chris Richardson2.9K views
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr... by Chris Richardson
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 Richardson3.6K views
Microservices - an architecture that enables DevOps (T Systems DevOps day) by 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)
Chris Richardson2K views
Decompose your monolith: Six principles for refactoring a monolith to microse... by 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...
Chris Richardson15.7K views
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a... by 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...
Chris Richardson2.9K views
#DevNexus202 Decompose your monolith by Chris Richardson
#DevNexus202 Decompose your monolith#DevNexus202 Decompose your monolith
#DevNexus202 Decompose your monolith
Chris Richardson5.1K views
Decompose your monolith: strategies for migrating to microservices (Tide) by Chris 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)
Chris Richardson490 views
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate... by 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...
Chris Richardson52.2K views
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic... by 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...
Chris Richardson9.1K views
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv... by Chris 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...
Chris Richardson4.1K views
OReilly SACON London: Potholes in the road from monolithic hell: Microservice... by Chris 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...
Chris Richardson91.6K views

Recently uploaded

HarshithAkkapelli_Presentation.pdf by
HarshithAkkapelli_Presentation.pdfHarshithAkkapelli_Presentation.pdf
HarshithAkkapelli_Presentation.pdfharshithakkapelli
11 views16 slides
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...Deltares
9 views24 slides
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... by
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Donato Onofri
795 views34 slides
Agile 101 by
Agile 101Agile 101
Agile 101John Valentino
7 views20 slides
A first look at MariaDB 11.x features and ideas on how to use them by
A first look at MariaDB 11.x features and ideas on how to use themA first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use themFederico Razzoli
45 views36 slides
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptxanimuscrm
14 views19 slides

Recently uploaded(20)

DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J... by Deltares
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
DSD-INT 2023 3D hydrodynamic modelling of microplastic transport in lakes - J...
Deltares9 views
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ... by Donato Onofri
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Unmasking the Dark Art of Vectored Exception Handling: Bypassing XDR and EDR ...
Donato Onofri795 views
A first look at MariaDB 11.x features and ideas on how to use them by Federico Razzoli
A first look at MariaDB 11.x features and ideas on how to use themA first look at MariaDB 11.x features and ideas on how to use them
A first look at MariaDB 11.x features and ideas on how to use them
Federico Razzoli45 views
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx by animuscrm
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
2023-November-Schneider Electric-Meetup-BCN Admin Group.pptx
animuscrm14 views
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium... by Lisi Hocke
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Team Transformation Tactics for Holistic Testing and Quality (Japan Symposium...
Lisi Hocke28 views
Generic or specific? Making sensible software design decisions by Bert Jan Schrijver
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisions
Advanced API Mocking Techniques by Dimpy Adhikary
Advanced API Mocking TechniquesAdvanced API Mocking Techniques
Advanced API Mocking Techniques
Dimpy Adhikary19 views
MariaDB stored procedures and why they should be improved by Federico Razzoli
MariaDB stored procedures and why they should be improvedMariaDB stored procedures and why they should be improved
MariaDB stored procedures and why they should be improved
Software testing company in India.pptx by SakshiPatel82
Software testing company in India.pptxSoftware testing company in India.pptx
Software testing company in India.pptx
SakshiPatel827 views
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with... by sparkfabrik
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
20231129 - Platform @ localhost 2023 - Application-driven infrastructure with...
sparkfabrik5 views
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ... by Deltares
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
DSD-INT 2023 Wave-Current Interaction at Montrose Tidal Inlet System and Its ...
Deltares10 views
Airline Booking Software by SharmiMehta
Airline Booking SoftwareAirline Booking Software
Airline Booking Software
SharmiMehta5 views
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the... by Deltares
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
DSD-INT 2023 Leveraging the results of a 3D hydrodynamic model to improve the...
Deltares6 views
Copilot Prompting Toolkit_All Resources.pdf by Riccardo Zamana
Copilot Prompting Toolkit_All Resources.pdfCopilot Prompting Toolkit_All Resources.pdf
Copilot Prompting Toolkit_All Resources.pdf
Riccardo Zamana8 views

Mucon: Not Just Events: Developing Asynchronous Microservices