[ROOT] / doc / toc / ARCCore / Enum / ARConcepts / EventSourcing


(related to ARCEvent).

NOTE: As of Jan 2022 there is some confusion about what AgoRapide is really doing, 'Command Sourcing' or 'Event Sourcing'.
NOTE: And some people are actually calling Fowlers description below for 'Command Sourcing'.
NOTE: One possible clarification is to state that ARCEvent persists only the
NOTE: -Reg-s (Registrations) performed by the user (in the RegStream).
NOTE: That is, it does not persist events in the TransientEventTree.
NOTE: BUT, at the same time, an -IRegHandler- can be seen as both a command and event, this especially applies to
NOTE: -CNER- and -SSPR- for instance.
NOTE:
NOTE: One way to distinguish an -IRegHandler- is to see whether it is an
NOTE: -IRegHandlerTGTE- (more like a Command) or -IRegHandlerTAERTE- (more like an Event).
NOTE: but there is nothing preventing it from being both.

As described by Martin Fowler in

https://martinfowler.com/eaaDev/EventSourcing.html

"Event Sourcing ensures that all changes to application state are stored as a sequence of events.
Not just can we query these events, we can also use the event log to reconstruct past states,
and as a foundation to automatically adjust the state to cope with retroactive changes."

The concept of PropertyStream covers the first part of this definition, for the
last part (retroactive changes), see ARCEvent and PropertyStream2D

In AgoRapide the term Event Sourcing 2D is used in order to help understand the concept. Event Sourcing 2D introduces two axes,
the downwards pointing -RegTime- and the rightwards pointing -EventTime-.

The corresponding "streams" along these axes is called RegStream and EventStream.

The API offers the -RSController- for operating on the -Reg- (Registration) side (which can also be called the "input"-side,
and the -ESController- for reading the result on the -Event- side (which can also be called the "output"-side.

The concept of Event Sourcing 2D is useful in order to construct an optimal code base covering all this.


Details

Generated 2024-12-22 05:56:59.682 UTC