Developing microservices with aggregates (SpringOne platform, #s1p)

Chris Richardson
Chris RichardsonFounder of Eventuate, Inc - a microservices startup
@crichardson
Developing Microservices
with Aggregates
Chris Richardson
Founder of Eventuate.io
Founder of the original CloudFoundry.com
Author of POJOs in Action
@crichardson
chris@chrisrichardson.net
http://eventuate.io
@crichardson
Presentation goal
Show how
Domain Driven Design Aggregates
and Microservices
are a perfect match
@crichardson
About Chris
@crichardson
About Chris
Consultant and trainer
focusing on modern
application architectures
including microservices
(http://www.chrisrichardson.net/)
@crichardson
About Chris
Founder of a startup that is creating
a platform that makes it easier for
developers to write transactional
microservices
(http://eventuate.io)
@crichardson
For more information
http://learnmicroservices.io
@crichardson
Agenda
The problem with Domain Models and microservices
Overview of aggregates
Maintaining consistency between aggregates
Using event sourcing with Aggregates
Example application
@crichardson
The Microservice architecture
tackles complexity through
modularization
@crichardson
Microservice
=
Business capability
@crichardson
Microservice architecture
Browser
Mobile
Device
Store
Front UI
API
Gateway
Catalog
Service
Review
Service
Order
Service
…
Service
Catalog
Database
Review
Database
Order
Database
…
Database
HTML
REST
REST
Apply X-axis and Z-axis
scaling to each service
independently
@crichardson
Service boundaries
enforce modularity
@crichardson
But there are challenges…
@crichardson
Product service
Customer serviceOrder service
Domain model = tangled web of
classes
Order
OrderLine
Item
quantity
…
Address
street
city
…
Customer
Product
name
price
?
?
creditLimit
@crichardson
Reliance on ACID transactions
to enforce invariants
BEGIN TRANSACTION
…
SELECT ORDER_TOTAL
FROM ORDERS WHERE CUSTOMER_ID = ?
…
SELECT CREDIT_LIMIT
FROM CUSTOMERS WHERE CUSTOMER_ID = ?
…
INSERT INTO ORDERS …
…
COMMIT TRANSACTION
Simple and
ACID
@crichardson
But it violates encapsulation…
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
@crichardson
.. and requires 2PC
BEGIN TRANSACTION
…
SELECT ORDER_TOTAL
FROM ORDERS WHERE CUSTOMER_ID = ?
…
SELECT CREDIT_LIMIT
FROM CUSTOMERS WHERE CUSTOMER_ID = ?
…
INSERT INTO ORDERS …
…
COMMIT TRANSACTION
@crichardson
2PC is not a viable option
Guarantees consistency
BUT
2PC is best avoided
Not supported by many NoSQL databases etc.
CAP theorem 2PC impacts availability
….
@crichardson
Doesn’t fit with the
NoSQL DB “transaction” model
@crichardson
Agenda
The problem with Domain Models and microservices
Overview of aggregates
Maintaining consistency between aggregates
Using event sourcing with Aggregates
Example application
@crichardson
Domain Driven Design:
read it!
@crichardson
Domain Driven Design -
building blocks
Entity
Value object
Services
Repositories
Aggregates
Adopted
Ignored
(at least by me)
About Aggregates
Cluster of objects that can
be treated as a unit
Graph consisting of a root
entity and one or more
other entities and value
objects
Typically business entities
are Aggregates, e.g.
customer, Account, Order,
Product, ….
Order
OrderLine
Item
quantity
productId
productName
productPrice
customerId
Address
street
city
…
Aggregate: rule #1
Reference other
aggregate roots via
identity
(primary key)
Order
OrderLine
Item
quantity
productId
productName
productPrice
customerId
Address
street
city
…
@crichardson
Foreign keys in a
Domain Model?!?
@crichardson
Domain model = collection of
loosely connected aggregates
Order
OrderLine
Item
quantity
…
Address
street
city
…
Customer
Product
name
price
@crichardson
Product service
Customer serviceOrder service
Easily partition into microservices
Order
OrderLine
Item
quantity
…
Address
street
city
…
Customer
Product
name
price
@crichardson
Aggregate rule #2
Transaction
=
processing one command by
one aggregate
@crichardson
Product service
Customer serviceOrder service
Transaction scope = service
Order
OrderLine
Item
quantity
…
Address
street
city
…
Customer
Product
name
price
@crichardson
Transaction scope
=
NoSQL database
“transaction”
@crichardson
Aggregate granularity
If an update must be atomic then it must be handled by a
single aggregate
Therefore
Aggregate granularity is important
@crichardson
Aggregate granularity
Consistency
Scalability/
User experience
Customer
Order
Product
Customer
Order
Product
Customer
Order
Product
@crichardson
Agenda
The problem with Domain Models and microservices
Overview of aggregates
Maintaining consistency between aggregates
Using event sourcing with Aggregates
Example application
@crichardson
Customer management
How to maintain data consistency
between aggregates?
Order management
Order Service
placeOrder()
Customer Service
updateCreditLimit()
Customer
creditLimit
...
has ordersbelongs toOrder
total
Invariant:
sum(open order.total) <= customer.creditLimit
?
@crichardson
Event-driven architecture
@crichardson
Use event-driven, eventually
consistent order processing
Order
Service
Customer
Service
Order created
Credit Reserved
Credit Check Failed
Create Order
OR
Customer
creditLimit
creditReservations
...
Order
state
total
…
create()
reserveCredit()
approve()/reject()
@crichardson
Order Management
Order
id : 4567
total: 343
state = CREATED
Customer Management
Customer
creditLimit : 12000
creditReservations: {}
Customer
creditLimit : 12000
creditReservations: { 4567 -> 343}
Order
id : 4567
total: 343
state = APPROVED
Eventually consistent credit checking
Message Bus
createOrder()
Publishes:
Subscribes to:
Subscribes to:
publishes:
OrderCreatedEvent
CreditReservedEvent
OrderCreatedEvent CreditReservedEvent
@crichardson
Complexity of compensating
transactions
ACID transactions can simply rollback
BUT
Developer must write application logic to “rollback” eventually
consistent transactions
For example:
CreditCheckFailed => cancel Order
Money transfer destination account closed => credit source account
Careful design required!
@crichardson
How atomically update
database and publish an event
Order Service
Order
Database
Message Broker
insert Order
publish
OrderCreatedEvent
dual write problem
?
@crichardson
Failure = inconsistent system
Order Service
Order
Database
Message Broker
insert Order
publish
OrderCreatedEvent
X
@crichardson
2PC is not an option
@crichardson
Reliably publish events when
state changes
@crichardson
Agenda
The problem with Domain Models and microservices
Overview of aggregates
Maintaining consistency between aggregates
Using event sourcing with Aggregates
Example application
@crichardson
Event sourcing = event-centric
persistence
Application
Database
Event store
update
publish
X
@crichardson
Event sourcing
For each domain object (i.e. DDD aggregate):
Identify (state changing) domain events, e.g. use Event
Storming
Define Event classes
For example, Order events: OrderCreated, OrderCancelled,
OrderApproved, OrderRejected, OrderShipped
@crichardson
Persists events
NOT current state
Order
status
….
101 ACCEPTED
Order table
X
@crichardson
Persists events
NOT current state
Event table
Entity type
Event
id
Entity
id
Event
data
Order 902101 …OrderApproved
Order 903101 …OrderShipped
Event
type
Order 901101 …OrderCreated
@crichardson
Replay events to recreate
state
Order
state
OrderCreated(…)
OrderAccepted(…)
OrderShipped(…)
Events
Periodically snapshot to avoid loading all events
@crichardson
The present is a fold over
history
currentState = foldl(applyEvent, initialState, events)
@crichardson
Event Store
Application architecture
Order 123 Customer 456
OrderCreated
OrderApproved
…
CustomerCreated
CustomerCreditReserved
…
CreateOrder
UpdateOrder
GetOrder
Subscribe
Order
Service
CreateCustomer
UpdateCustomer
GetCustomer
Subscribe
Customer
Service
@crichardson
Request handling in an event sourced application
HTTP
Handler
Event
Store
pastEvents = findEvents(entityId)
Order
new()
applyEvents(pastEvents)
newEvents = processCmd(someCmd)
saveEvents(newEvents) (optimistic locking)
Order Service
applyEvents(newEvents)
@crichardson
Event Store publishes events
consumed by other services
Event
Store
Event
Subscriber
subscribe(EventTypes)
publish(event)
publish(event)
Customer
update()
Customer Service
@crichardson
Event Store publishes events
consumed by other services
Event
Store
Event
Subscriber
subscribe(EventTypes)
publish(event)
publish(event)
CQRS View
update()
Service Xyz
send notifications
…
Event store = database + message
broker
Hybrid database and
message broker
Implementations:
Home grown/DIY
geteventstore.com by
Greg Young
http://eventuate.io
(mine)
Event Store
Save
aggregate
events
Get
aggregate
events
Subscribe
to events
@crichardson
Benefits of event sourcing
Solves data consistency issues in a Microservice/NoSQL based
architecture
Reliable event publishing: publishes events needed by predictive
analytics etc, user notifications,…
Eliminates O/R mapping problem (mostly)
Reifies state changes:
Built in, reliable audit log
temporal queries
Preserved history More easily implement future requirements
@crichardson
Drawbacks of event
sourcing…
Requires application rewrite
Weird and unfamiliar style of programming
Events = a historical record of your bad design decisions
Must detect and ignore duplicate events
Idempotent event handlers
Track most recent event and ignore older ones
…
@crichardson
… Drawbacks of event
sourcing
Querying the event store can be challenging
Some queries might be complex/inefficient, e.g. accounts with
a balance > X
Event store might only support lookup of events by entity id
Must use Command Query Responsibility Segregation (CQRS)
to handle queries application must handle eventually
consistent data
@crichardson
Agenda
The problem with Domain Models and microservices
Overview of aggregates
Maintaining consistency between aggregates
Using event sourcing with Aggregates
Example application
@crichardson
Orders and Customers
example
Kafka
Rest API
Event Store
Event
Store
Adapter
Customer
Service
Rest API
Order Service
Customer
Aggregate
Order
Aggregate
Rest API
Order
History
Service
MongoDB
CQRS View
Event
Store
Adapter
Event
Store
Adapter
@crichardson
Customer microservice
Customer
Service
Customer
Controller
Spring
Cloud
Stream
Kafka
Customer
Aggregate
Rest API
Customer
Event Handlers
Event
Store
Event
Store
Adapter
@crichardson
The Customer aggregate
Money creditLimit
Map<OrderId, Money> creditReservations
Customer
List<Event> process(CreateCustomerCommand cmd) { … }
List<Event> process(ReserveCreditCommand cmd) { … }
…
void apply(CustomerCreatedEvent anEvent) { … }
void apply(CreditReservedEvent anEvent) { … }
…
State
Behavior
@crichardson
Familiar concepts restructured
class Customer {
public void reserveCredit(
orderId : String,
amount : Money) {
// verify
// update state
this.xyz = …
}
public List<Event> process(
ReserveCreditCommand cmd) {
// verify
…
return singletonList(
new CreditReservedEvent(…);
)
}
public void apply(
CreditReservedEvent event) {
// update state
this.xyz = event.xyz
}
@crichardson
Customer command processing
@crichardson
Customer applying events
@crichardson
Customer Controller
@crichardson
Creating a Customer
save() concisely specifies:
1.Creates Customer aggregate
2.Processes command
3.Applies events
4.Persists events
@crichardson
Event handling in Customers
Durable subscription name
1. Load Customer aggregate
2. Processes command
3. Applies events
4. Persists events
Triggers BeanPostProcessor
Publish message to Spring Cloud
Stream (Kafka) when Customer not
found
@crichardson
Summary
Aggregates are the building blocks of microservices
Use events to maintain consistency between aggregates
Event sourcing is a good way to implement a event-driven
architecture
@crichardson
@crichardson chris@chrisrichardson.net
http://learnmicroservices.io
Questions?
1 of 68

Recommended

Mucon: Not Just Events: Developing Asynchronous Microservices by
Mucon: Not Just Events: Developing Asynchronous MicroservicesMucon: Not Just Events: Developing Asynchronous Microservices
Mucon: Not Just Events: Developing Asynchronous MicroservicesChris Richardson
106.4K views77 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
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
Overview of the Eventuate Tram Customers and Orders application by
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
1.5K views26 slides
Event Sourcing & CQRS, Kafka, Rabbit MQ by
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQAraf Karsh Hamid
1.3K views104 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

More Related Content

What's hot

TypeScript for Java Developers by
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java DevelopersYakov Fain
3.9K views57 slides
Big Data Redis Mongodb Dynamodb Sharding by
Big Data Redis Mongodb Dynamodb ShardingBig Data Redis Mongodb Dynamodb Sharding
Big Data Redis Mongodb Dynamodb ShardingAraf Karsh Hamid
207 views88 slides
Introducing Saga Pattern in Microservices with Spring Statemachine by
Introducing Saga Pattern in Microservices with Spring StatemachineIntroducing Saga Pattern in Microservices with Spring Statemachine
Introducing Saga Pattern in Microservices with Spring StatemachineVMware Tanzu
3.9K views26 slides
CQRS and Event Sourcing, An Alternative Architecture for DDD by
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 DDDDennis Doomen
51.3K views19 slides
Distributed transactions in SOA and Microservices by
Distributed transactions in SOA and MicroservicesDistributed transactions in SOA and Microservices
Distributed transactions in SOA and MicroservicesConstantine Slisenka
1.4K views65 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

What's hot(20)

TypeScript for Java Developers by Yakov Fain
TypeScript for Java DevelopersTypeScript for Java Developers
TypeScript for Java Developers
Yakov Fain3.9K 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
Introducing Saga Pattern in Microservices with Spring Statemachine by VMware Tanzu
Introducing Saga Pattern in Microservices with Spring StatemachineIntroducing Saga Pattern in Microservices with Spring Statemachine
Introducing Saga Pattern in Microservices with Spring Statemachine
VMware Tanzu3.9K 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
Distributed transactions in SOA and Microservices by Constantine Slisenka
Distributed transactions in SOA and MicroservicesDistributed transactions in SOA and Microservices
Distributed transactions in SOA and Microservices
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture by Chris Richardson
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
Chris Richardson3.8K views
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
Microservices in Node.js: Patterns and techniques by The Software House
Microservices in Node.js: Patterns and techniquesMicroservices in Node.js: Patterns and techniques
Microservices in Node.js: Patterns and techniques
The Software House3.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
Apache Kafka and ksqlDB in Action: Let's Build a Streaming Data Pipeline! (Ro... by confluent
Apache Kafka and ksqlDB in Action: Let's Build a Streaming Data Pipeline! (Ro...Apache Kafka and ksqlDB in Action: Let's Build a Streaming Data Pipeline! (Ro...
Apache Kafka and ksqlDB in Action: Let's Build a Streaming Data Pipeline! (Ro...
confluent3.7K views
Kafka as an event store - is it good enough? by Guido Schmutz
Kafka as an event store - is it good enough?Kafka as an event store - is it good enough?
Kafka as an event store - is it good enough?
Guido Schmutz2.3K 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
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
Introduction to Docker Compose | Docker Intermediate Workshop by Ajeet Singh Raina
Introduction to Docker Compose | Docker Intermediate WorkshopIntroduction to Docker Compose | Docker Intermediate Workshop
Introduction to Docker Compose | Docker Intermediate Workshop
Ajeet Singh Raina3.8K views
Streams, Tables, and Time in KSQL by confluent
Streams, Tables, and Time in KSQLStreams, Tables, and Time in KSQL
Streams, Tables, and Time in KSQL
confluent1.3K views
Kafka Retry and DLQ by George Teo
Kafka Retry and DLQKafka Retry and DLQ
Kafka Retry and DLQ
George Teo6.3K views
Designing loosely coupled services by Chris Richardson
Designing loosely coupled servicesDesigning loosely coupled services
Designing loosely coupled services
Chris Richardson10.1K views
Asynchronous API in Java8, how to use CompletableFuture by José Paumard
Asynchronous API in Java8, how to use CompletableFutureAsynchronous API in Java8, how to use CompletableFuture
Asynchronous API in Java8, how to use CompletableFuture
José Paumard25.1K views
Confluent Workshop Series: ksqlDB로 스트리밍 앱 빌드 by confluent
Confluent Workshop Series: ksqlDB로 스트리밍 앱 빌드Confluent Workshop Series: ksqlDB로 스트리밍 앱 빌드
Confluent Workshop Series: ksqlDB로 스트리밍 앱 빌드
confluent636 views

Similar to Developing microservices with aggregates (SpringOne platform, #s1p)

Developing microservices with aggregates (melbourne) by
Developing microservices with aggregates (melbourne)Developing microservices with aggregates (melbourne)
Developing microservices with aggregates (melbourne)Chris Richardson
928 views78 slides
Developing microservices with aggregates (devnexus2017) by
Developing microservices with aggregates (devnexus2017)Developing microservices with aggregates (devnexus2017)
Developing microservices with aggregates (devnexus2017)Chris Richardson
3K views79 slides
#hacksummit 2016 - event-driven microservices – Events on the outside, on the... by
#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 Richardson
8.8K views83 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
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
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

Similar to Developing microservices with aggregates (SpringOne platform, #s1p)(20)

Developing microservices with aggregates (melbourne) by Chris Richardson
Developing microservices with aggregates (melbourne)Developing microservices with aggregates (melbourne)
Developing microservices with aggregates (melbourne)
Chris Richardson928 views
Developing microservices with aggregates (devnexus2017) by Chris Richardson
Developing microservices with aggregates (devnexus2017)Developing microservices with aggregates (devnexus2017)
Developing microservices with aggregates (devnexus2017)
Chris Richardson3K 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
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
Events on the outside, on the inside and at the core (jfokus jfokus2016) by Chris Richardson
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 Richardson11K 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
Developing event-driven microservices with event sourcing and CQRS (london Ja... by Chris Richardson
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 Richardson1.6K 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
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
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
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
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
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
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao... by Chris Richardson
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
Handling Eventual Consistency in JVM Microservices with Event Sourcing (javao...
Chris Richardson53.3K 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
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
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
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
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
Building and deploying microservices with event sourcing, CQRS and Docker (Me... by Chris Richardson
Building and deploying microservices with event sourcing, CQRS and Docker (Me...Building and deploying microservices with event sourcing, CQRS and Docker (Me...
Building and deploying microservices with event sourcing, CQRS and Docker (Me...
Chris Richardson3.3K 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(20)

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
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
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
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
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
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices by Chris Richardson
JFokus: Cubes, Hexagons, Triangles, and More: Understanding MicroservicesJFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
Chris Richardson7.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

Recently uploaded

The Era of Large Language Models.pptx by
The Era of Large Language Models.pptxThe Era of Large Language Models.pptx
The Era of Large Language Models.pptxAbdulVahedShaik
5 views9 slides
Headless JS UG Presentation.pptx by
Headless JS UG Presentation.pptxHeadless JS UG Presentation.pptx
Headless JS UG Presentation.pptxJack Spektor
7 views24 slides
DSD-INT 2023 The Danube Hazardous Substances Model - Kovacs by
DSD-INT 2023 The Danube Hazardous Substances Model - KovacsDSD-INT 2023 The Danube Hazardous Substances Model - Kovacs
DSD-INT 2023 The Danube Hazardous Substances Model - KovacsDeltares
8 views17 slides
Generic or specific? Making sensible software design decisions by
Generic or specific? Making sensible software design decisionsGeneric or specific? Making sensible software design decisions
Generic or specific? Making sensible software design decisionsBert Jan Schrijver
6 views60 slides
Programming Field by
Programming FieldProgramming Field
Programming Fieldthehardtechnology
5 views9 slides
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... by
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Marc Müller
37 views83 slides

Recently uploaded(20)

Headless JS UG Presentation.pptx by Jack Spektor
Headless JS UG Presentation.pptxHeadless JS UG Presentation.pptx
Headless JS UG Presentation.pptx
Jack Spektor7 views
DSD-INT 2023 The Danube Hazardous Substances Model - Kovacs by Deltares
DSD-INT 2023 The Danube Hazardous Substances Model - KovacsDSD-INT 2023 The Danube Hazardous Substances Model - Kovacs
DSD-INT 2023 The Danube Hazardous Substances Model - Kovacs
Deltares8 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
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI... by Marc Müller
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Dev-Cloud Conference 2023 - Continuous Deployment Showdown: Traditionelles CI...
Marc Müller37 views
Navigating container technology for enhanced security by Niklas Saari by Metosin Oy
Navigating container technology for enhanced security by Niklas SaariNavigating container technology for enhanced security by Niklas Saari
Navigating container technology for enhanced security by Niklas Saari
Metosin Oy13 views
Tridens DevOps by Tridens
Tridens DevOpsTridens DevOps
Tridens DevOps
Tridens9 views
Dapr Unleashed: Accelerating Microservice Development by Miroslav Janeski
Dapr Unleashed: Accelerating Microservice DevelopmentDapr Unleashed: Accelerating Microservice Development
Dapr Unleashed: Accelerating Microservice Development
Miroslav Janeski10 views
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko... by Deltares
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
DSD-INT 2023 Simulation of Coastal Hydrodynamics and Water Quality in Hong Ko...
Deltares14 views
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
Airline Booking Software by SharmiMehta
Airline Booking SoftwareAirline Booking Software
Airline Booking Software
SharmiMehta5 views
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme... by Deltares
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...
DSD-INT 2023 Salt intrusion Modelling of the Lauwersmeer, towards a measureme...
Deltares5 views
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut... by Deltares
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
DSD-INT 2023 Machine learning in hydraulic engineering - Exploring unseen fut...
Deltares7 views
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge... by Deltares
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
DSD-INT 2023 Delft3D FM Suite 2024.01 2D3D - New features + Improvements - Ge...
Deltares17 views
Software evolution understanding: Automatic extraction of software identifier... by Ra'Fat Al-Msie'deen
Software evolution understanding: Automatic extraction of software identifier...Software evolution understanding: Automatic extraction of software identifier...
Software evolution understanding: Automatic extraction of software identifier...
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated... by TomHalpin9
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
Dev-HRE-Ops - Addressing the _Last Mile DevOps Challenge_ in Highly Regulated...
TomHalpin95 views

Developing microservices with aggregates (SpringOne platform, #s1p)