Hacktoberfest 2026: le issue che i maintainer hanno segnato per ottobre, aperte e adatte ai principianti. Sfoglia le issue Hacktoberfest

Control events persistence from the domain model

Aperta
#82 5 commenti 1 reazione 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 7 giorni

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
5/5
Tempo stimato
Più di una settimana
Idoneità per principianti
25/100
Tipo di issue
Funzionalità
Chiarezza
Abbastanza chiara
Stato di attività
Ferma
Stack tecnologico
csharp
Ambito
backend, databases

Direzione di ricerca

Read the aggregate store and event store paths, then trace how Apply produces Changes and how StreamEvent is persisted. The issue outlines two implementation options: carry archive or truncation information through Changes, or add event class attributes handled by the aggregate store. Done means the domain model can signal persistence to archive or truncate prior events; the issue names no tests, so identify the relevant coverage while tracing these paths.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

enhancement

Right now, the event store is agnostic to what events are being persisted. It is quite a limitation for doing things like #64, domain-driven snapshots, closing periods, etc, as some "fold and archive" or "fold and snapshot" actions need to be controlled by the domain model.

For example, a reservation might get archived after the guest checks out, as the lifecycle of the reservation is done, and it becomes fully immutable (or frozen). Similarly, closing a period would collect the period data in a "new period started" event, and then signal the persistence to truncate all the previous events.

So, the idea is to provide a way for the domain model to tell those things to the aggregate store and further to the event store.

I have two ideas atm:

  • Apply can get an overload or optional parameter to signal the archiving or truncation
  • A set of attributes for event classes to do the same

Both can be implemented at the same time, but the implementation would be in different layers.

  • For Apply the change would be to extend the Changes to contain extra information
  • For attributes, all the work will be done by the aggregate store. The StreamEvent record would need to get new properties.
Lingua principale
C#
Stelle
512
Fork
99
Merge medio
5g 6h
PR unite (30g)
5

Preparare l'ambiente

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di Eventuous/eventuous

Tutte le issue di Eventuous/eventuous

Issue simili

Altre issue su C#

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.