Critter Stack Event Sourcing Game Plan for 2023 #2550
Unanswered
jeremydmiller
asked this question in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Daemon & Event Store Improvements
Warning folks upfront that some of this will be part of the forthcoming "Critter Stack" paid product on top of Marten/Wolverine
Problems
Potential Remedies
IQuerySession
within projections to look up additional dataQuestions
Daemon Changes
event fetching. This might still be valuable if there's predominantly projections that only use a subset of the projections being captured or if there's very little sharing of events between
projections. If multiple projections are using the same events in different ways, this may be introducing a lot of overhead
Inline to Snapshotting
Today, the
FetchForWriting()
functionality is built for aggregating streams, either for a "write" or "read" model.FetchForWriting()
assumes that the projection is either "Inline" or "Live". Instead, what if folks use theAsync
lifecycle as a default, and theFetchForWriting()
works by efficiently starting from the currently saved version and applying any events with newer versions than the current snapshot. This would go a long way toward effecting "zero downtime" rebuilds at least for aggregate by stream scenarios.Tasks:
EventVersion
number to the document storage table for the aggregate projectionEventVersion
value to the latest stream version when updatingFetchForWriting()
when working w/ per stream aggregatesFetchForWriting()
that fetches both any snapshotted version of an aggregate and any events for the stream applied after the snapshotted version and aggregates live from that baselineConcept: Combine Marten Async Daemon and Wolverine Durability Agent
Both the Wolverine "Durability Agent" and the Marten "Async Daemon" today do a lot of polling
on every single application node. Marten would be independently polling on each tenant database while
wolverine is not yet able to handle multiple databases.
commands and the response to them. Might move that interface and some generic handling code for that to Weasel so that it could also be used w/ Sql Server some day
Leadership Election
Possible use a database sequence for every new application node on start up, then always the leader
is the node with the lowest number -- but the deployed application version matters here, such that a new node coming up with a higher app version takes precedence. That might give us a blue/green deployment strategy
If there's a way to do request/reply messaging with each individual node, use something off the
shelf to do a bully algorithm or Raft algorithm. But we are not writing our own leadership protocol unless it's dirt simple
Improved Event Projection Rebuilds & Blue/green deployment
Projection Versioning
Revision : int
property to bothIProjection
&IProjectionSource
simultaneously
"Catch Up" Projection Mode
When a projection (like a new projection version) is known to be way behind the current high water mark, some types of projections could
be in a "catch up" mode. For any projection that is aggregated by stream, what we do in "catch up" mode is to:
Introduce formal concept of "time-sliced" projections
It would clearly help to have some concept of "time-sliced" projections across streams that would lead to:
Timestamp
Wolverine Enhancements
Node storage & "control" endpoints for each Node. We had this years ago w/ FubuTransportation. Easy with Rabbit MQ. Could be done w/ HTTP too. Need to figure out how to have transient queues in other transports
Maybe a Postgresql backed queue? One is already in flight at least.
HTTP message transport? Had it early in Jasper, could be done now w/ Wolverine.HTTP
The Node storage including application versioning
Generalized leadership election
Durable inbox/outbox needs to be able to span multiple databases (somewhat big)
Beta Was this translation helpful? Give feedback.
All reactions