SlideShare uma empresa Scribd logo
1 de 28
CQRS and Event Sourcing With Axon Framework
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Content
 Classical old school N-Tier Architecture and its Characteristics
 Drawbacks of Classical old school N-Tier Architecture
 DDD and Aggregates
 Event Sourcing
 CQRS
 Event Sourcing and CQRS
 Axon Framework
 Resources and QnA
2
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Classical old school N-Tier Architecture
Let’s Review the
classical old school
N-tier Architecture
Client
Network
Soap/REST End Point
Business Service
Dao
Network
RDBMS
View
Model
DTO
Business
Model
ER-
Model
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Characteristics
We read and write data
through the same layers
1
WRITE
READ
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Characteristics
5
2
We use the same Data
model for read and
write access
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Characteristics
We use coarse grained
Deployment units that
Combine read and write
3
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Characteristics
7
We change datasets directly
4
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Using N-Tier Architecture is not an issue
8
Many Applications will
run smooth and fine
with this kind of approach
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Drawbacks of Classical old school N-Tier Architecture
 The data model is a compromise.
 You can’t scale read and write separately.
 Horizontal scale has limit.
 Normalized SQL Queries(Joins and sub queries).
 No Data history, no snapshots, no replay.
 Tendency to a monolithic application.
9
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
DDD
Domain-Driven Design (DDD) describes an approach to building
software that puts a lot of emphasis on the design of a model,
leveraging the use of ubiquitous language . The domain model is the
heart of software and should correctly capture and deal with the
essential complexity of the domain.
Ubiquitous Language is the term uses in Domain Driven Design for the
practice of building up a common, rigorous language between
developers and users(client).
10
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Aggregates
An Aggregate is a cluster of domain objects that can be treated as a
unit. It consists of a root entity and possibly one or more other
associated entities and value objects. For example, the domain model
for the online store contains aggregates such as Order and Customer.
An Order aggregate consists of an Order entity (the root), one or more
OrderLineItem value objects along with other value objects such as a
delivery Address and PaymentInformation. A Customer aggregate
consists of the Customer root entity along with other value objects
such a DeliveryInfo and PaymentInformation.
11
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Event Sourcing
Event Sourcing is an architectural pattern in which the state of the
application is being determined by a sequence of events.
Event is something that has happened to a domain object. An
event usually represents a state change. Consider, for example, an
Order aggregate in the online store. Its state changing events
include Order Created, Order Cancelled, Order Shipped. Events can
represent attempts to violate a business rule such as a Customer’s
credit limit.
12
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Event Handling
13
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Events Streams
The sequence of events in the queue is called event stream.
14
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Key Points
 Event Sourcing is a technique for reliably updating state and
publishing events that overcomes limitations of other solutions.
 The design concepts for an event-driven architecture, using event
sourcing, align well with microservices architecture patterns.
 Snapshots can improve performance when querying aggregates by
combining all events up to a certain point in time.
 Event sourcing can create challenges for queries, but these are
overcome by following CQRS guidelines and materialized views.
 Event sourcing and CQRS do not require any specific tools or
software, and many frameworks exist which can fill in some of the
low-level functionality.
15
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Events
 An event is something that happened in the past.(ex:- Order
Related Events)
 An Event is always immutable.
 A Create/Update/delete are just an event.
 There is no deletion of events.
 The Events use event bus which is usually implemented by a
message broker.
16
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Examples of Events
17
ShipmentDeliveredEvent
CustomerVerifiedEvent
CartCheckedOutEvent
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Advantages of Event Sourcing
 Complete rebuild is possible.
 Temporal Queries.
 Event Replay.
 Works well with Domain Driven Design.
 Useful in Analytics based on Historical data.
18
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
CQRS
Command Query Responsibility Separation
CQRS, as the name suggests, splits the application into two parts. The
first part is the command-side, which handles commands (e.g. HTTP
POSTs, PUTs, and DELETEs) to create, update and delete aggregates.
These aggregates are, of course, implemented using event sourcing.
The second part of the application is the query side, which handles
queries (e.g. HTTP GETs) by querying one or more materialized views
of the aggregates. The query side keeps the views synchronized with
the aggregates by subscribing to events published by the command
side.
19
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Old vs CQRS
Old architecture Idea behind CQRS
20
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
CQRS Code Example
21
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Event Sourcing and CQRS
22
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Advantages
 Individual scalability and deployment options.
 Technological freedom of choice for command, query and event
handler code.
 Excellent Fit for Bounded Context (Domain Driven Design).
 Enhanced User Experience.
 The Event Store has a very high business value.
23
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Axon Framework
Axon provides the Axon Framework and the Axon Server to help build
applications centered on three core concepts - CQRS (Command Query
Responsibility Segregation) / Event Sourcing and DDD (Domain Driven
Design).While many types of applications can be built using Axon, it
has proven to be very popular for microservices architectures. Axon
provides an innovative and powerful way of sensibly evolving to event-
driven microservices within a microservices architecture.
24
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Architecture Overview
25
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Why Axon?
 Reduce Boilerplate Code.
 APIs as design Guidance.
 Infrastructure as Configuration.
 Use cases for Microservices.
 Integration(works with explicit messaging).
26
© Landis+Gyr | September 25, 2020 | CONFIDENTIAL
Resources
CQRS by Martin Fowler
https://martinfowler.com/bliki/CQRS.html
Event Sourcing by Martin Fowler
https://martinfowler.com/eaaDev/EventSourcing.html
Axon Framework
https://axoniq.io/
https://www.infoq.com/articles/microservices-aggregates-events-
cqrs-part-1-richardson/
27
© Landis+Gyr | September 15, 2020 | CONFIDENTIAL 28
Thank you for your attention.
Questions?

Mais conteúdo relacionado

Mais procurados

GDS and Government as a Platform | Felicity Singleton | March 2016
GDS and Government as a Platform | Felicity Singleton | March 2016GDS and Government as a Platform | Felicity Singleton | March 2016
GDS and Government as a Platform | Felicity Singleton | March 2016Anna Fenston
 
APIdays Paris 2018 - From real-life challenges to industrial IoT solutions, i...
APIdays Paris 2018 - From real-life challenges to industrial IoT solutions, i...APIdays Paris 2018 - From real-life challenges to industrial IoT solutions, i...
APIdays Paris 2018 - From real-life challenges to industrial IoT solutions, i...apidays
 
Alchemy of the API Economy
Alchemy of the API EconomyAlchemy of the API Economy
Alchemy of the API EconomyWSO2
 
[WSO2 Summit APAC 2020] Automating an Integrated API Supply Chain Using a Clo...
[WSO2 Summit APAC 2020] Automating an Integrated API Supply Chain Using a Clo...[WSO2 Summit APAC 2020] Automating an Integrated API Supply Chain Using a Clo...
[WSO2 Summit APAC 2020] Automating an Integrated API Supply Chain Using a Clo...WSO2
 
"Big Data e vissuto quotidiano" - Massimo Villari per lo Stretto Digitale
"Big Data e vissuto quotidiano" - Massimo Villari per lo Stretto Digitale"Big Data e vissuto quotidiano" - Massimo Villari per lo Stretto Digitale
"Big Data e vissuto quotidiano" - Massimo Villari per lo Stretto Digitalelostrettodigitale
 
Building a Future-ready Bank
Building a Future-ready BankBuilding a Future-ready Bank
Building a Future-ready BankWSO2
 
MiCADO - Auto-scaling Framework for Docker Containers, orchestrated by Kubern...
MiCADO - Auto-scaling Framework for Docker Containers, orchestrated by Kubern...MiCADO - Auto-scaling Framework for Docker Containers, orchestrated by Kubern...
MiCADO - Auto-scaling Framework for Docker Containers, orchestrated by Kubern...Project COLA
 
[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital Ecosystem
[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital Ecosystem[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital Ecosystem
[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital EcosystemWSO2
 
SmartCLIDE presented during the HORIZON CLOUD Community event
SmartCLIDE presented during the HORIZON CLOUD Community event SmartCLIDE presented during the HORIZON CLOUD Community event
SmartCLIDE presented during the HORIZON CLOUD Community event H2020 SmartCLIDE Project
 
Project COLA Flyer V2 EN Web
Project COLA Flyer V2 EN WebProject COLA Flyer V2 EN Web
Project COLA Flyer V2 EN WebProject COLA
 
FSM integration with SAP
FSM integration with SAPFSM integration with SAP
FSM integration with SAPCapgemini
 
WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Soft Integration - Ha...
WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Soft Integration - Ha...WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Soft Integration - Ha...
WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Soft Integration - Ha...Yenlo
 
WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Introduction - Ruben ...
WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Introduction - Ruben ...WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Introduction - Ruben ...
WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Introduction - Ruben ...Yenlo
 
Data Virtualisation and API Management United
Data Virtualisation and API Management UnitedData Virtualisation and API Management United
Data Virtualisation and API Management UnitedSmartWave
 
UK G-Cloud: The First Instantiation of True Cloud?
UK G-Cloud: The First Instantiation of True Cloud?UK G-Cloud: The First Instantiation of True Cloud?
UK G-Cloud: The First Instantiation of True Cloud?Skills Matter
 
API Program Lessons learned
API Program Lessons learnedAPI Program Lessons learned
API Program Lessons learnedSmartWave
 
Data Agility and Security with Data Virtualisation
Data Agility and Security with Data VirtualisationData Agility and Security with Data Virtualisation
Data Agility and Security with Data VirtualisationSmartWave
 

Mais procurados (20)

GDS and Government as a Platform | Felicity Singleton | March 2016
GDS and Government as a Platform | Felicity Singleton | March 2016GDS and Government as a Platform | Felicity Singleton | March 2016
GDS and Government as a Platform | Felicity Singleton | March 2016
 
CIR Conferences - IBM
CIR Conferences - IBMCIR Conferences - IBM
CIR Conferences - IBM
 
APIdays Paris 2018 - From real-life challenges to industrial IoT solutions, i...
APIdays Paris 2018 - From real-life challenges to industrial IoT solutions, i...APIdays Paris 2018 - From real-life challenges to industrial IoT solutions, i...
APIdays Paris 2018 - From real-life challenges to industrial IoT solutions, i...
 
Alchemy of the API Economy
Alchemy of the API EconomyAlchemy of the API Economy
Alchemy of the API Economy
 
[WSO2 Summit APAC 2020] Automating an Integrated API Supply Chain Using a Clo...
[WSO2 Summit APAC 2020] Automating an Integrated API Supply Chain Using a Clo...[WSO2 Summit APAC 2020] Automating an Integrated API Supply Chain Using a Clo...
[WSO2 Summit APAC 2020] Automating an Integrated API Supply Chain Using a Clo...
 
"Big Data e vissuto quotidiano" - Massimo Villari per lo Stretto Digitale
"Big Data e vissuto quotidiano" - Massimo Villari per lo Stretto Digitale"Big Data e vissuto quotidiano" - Massimo Villari per lo Stretto Digitale
"Big Data e vissuto quotidiano" - Massimo Villari per lo Stretto Digitale
 
Building a Future-ready Bank
Building a Future-ready BankBuilding a Future-ready Bank
Building a Future-ready Bank
 
MiCADO - Auto-scaling Framework for Docker Containers, orchestrated by Kubern...
MiCADO - Auto-scaling Framework for Docker Containers, orchestrated by Kubern...MiCADO - Auto-scaling Framework for Docker Containers, orchestrated by Kubern...
MiCADO - Auto-scaling Framework for Docker Containers, orchestrated by Kubern...
 
[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital Ecosystem
[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital Ecosystem[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital Ecosystem
[EIC 2021] Securing the Digital Double - The Path to a Trusted Digital Ecosystem
 
KED BIM Capabilities
KED BIM Capabilities KED BIM Capabilities
KED BIM Capabilities
 
SmartCLIDE presented during the HORIZON CLOUD Community event
SmartCLIDE presented during the HORIZON CLOUD Community event SmartCLIDE presented during the HORIZON CLOUD Community event
SmartCLIDE presented during the HORIZON CLOUD Community event
 
Project COLA Flyer V2 EN Web
Project COLA Flyer V2 EN WebProject COLA Flyer V2 EN Web
Project COLA Flyer V2 EN Web
 
FSM integration with SAP
FSM integration with SAPFSM integration with SAP
FSM integration with SAP
 
WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Soft Integration - Ha...
WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Soft Integration - Ha...WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Soft Integration - Ha...
WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Soft Integration - Ha...
 
WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Introduction - Ruben ...
WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Introduction - Ruben ...WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Introduction - Ruben ...
WSO2 - Yenlo Integration Summit Stuttgart 15 May 2019 - Introduction - Ruben ...
 
Data Virtualisation and API Management United
Data Virtualisation and API Management UnitedData Virtualisation and API Management United
Data Virtualisation and API Management United
 
IoT13: Datownia showcase
IoT13: Datownia showcaseIoT13: Datownia showcase
IoT13: Datownia showcase
 
UK G-Cloud: The First Instantiation of True Cloud?
UK G-Cloud: The First Instantiation of True Cloud?UK G-Cloud: The First Instantiation of True Cloud?
UK G-Cloud: The First Instantiation of True Cloud?
 
API Program Lessons learned
API Program Lessons learnedAPI Program Lessons learned
API Program Lessons learned
 
Data Agility and Security with Data Virtualisation
Data Agility and Security with Data VirtualisationData Agility and Security with Data Virtualisation
Data Agility and Security with Data Virtualisation
 

Semelhante a Cqrs event sourcing slide landis+gyr

Architecting for the Cloud with TOGAF®
Architecting for the Cloud with TOGAF®Architecting for the Cloud with TOGAF®
Architecting for the Cloud with TOGAF®Sunil Kempegowda
 
The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...
The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...
The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...valuebound
 
Battling the disrupting Energy Markets utilizing PURE PLAY Cloud Computing
Battling the disrupting Energy Markets utilizing PURE PLAY Cloud ComputingBattling the disrupting Energy Markets utilizing PURE PLAY Cloud Computing
Battling the disrupting Energy Markets utilizing PURE PLAY Cloud ComputingEdwin Poot
 
With events to a modern integration architecture
With events to a modern integration architectureWith events to a modern integration architecture
With events to a modern integration architectureconfluent
 
Dell Technology World - IT as a Business - Multi-Cloud Strategy is your Product
Dell Technology World - IT as a Business - Multi-Cloud Strategy is your ProductDell Technology World - IT as a Business - Multi-Cloud Strategy is your Product
Dell Technology World - IT as a Business - Multi-Cloud Strategy is your ProductManuel "Manny" Rodriguez-Perez
 
CLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISECLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISEHung
 
CLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISECLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISEHung Vu
 
Dynamics of Cloud and Its impact on Engagement - Delivery and Operations - CF...
Dynamics of Cloud and Its impact on Engagement - Delivery and Operations - CF...Dynamics of Cloud and Its impact on Engagement - Delivery and Operations - CF...
Dynamics of Cloud and Its impact on Engagement - Delivery and Operations - CF...Hasan Basri AKIRMAK, MSc,ExecMBA
 
Rethinking the Database in the IoT Era
Rethinking the Database in the IoT EraRethinking the Database in the IoT Era
Rethinking the Database in the IoT EraInfluxData
 
apidays Paris 2022 - Blurred Lines, Denis Jannot, Solo.io
apidays Paris 2022 - Blurred Lines, Denis Jannot, Solo.ioapidays Paris 2022 - Blurred Lines, Denis Jannot, Solo.io
apidays Paris 2022 - Blurred Lines, Denis Jannot, Solo.ioapidays
 
Serverless service adoption for Thailand
Serverless service adoption for ThailandServerless service adoption for Thailand
Serverless service adoption for ThailandWatcharin Yang-Ngam
 
Century link ingram micro cloud workshop presentation final
Century link ingram micro cloud workshop presentation finalCentury link ingram micro cloud workshop presentation final
Century link ingram micro cloud workshop presentation finalIngram Micro Cloud
 
Securing Kubernetes Clusters with NGINX Plus Ingress Controller & NAP
Securing Kubernetes Clusters with NGINX Plus Ingress Controller & NAPSecuring Kubernetes Clusters with NGINX Plus Ingress Controller & NAP
Securing Kubernetes Clusters with NGINX Plus Ingress Controller & NAPOlivia LaMar
 
Architecture 2020 - eComputing 2019-07-01
Architecture 2020 - eComputing 2019-07-01Architecture 2020 - eComputing 2019-07-01
Architecture 2020 - eComputing 2019-07-01Jorge Hidalgo
 
AWS Summit 2013 | Singapore - Design for Success: Defining & Delivering your ...
AWS Summit 2013 | Singapore - Design for Success: Defining & Delivering your ...AWS Summit 2013 | Singapore - Design for Success: Defining & Delivering your ...
AWS Summit 2013 | Singapore - Design for Success: Defining & Delivering your ...Amazon Web Services
 
API First or Events First: Is it a Binary Choice?
API First or Events First: Is it a Binary Choice?API First or Events First: Is it a Binary Choice?
API First or Events First: Is it a Binary Choice?VMware Tanzu
 
API First or Events First: Is it a Binary Choice?
API First or Events First: Is it a Binary Choice?  API First or Events First: Is it a Binary Choice?
API First or Events First: Is it a Binary Choice? Rohit Kelapure
 
Certified Cloud Computing Specialist (CCCS)
Certified Cloud Computing Specialist (CCCS)Certified Cloud Computing Specialist (CCCS)
Certified Cloud Computing Specialist (CCCS)GICTTraining
 
Paving the Way to the Cloud: Cloud Services Brokerage for Highly Secure, Dem...
Paving the Way to the Cloud:  Cloud Services Brokerage for Highly Secure, Dem...Paving the Way to the Cloud:  Cloud Services Brokerage for Highly Secure, Dem...
Paving the Way to the Cloud: Cloud Services Brokerage for Highly Secure, Dem...GovCloud Network
 

Semelhante a Cqrs event sourcing slide landis+gyr (20)

Architecting for the Cloud with TOGAF®
Architecting for the Cloud with TOGAF®Architecting for the Cloud with TOGAF®
Architecting for the Cloud with TOGAF®
 
The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...
The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...
The Future of Cloud Engineering: Emerging Trends and Technologies to Watch in...
 
Battling the disrupting Energy Markets utilizing PURE PLAY Cloud Computing
Battling the disrupting Energy Markets utilizing PURE PLAY Cloud ComputingBattling the disrupting Energy Markets utilizing PURE PLAY Cloud Computing
Battling the disrupting Energy Markets utilizing PURE PLAY Cloud Computing
 
With events to a modern integration architecture
With events to a modern integration architectureWith events to a modern integration architecture
With events to a modern integration architecture
 
Dell Technology World - IT as a Business - Multi-Cloud Strategy is your Product
Dell Technology World - IT as a Business - Multi-Cloud Strategy is your ProductDell Technology World - IT as a Business - Multi-Cloud Strategy is your Product
Dell Technology World - IT as a Business - Multi-Cloud Strategy is your Product
 
CLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISECLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISE
 
CLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISECLOUD FOR ENTERPRISE
CLOUD FOR ENTERPRISE
 
Dynamics of Cloud and Its impact on Engagement - Delivery and Operations - CF...
Dynamics of Cloud and Its impact on Engagement - Delivery and Operations - CF...Dynamics of Cloud and Its impact on Engagement - Delivery and Operations - CF...
Dynamics of Cloud and Its impact on Engagement - Delivery and Operations - CF...
 
Rethinking the Database in the IoT Era
Rethinking the Database in the IoT EraRethinking the Database in the IoT Era
Rethinking the Database in the IoT Era
 
apidays Paris 2022 - Blurred Lines, Denis Jannot, Solo.io
apidays Paris 2022 - Blurred Lines, Denis Jannot, Solo.ioapidays Paris 2022 - Blurred Lines, Denis Jannot, Solo.io
apidays Paris 2022 - Blurred Lines, Denis Jannot, Solo.io
 
Serverless service adoption for Thailand
Serverless service adoption for ThailandServerless service adoption for Thailand
Serverless service adoption for Thailand
 
Century link ingram micro cloud workshop presentation final
Century link ingram micro cloud workshop presentation finalCentury link ingram micro cloud workshop presentation final
Century link ingram micro cloud workshop presentation final
 
Cloud Customer Architecture for Hybrid Integration
Cloud Customer Architecture for Hybrid IntegrationCloud Customer Architecture for Hybrid Integration
Cloud Customer Architecture for Hybrid Integration
 
Securing Kubernetes Clusters with NGINX Plus Ingress Controller & NAP
Securing Kubernetes Clusters with NGINX Plus Ingress Controller & NAPSecuring Kubernetes Clusters with NGINX Plus Ingress Controller & NAP
Securing Kubernetes Clusters with NGINX Plus Ingress Controller & NAP
 
Architecture 2020 - eComputing 2019-07-01
Architecture 2020 - eComputing 2019-07-01Architecture 2020 - eComputing 2019-07-01
Architecture 2020 - eComputing 2019-07-01
 
AWS Summit 2013 | Singapore - Design for Success: Defining & Delivering your ...
AWS Summit 2013 | Singapore - Design for Success: Defining & Delivering your ...AWS Summit 2013 | Singapore - Design for Success: Defining & Delivering your ...
AWS Summit 2013 | Singapore - Design for Success: Defining & Delivering your ...
 
API First or Events First: Is it a Binary Choice?
API First or Events First: Is it a Binary Choice?API First or Events First: Is it a Binary Choice?
API First or Events First: Is it a Binary Choice?
 
API First or Events First: Is it a Binary Choice?
API First or Events First: Is it a Binary Choice?  API First or Events First: Is it a Binary Choice?
API First or Events First: Is it a Binary Choice?
 
Certified Cloud Computing Specialist (CCCS)
Certified Cloud Computing Specialist (CCCS)Certified Cloud Computing Specialist (CCCS)
Certified Cloud Computing Specialist (CCCS)
 
Paving the Way to the Cloud: Cloud Services Brokerage for Highly Secure, Dem...
Paving the Way to the Cloud:  Cloud Services Brokerage for Highly Secure, Dem...Paving the Way to the Cloud:  Cloud Services Brokerage for Highly Secure, Dem...
Paving the Way to the Cloud: Cloud Services Brokerage for Highly Secure, Dem...
 

Último

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...DianaGray10
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...Martijn de Jong
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProduct Anonymous
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoffsammart93
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Drew Madelung
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfsudhanshuwaghmare1
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdflior mazor
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 

Último (20)

Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
Connector Corner: Accelerate revenue generation using UiPath API-centric busi...
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot TakeoffStrategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
Strategize a Smooth Tenant-to-tenant Migration and Copilot Takeoff
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data DiscoveryTrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
TrustArc Webinar - Unlock the Power of AI-Driven Data Discovery
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 

Cqrs event sourcing slide landis+gyr

  • 1. CQRS and Event Sourcing With Axon Framework
  • 2. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Content  Classical old school N-Tier Architecture and its Characteristics  Drawbacks of Classical old school N-Tier Architecture  DDD and Aggregates  Event Sourcing  CQRS  Event Sourcing and CQRS  Axon Framework  Resources and QnA 2
  • 3. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Classical old school N-Tier Architecture Let’s Review the classical old school N-tier Architecture Client Network Soap/REST End Point Business Service Dao Network RDBMS View Model DTO Business Model ER- Model
  • 4. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Characteristics We read and write data through the same layers 1 WRITE READ
  • 5. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Characteristics 5 2 We use the same Data model for read and write access
  • 6. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Characteristics We use coarse grained Deployment units that Combine read and write 3
  • 7. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Characteristics 7 We change datasets directly 4
  • 8. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Using N-Tier Architecture is not an issue 8 Many Applications will run smooth and fine with this kind of approach
  • 9. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Drawbacks of Classical old school N-Tier Architecture  The data model is a compromise.  You can’t scale read and write separately.  Horizontal scale has limit.  Normalized SQL Queries(Joins and sub queries).  No Data history, no snapshots, no replay.  Tendency to a monolithic application. 9
  • 10. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL DDD Domain-Driven Design (DDD) describes an approach to building software that puts a lot of emphasis on the design of a model, leveraging the use of ubiquitous language . The domain model is the heart of software and should correctly capture and deal with the essential complexity of the domain. Ubiquitous Language is the term uses in Domain Driven Design for the practice of building up a common, rigorous language between developers and users(client). 10
  • 11. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Aggregates An Aggregate is a cluster of domain objects that can be treated as a unit. It consists of a root entity and possibly one or more other associated entities and value objects. For example, the domain model for the online store contains aggregates such as Order and Customer. An Order aggregate consists of an Order entity (the root), one or more OrderLineItem value objects along with other value objects such as a delivery Address and PaymentInformation. A Customer aggregate consists of the Customer root entity along with other value objects such a DeliveryInfo and PaymentInformation. 11
  • 12. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Event Sourcing Event Sourcing is an architectural pattern in which the state of the application is being determined by a sequence of events. Event is something that has happened to a domain object. An event usually represents a state change. Consider, for example, an Order aggregate in the online store. Its state changing events include Order Created, Order Cancelled, Order Shipped. Events can represent attempts to violate a business rule such as a Customer’s credit limit. 12
  • 13. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Event Handling 13
  • 14. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Events Streams The sequence of events in the queue is called event stream. 14
  • 15. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Key Points  Event Sourcing is a technique for reliably updating state and publishing events that overcomes limitations of other solutions.  The design concepts for an event-driven architecture, using event sourcing, align well with microservices architecture patterns.  Snapshots can improve performance when querying aggregates by combining all events up to a certain point in time.  Event sourcing can create challenges for queries, but these are overcome by following CQRS guidelines and materialized views.  Event sourcing and CQRS do not require any specific tools or software, and many frameworks exist which can fill in some of the low-level functionality. 15
  • 16. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Events  An event is something that happened in the past.(ex:- Order Related Events)  An Event is always immutable.  A Create/Update/delete are just an event.  There is no deletion of events.  The Events use event bus which is usually implemented by a message broker. 16
  • 17. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Examples of Events 17 ShipmentDeliveredEvent CustomerVerifiedEvent CartCheckedOutEvent
  • 18. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Advantages of Event Sourcing  Complete rebuild is possible.  Temporal Queries.  Event Replay.  Works well with Domain Driven Design.  Useful in Analytics based on Historical data. 18
  • 19. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL CQRS Command Query Responsibility Separation CQRS, as the name suggests, splits the application into two parts. The first part is the command-side, which handles commands (e.g. HTTP POSTs, PUTs, and DELETEs) to create, update and delete aggregates. These aggregates are, of course, implemented using event sourcing. The second part of the application is the query side, which handles queries (e.g. HTTP GETs) by querying one or more materialized views of the aggregates. The query side keeps the views synchronized with the aggregates by subscribing to events published by the command side. 19
  • 20. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Old vs CQRS Old architecture Idea behind CQRS 20
  • 21. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL CQRS Code Example 21
  • 22. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Event Sourcing and CQRS 22
  • 23. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Advantages  Individual scalability and deployment options.  Technological freedom of choice for command, query and event handler code.  Excellent Fit for Bounded Context (Domain Driven Design).  Enhanced User Experience.  The Event Store has a very high business value. 23
  • 24. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Axon Framework Axon provides the Axon Framework and the Axon Server to help build applications centered on three core concepts - CQRS (Command Query Responsibility Segregation) / Event Sourcing and DDD (Domain Driven Design).While many types of applications can be built using Axon, it has proven to be very popular for microservices architectures. Axon provides an innovative and powerful way of sensibly evolving to event- driven microservices within a microservices architecture. 24
  • 25. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Architecture Overview 25
  • 26. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Why Axon?  Reduce Boilerplate Code.  APIs as design Guidance.  Infrastructure as Configuration.  Use cases for Microservices.  Integration(works with explicit messaging). 26
  • 27. © Landis+Gyr | September 25, 2020 | CONFIDENTIAL Resources CQRS by Martin Fowler https://martinfowler.com/bliki/CQRS.html Event Sourcing by Martin Fowler https://martinfowler.com/eaaDev/EventSourcing.html Axon Framework https://axoniq.io/ https://www.infoq.com/articles/microservices-aggregates-events- cqrs-part-1-richardson/ 27
  • 28. © Landis+Gyr | September 15, 2020 | CONFIDENTIAL 28 Thank you for your attention. Questions?