Question about snapshot support
Los mantenedores suelen responder en 7 días
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 5/5
- Tiempo estimado
- Más de una semana
- Aptitud para principiantes
- 25/100
Línea de trabajo
Start by reading the existing snapshot related issues and the LoadState, LoadAggregate, and ReadStream entry points mentioned here. The proposal leaves key design decisions open, including how snapshots are selected and applied; first establish the project’s direction in the discussion before implementation. Done would mean an agreed snapshot design and an accepted implementation, but this issue does not define that scope yet.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
I need snapshot support because there are domain models with a large number of events and a long lifecycle. Initially, I tried to split the models into 'daily models'; this solved the long lifecycle problem but added complex and fragile day-closing/opening logic, which is not part of the business logic and rather exists as a technical workaround. Also, some instances of these models can still remain 'highly loaded' during the day, so the problem is only partially solved.
I would like to add support for 'Rolling snapshots', but before that, I want to discuss the implementation to make sure it aligns with your vision and that the PR will be accepted. I have seen several issues related to snapshots, and in some cases, changes were even suggested, but they were rejected. Also, these issues are quite old, and the perspective may have changed by now.
Here's how I see the implementation
It is assumed that rolling snapshots are stored as events in the stream along with the rest of the domain model events.
The first thing we need to do is somehow distinguish snapshot events from other events. Here, I suggest adding an attribute HasRollingSnapshots where you can pass a list of event types that are snapshots. This attribute should be applied to the State type.
Next, in the LoadState and LoadAggregate methods, we try to get the HasRollingSnapshots attribute and pass a list of types to the ReadStream method. If the list contains at least one type, ReadStream starts reading the event stream from the end until it finds an event whose type matches one of the types in the list. Also, ReadStream does not return events that come before the snapshot event.
The question remains as to how the model determines when to apply snapshots and when not to. But it seems to have everything it needs for this. In the case of aggregates, there is the Original field, which allows you to check the number of events or the time elapsed since the last snapshot, and in the case of a model without an aggregate, the list of events is also passed to the decider function (possibly this is precisely why they were added).
- Lenguaje dominante
- C#
- Estrellas
- 512
- Forks
- 99
- Merge medio
- 5 d 6 h
- PR fusionados (30 d)
- 5
Preparar el entorno
- Incluye un Dockerfile o un archivo de Docker Compose
- Sin plantilla de pull request
- Leer la guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de Eventuous/eventuous
-
MongoDB integration tests fail on newer GitHub Actions runner kernelsPosiblemente ocupada @nmummau la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 74/100
Eventuous/eventuous#626 · 2 comentarios ·
Los mantenedores suelen responder en 7 días
-
`dotnet format style --verify-no-changes` fails with naming violations and unnecessary importsPosiblemente ocupada @nmummau la tomó hace 1 día. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 80/100
Eventuous/eventuous#624 · 1 comentario ·
Los mantenedores suelen responder en 7 días
-
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Eventuous/eventuous#627 · 1 comentario ·
Los mantenedores suelen responder en 7 días
-
SQL Server: `append_events` does not need the `@inserted` table variablePosiblemente ocupada @nmummau la tomó hace 7 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 20/100
Eventuous/eventuous#619 · 1 comentario ·
Los mantenedores suelen responder en 7 días
-
SQL Server: stream reads do one key lookup per event, and `IDX_EventsStream` duplicates `UQ_StreamIdAndStreamPosition`Posiblemente ocupada @nmummau la tomó hace 7 días. Abierto
Dificultad 3/5 1-2 días Aptitud para principiantes 18/100
Eventuous/eventuous#618 · 1 comentario ·
Los mantenedores suelen responder en 7 días
Todos los issues de Eventuous/eventuous
Issues similares
-
[BUG]: Position intent set on a simple order is dropped when it becomes a bracket, OCO or OTO orderPosiblemente ocupada @RaphaelFakhri la tomó hoy. Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
alpacahq/alpaca-trade-api-csharp#903 ·
Los mantenedores suelen responder en 2 días
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 64/100
joinrpg/joinrpg-net#5752 ·
Los mantenedores suelen responder en 1 día
-
bug ux
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
CodeForFire/lagebuch#714 ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 82/100
dimitar-radenkov/Pointframe#294 ·
Los mantenedores suelen responder en 1 día
-
kind/feature-request
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Altinn/altinn-correspondence#2154 ·
Los mantenedores suelen responder en 1 día