Comments (4)
Another option to consider is using a mechanism built-in to your storage provider. For instance, if you store your events in EventStoreDB then it can create the projections for you.
I didn't look closely at the sample you linked, but you have to be careful about persisting state and publishing events in separate actions. When you do that, there's a chance, however small, that something happens between when you save to the database and when you publish the event that causes the event to never get published.
Event sourcing can sidestep this issue by making the persistence of the state and the publishing of the event a single atomic action, but only when you use a supported event store.
from orleans.
@AlexandrIalticenco you're also welcome to look into Orleans.EventSourcing.EventStorage. It's a library I'm working on to add support for using an external event store with Orleans event sourcing.
The package I linked is for the base library that you could build your own storage on top of, but I've already got other packages made for common event stores like:
It's still a bit of a work in progress, but it does have nuget packages published if you want to start using it, or you can use it as inspiration for your own solution.
from orleans.
Actually I found the answer on my question here https://github.com/pmorelli92/Orleans.Tournament?tab=readme-ov-file#cqrs-projections-event-sourcing-and-eventual-consistency.
There is a really nice diagram describing the whole flow I need (copying from there if it can be useful for anyone).
from orleans.
@smfields thank you for your response. Yes, the sample I linked has exactly the problem you are talking about "You have to be careful about persisting state and publishing events in separate actions."
We are considering now to apply the solution you described by using custom log consistency storage provider.
from orleans.
Related Issues (20)
- Undesirable rpc.service with open telemetry in indirect interface scenario HOT 2
- AddSingletonNamedService not exist in orlans.code version 8 HOT 2
- Microsoft.Orleans.Hosting.Kubernetes NuGet package 8.0 references two vulnerable NuGet packages HOT 5
- Will Orleans allocate underlying connections to each IGrainObserver instance? HOT 1
- NullReferenceException at Orleans.Runtime.ReminderService.LocalReminderService.ReadTableAndStartTimers
- Custom placement strategy from doc does not work any more after upgrading to version 8 HOT 3
- Mark `error=true` tag if an exception is thown in Grains in the context of ActivityPropagation HOT 2
- Security vulnerability in .NET 8.0.0 HOT 3
- Custom Grain Storage - Issues After Upgrading to Orleans 8 HOT 9
- Cannot load from CertificateAuthority store when calling ISiloBuilder.UseTls( )
- Change CanConvert method of JsonConverter(s) in OrleansJsonSerializer HOT 1
- Atomic rollouts HOT 3
- Orleans 7.0 About Memory stream usage help HOT 1
- Provide GrainCancellationToken in RequestContext HOT 2
- Any plan to upgrade KubernetesClient to version 12x for Orleans v3 HOT 1
- `GrainDirectoryOptions` are ignored when using `IGrainDirectory` HOT 1
- Feature - Allow grain type name to be set at startup HOT 7
- BroadcastChannel and Transactions
- Explicit subscription messages are dropped at consumer when producer is implicitly subscribed to itself
- "Activation access violation" with grain timers in Orleans 8 HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from orleans.