SlideShare a Scribd company logo
@crichardson
About the Eventuate Tram
Customers and Orders example
Chris Richardson
Founder of Eventuate.io
Founder of the original CloudFoundry.com
Author of POJOs in Action
@crichardson
chris@chrisrichardson.net
http://microservices.io
http://eventuate.io
Copyright © 2020. Chris Richardson Consulting, Inc. All rights reserved
@crichardson
About the example
Demonstrates two key patterns:
Sagas - implement transactions that span services, https://
microservices.io/patterns/data/saga.html
CQRS - implement queries that retrieve data from multiple
services, https://microservices.io/patterns/data/cqrs.html
Built using Spring Boot, JPA and the Eventuate Tram
framework
https://github.com/eventuate-tram/eventuate-tram-examples-customers-and-orders/
Note: this presentation describes the development branch , which
reorganized/renamed the service modules.
These changes will soon be merged into master
@crichardson
System operations
CustomersAndOrdersApplication
≪commands≫
createCustomer(name, creditLimit)
createOrder(customerId, orderTotal)
cancelOrder(orderID)
≪queries≫
findOrder(orderId)
findOrderHistory(customerId)
@crichardson
Services
@crichardson
Customer Service - canvas
@crichardson
Customer Service - domain
model
@crichardson
Order Service - canvas
@crichardson
Order Service - domain model
@crichardson
Order History Service - canvas
@crichardson
Technical architecture
Service:
REST endpoint
Pub/sub events
Relational database - MySQL database
Message broker
Eventuate CDC - implements the Transaction Outbox pattern
@crichardson
@crichardson
Why all these events!?
@crichardson
Using the Saga pattern
Customer has a credit limit
createOrder()
Creates Order
Reserves credit
cancelOrder()
Updates Order
Releases credit
Event-driven
a.k.a
Choreography-based sagas
https://microservices.io/patterns/data/saga.html
Using the CQRS pattern
findOrderHistory()
Returns customers and
their orders
Order History Service
uses events to maintain a
replica in MongoDB
https://microservices.io/patterns/data/cqrs.html
@crichardson
Customer Service
Customer
Controller
Message
Producer
createCustomer()
Customer* Events
Order
Event
Consumer
Order* events
Customer
Database
≪entity≫
Customer
Customer
Repository
≪service≫
Customer
Service
Domain
Event
Publisher
POST /customers
Customer Service - code
customer-service-api-
messaging - events
published by the service
customer-service-api-web
- DTOs for REST
resources
customer-service - service
implementation
@crichardson
Order Service
Order Controller
Message
Producer
createOrder()
cancelOrder()
Order* Events
Customer
Event
Consumer
Customer* events
Order
Database
≪entity≫
Order
Order
Repository
≪service≫
Order
Service
Domain
Event
Publisher
POST /customers
Order Service - code
order-service-api-
messaging - events
published by the service
order-service-api-web -
DTOs for REST requests
and responses
order-service - service
implementation
@crichardson
Order History Service
CustomerOrder
HistoryController
findOrderHistory()
Order
History
Event
Consumer
Order* events
Order
History
Databas
CustomerView
Repository
≪service≫Ord
erHistory
ViewService
POST /customers
Customer* events
Order History Service - code
order-history-service-api-
web - DTOs for REST
requests and responses
order-service - service
implementation
@crichardson
Using the Saga pattern
https://microservices.io/patterns/data/saga.html
@crichardson
createOrder() sequence
diagram
@crichardson
cancelOrder() sequence
diagram
@crichardson
Using the CQRS pattern
https://microservices.io/patterns/data/cqrs.html
@crichardson
Implementing findOrderHistory()
@crichardson
@crichardson chris@chrisrichardson.net
http://eventuate.io
Questions?

More Related Content

PDF
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Henning Jacobs
 
PPSX
Big Data Redis Mongodb Dynamodb Sharding
Araf Karsh Hamid
 
PDF
The microservice architecture: what, why, when and how?
Chris Richardson
 
PDF
Building Event Driven (Micro)services with Apache Kafka
Guido Schmutz
 
PDF
Using patterns and pattern languages to make better architectural decisions
Chris Richardson
 
KEY
Event Driven Architecture
Stefan Norberg
 
PPTX
Diabetes Mellitus
MD Abdul Haleem
 
PPTX
Hypertension
Ratheeshkrishnakripa
 
Optimizing Kubernetes Resource Requests/Limits for Cost-Efficiency and Latenc...
Henning Jacobs
 
Big Data Redis Mongodb Dynamodb Sharding
Araf Karsh Hamid
 
The microservice architecture: what, why, when and how?
Chris Richardson
 
Building Event Driven (Micro)services with Apache Kafka
Guido Schmutz
 
Using patterns and pattern languages to make better architectural decisions
Chris Richardson
 
Event Driven Architecture
Stefan Norberg
 
Diabetes Mellitus
MD Abdul Haleem
 
Hypertension
Ratheeshkrishnakripa
 

What's hot (20)

PDF
An overview of the Eventuate Platform
Chris Richardson
 
PDF
Saturn 2018: Managing data consistency in a microservice architecture using S...
Chris Richardson
 
PPTX
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014
Kelly Grizzle
 
PPTX
Microservices Architecture Part 2 Event Sourcing and Saga
Araf Karsh Hamid
 
PPTX
Micro services Architecture
Araf Karsh Hamid
 
PPTX
Event-driven microservices
Andrew Schofield
 
PPSX
Domain Driven Design
Araf Karsh Hamid
 
PPTX
Introduction to microservices
Anil Allewar
 
PDF
Introduction to Event-Driven Architecture
Solace
 
PPTX
Monoliths and Microservices
Bozhidar Bozhanov
 
PDF
The Patterns of Distributed Logging and Containers
SATOSHI TAGOMORI
 
PDF
IoT & Azure (EventHub)
Mirco Vanini
 
PPSX
Event Sourcing & CQRS, Kafka, Rabbit MQ
Araf Karsh Hamid
 
PDF
從 DevOps 到 ChatOps:War Room、Bots 與 Automation
Chen Cheng-Wei
 
PDF
Introduction to Azure IaaS
Robert Crane
 
PDF
AWS Blackbelt 2015シリーズ AWS Lambda
Amazon Web Services Japan
 
PDF
Service discovery with Eureka and Spring Cloud
Marcelo Serpa
 
PPTX
ARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUES
SOAT
 
PDF
A Pattern Language for Microservices
Chris Richardson
 
PPTX
Microservices Architecture - Bangkok 2018
Araf Karsh Hamid
 
An overview of the Eventuate Platform
Chris Richardson
 
Saturn 2018: Managing data consistency in a microservice architecture using S...
Chris Richardson
 
SCIM: Why It’s More Important, and More Simple, Than You Think - CIS 2014
Kelly Grizzle
 
Microservices Architecture Part 2 Event Sourcing and Saga
Araf Karsh Hamid
 
Micro services Architecture
Araf Karsh Hamid
 
Event-driven microservices
Andrew Schofield
 
Domain Driven Design
Araf Karsh Hamid
 
Introduction to microservices
Anil Allewar
 
Introduction to Event-Driven Architecture
Solace
 
Monoliths and Microservices
Bozhidar Bozhanov
 
The Patterns of Distributed Logging and Containers
SATOSHI TAGOMORI
 
IoT & Azure (EventHub)
Mirco Vanini
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Araf Karsh Hamid
 
從 DevOps 到 ChatOps:War Room、Bots 與 Automation
Chen Cheng-Wei
 
Introduction to Azure IaaS
Robert Crane
 
AWS Blackbelt 2015シリーズ AWS Lambda
Amazon Web Services Japan
 
Service discovery with Eureka and Spring Cloud
Marcelo Serpa
 
ARCHITECTURE MICROSERVICE : TOUR D’HORIZON DU CONCEPT ET BONNES PRATIQUES
SOAT
 
A Pattern Language for Microservices
Chris Richardson
 
Microservices Architecture - Bangkok 2018
Araf Karsh Hamid
 
Ad

Similar to Overview of the Eventuate Tram Customers and Orders application (20)

PDF
Microservices: Decomposing Applications for Deployability and Scalability (ja...
Chris Richardson
 
PDF
Microservices + Events + Docker = A Perfect Trio (dockercon)
Chris Richardson
 
PDF
YOW2018 - Events and Commands: Developing Asynchronous Microservices
Chris Richardson
 
PDF
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
Docker, Inc.
 
PDF
Events on the outside, on the inside and at the core - Chris Richardson
JAXLondon_Conference
 
PDF
Events on the outside, on the inside and at the core (jaxlondon)
Chris Richardson
 
PDF
Introduction to MicroServices (Oakjug)
Chris Richardson
 
PDF
Futures and Rx Observables: powerful abstractions for consuming web services ...
Chris Richardson
 
PDF
Developing event-driven microservices with event sourcing and CQRS (Shanghai)
Chris Richardson
 
PDF
Designing loosely coupled services
Chris Richardson
 
PDF
Building a SaaS using WSO2 Stratos
WSO2
 
PDF
SVCC Developing Asynchronous, Message-Driven Microservices
Chris Richardson
 
PDF
OReilly SACON2018 - Events on the outside, on the inside, and at the core
Chris Richardson
 
PDF
Developing applications with a microservice architecture (SVforum, microservi...
Chris Richardson
 
PDF
Building and deploying microservices with event sourcing, CQRS and Docker (Ha...
Chris Richardson
 
PDF
Decompose your monolith: Six principles for refactoring a monolith to microse...
Chris Richardson
 
PDF
Developing applications with a microservice architecture (svcc)
Chris Richardson
 
PDF
Developing event-driven microservices with event sourcing and CQRS (london Ja...
Chris Richardson
 
PDF
#JaxLondon keynote: Developing applications with a microservice architecture
Chris Richardson
 
PDF
Developing Applications with a Micro Service Architecture - Chris Richardson
JAXLondon2014
 
Microservices: Decomposing Applications for Deployability and Scalability (ja...
Chris Richardson
 
Microservices + Events + Docker = A Perfect Trio (dockercon)
Chris Richardson
 
YOW2018 - Events and Commands: Developing Asynchronous Microservices
Chris Richardson
 
Microservices + Events + Docker = A Perfect Trio by Docker Captain Chris Rich...
Docker, Inc.
 
Events on the outside, on the inside and at the core - Chris Richardson
JAXLondon_Conference
 
Events on the outside, on the inside and at the core (jaxlondon)
Chris Richardson
 
Introduction to MicroServices (Oakjug)
Chris Richardson
 
Futures and Rx Observables: powerful abstractions for consuming web services ...
Chris Richardson
 
Developing event-driven microservices with event sourcing and CQRS (Shanghai)
Chris Richardson
 
Designing loosely coupled services
Chris Richardson
 
Building a SaaS using WSO2 Stratos
WSO2
 
SVCC Developing Asynchronous, Message-Driven Microservices
Chris Richardson
 
OReilly SACON2018 - Events on the outside, on the inside, and at the core
Chris Richardson
 
Developing applications with a microservice architecture (SVforum, microservi...
Chris Richardson
 
Building and deploying microservices with event sourcing, CQRS and Docker (Ha...
Chris Richardson
 
Decompose your monolith: Six principles for refactoring a monolith to microse...
Chris Richardson
 
Developing applications with a microservice architecture (svcc)
Chris Richardson
 
Developing event-driven microservices with event sourcing and CQRS (london Ja...
Chris Richardson
 
#JaxLondon keynote: Developing applications with a microservice architecture
Chris Richardson
 
Developing Applications with a Micro Service Architecture - Chris Richardson
JAXLondon2014
 
Ad

More from Chris Richardson (20)

PDF
More the merrier: a microservices anti-pattern
Chris Richardson
 
PDF
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
Chris Richardson
 
PDF
Dark Energy, Dark Matter and the Microservices Patterns?!
Chris Richardson
 
PDF
Dark energy, dark matter and microservice architecture collaboration patterns
Chris Richardson
 
PDF
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
Chris Richardson
 
PDF
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
Chris Richardson
 
PDF
Events to the rescue: solving distributed data problems in a microservice arc...
Chris Richardson
 
PDF
A pattern language for microservices - June 2021
Chris Richardson
 
PDF
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
Chris Richardson
 
PDF
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Chris Richardson
 
PDF
Microservices - an architecture that enables DevOps (T Systems DevOps day)
Chris Richardson
 
PDF
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
Chris Richardson
 
PDF
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
Chris Richardson
 
PDF
#DevNexus202 Decompose your monolith
Chris Richardson
 
PDF
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
Chris Richardson
 
PDF
Decompose your monolith: strategies for migrating to microservices (Tide)
Chris Richardson
 
PDF
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Chris Richardson
 
PDF
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...
Chris Richardson
 
PDF
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
Chris Richardson
 
PDF
MicroCPH - Managing data consistency in a microservice architecture using Sagas
Chris Richardson
 
More the merrier: a microservices anti-pattern
Chris Richardson
 
YOW London - Considering Migrating a Monolith to Microservices? A Dark Energy...
Chris Richardson
 
Dark Energy, Dark Matter and the Microservices Patterns?!
Chris Richardson
 
Dark energy, dark matter and microservice architecture collaboration patterns
Chris Richardson
 
Scenarios_and_Architecture_SkillsMatter_April_2022.pdf
Chris Richardson
 
iSAQB gathering 2021 keynote - Architectural patterns for rapid, reliable, fr...
Chris Richardson
 
Events to the rescue: solving distributed data problems in a microservice arc...
Chris Richardson
 
A pattern language for microservices - June 2021
Chris Richardson
 
QConPlus 2021: Minimizing Design Time Coupling in a Microservice Architecture
Chris Richardson
 
Mucon 2021 - Dark energy, dark matter: imperfect metaphors for designing micr...
Chris Richardson
 
Microservices - an architecture that enables DevOps (T Systems DevOps day)
Chris Richardson
 
DDD SoCal: Decompose your monolith: Ten principles for refactoring a monolith...
Chris Richardson
 
TDC2020 - The microservice architecture: enabling rapid, reliable, frequent a...
Chris Richardson
 
#DevNexus202 Decompose your monolith
Chris Richardson
 
JFokus: Cubes, Hexagons, Triangles, and More: Understanding Microservices
Chris Richardson
 
Decompose your monolith: strategies for migrating to microservices (Tide)
Chris Richardson
 
Oracle CodeOne 2019: Descending the Testing Pyramid: Effective Testing Strate...
Chris Richardson
 
Oracle CodeOne 2019: Decompose Your Monolith: Strategies for Migrating to Mic...
Chris Richardson
 
YOW! Perth: Cubes, Hexagons, Triangles, and More: Understanding the Microserv...
Chris Richardson
 
MicroCPH - Managing data consistency in a microservice architecture using Sagas
Chris Richardson
 

Recently uploaded (20)

PPTX
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
PPTX
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
PPT
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
PPTX
Role Of Python In Programing Language.pptx
jaykoshti048
 
PPTX
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
PDF
Bandai Playdia The Book - David Glotz
BluePanther6
 
PPTX
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
PDF
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
PDF
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
PDF
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
PDF
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
PPT
Activate_Methodology_Summary presentatio
annapureddyn
 
PDF
10 posting ideas for community engagement with AI prompts
Pankaj Taneja
 
PPTX
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
PPTX
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
PPTX
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
PPTX
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
PDF
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
PDF
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
PDF
Using licensed Data Loss Prevention (DLP) as a strategic proactive data secur...
Q-Advise
 
slidesgo-unlocking-the-code-the-dynamic-dance-of-variables-and-constants-2024...
kr2589474
 
AI-Ready Handoff: Auto-Summaries & Draft Emails from MQL to Slack in One Flow
bbedford2
 
Why Reliable Server Maintenance Service in New York is Crucial for Your Business
Sam Vohra
 
Role Of Python In Programing Language.pptx
jaykoshti048
 
The-Dawn-of-AI-Reshaping-Our-World.pptxx
parthbhanushali307
 
Bandai Playdia The Book - David Glotz
BluePanther6
 
Visualising Data with Scatterplots in IBM SPSS Statistics.pptx
Version 1 Analytics
 
On Software Engineers' Productivity - Beyond Misleading Metrics
Romén Rodríguez-Gil
 
An Experience-Based Look at AI Lead Generation Pricing, Features & B2B Results
Thomas albart
 
49785682629390197565_LRN3014_Migrating_the_Beast.pdf
Abilash868456
 
New Download FL Studio Crack Full Version [Latest 2025]
imang66g
 
Activate_Methodology_Summary presentatio
annapureddyn
 
10 posting ideas for community engagement with AI prompts
Pankaj Taneja
 
ASSIGNMENT_1[1][1][1][1][1] (1) variables.pptx
kr2589474
 
GALILEO CRS SYSTEM | GALILEO TRAVEL SOFTWARE
philipnathen82
 
Can You Build Dashboards Using Open Source Visualization Tool.pptx
Varsha Nayak
 
ConcordeApp: Engineering Global Impact & Unlocking Billions in Event ROI with AI
chastechaste14
 
Generating Union types w/ Static Analysis
K. Matthew Dupree
 
Download iTop VPN Free 6.1.0.5882 Crack Full Activated Pre Latest 2025
imang66g
 
Using licensed Data Loss Prevention (DLP) as a strategic proactive data secur...
Q-Advise
 

Overview of the Eventuate Tram Customers and Orders application