Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Other

Axon Components

Rating
-
Sold
-
Pages
8
Uploaded on
05-06-2023
Written in
2022/2023

Axon framework

Institution
Course

Content preview

The Event Sourcing pattern adopts a different
approach in storing application state,
retrieving application state, and publishing
application state changes within the various
Bounded Contexts of an application.
Before we get into the details of event sourcing,
let us look at the traditional approach
of state maintenance.
Traditional applications use “Domain Sourcing
or State Sourcing” to store/retrieve
Aggregate state. The concept of domain sourcing
is that we construct, modify, or query
Aggregate state using a traditional data storage
mechanism (e.g., Relational Databases, NoSQL
Database). Only once the Aggregate state has
been persisted do we publish the event onto a
message broker. Our previous implementations
have all been based on “Domain Sourcing.”
Domain-sourced applications are fairly
straightforward in usage since they use the
traditional mechanisms of storing and retrieving
state. The state of an Aggregate within the
various Bounded Contexts is stored as is
whenever there is an operation on the
Aggregate,

, for example, when we Book a New Cargo, a new
cargo is created, and the details of the new
cargo are stored in the corresponding CARGO
table in the database (in our case a Database
Schema within the Booking Bounded Context).
We raise a New Cargo Booked Event which
is pushed onto a traditional message broker
which can be subscribed by any other bounded
context. We use a dedicated message broker onto
which these events are published.
On the other hand, Event Sourcing works
exclusively with events that occur on
Aggregates. Every change of state of an
Aggregate is captured as an event, and only the
event
is persisted instead of the whole Aggregate
Instance with payload as the Aggregate Instance.
Again to reemphasize, we only store the event
and not the
aggregate as a whole.
As depicted, at the end of the “Book New Cargo”
operation, we persist only the
“Cargo Booked Event” and not the Cargo
Aggregate Instance. The event is persisted in
a specialized purpose-built Event Store. The
event store in addition to acting as the
persistence store for events also needs to double
up as an Event Router, that is, it should

Written for

Course

Document information

Uploaded on
June 5, 2023
Number of pages
8
Written in
2022/2023
Type
OTHER
Person
Unknown

Subjects

$12.99
Get access to the full document:

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Get to know the seller
Seller avatar
santhoshmohan1

Get to know the seller

Seller avatar
santhoshmohan1 Dg vaishnav college
Follow You need to be logged in order to follow users or courses
Sold
-
Member since
2 year
Number of followers
0
Documents
1
Last sold
-

0.0

0 reviews

5
0
4
0
3
0
2
0
1
0

Recently viewed by you

Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions