Comments (9)
Yes, that would be handy. I'll think about it for new version definitely.
from cosmostore.
No problem, the CosmoStore.Postgres
will be probably the next package 😄
from cosmostore.
Hi @LFerrao,
no problem at all :) From what I understand the difference between CorrelationId vs CausationId is that CorrelationId lets you to see all related events, where CausationId is the Id of the initial event (that caused new events created).
Since in this library everything is in developer's hands, it is up to you, how you use this field. You can use Id of triggering event as CorrelationId for chained events so initial event Id is the causation one, and chained events can be correlated by that.
I personally do it rather this way:
- I have new event to write into store
- Generate new Guid as CorrelationId
- Use this CorrelationId for any other events that happened as result of first one
- Now I have first event + any chained stored under same CorrelationId, so I can see whole conversation.
What do you think about it?
from cosmostore.
I agree that it doesn't seem like you're losing data by not storing it.
Regarding my oppinion I'm not sure I feel uncomfortable leaving it here as I literally just started learning about the topic (both ES and F#), but it's my understanding that an event should have 2 IDs in addition to its own (3 total) from what I read from Greg Young. The correlation ID is the original event ID (allowing to get an entire event tree with a single ID since all messages of the tree share the same correlation ID), and the causation ID is just the ID of the previous message.
Granted, with this definition it seems like you could get one with the other, albeit with some extra query gymnastics and I guess extra RSU cost as well.
from cosmostore.
I think you got point here - the correlationId is good for grouping related events, but the tree view is missing here. I will think about it for next release, however need to think about it more from two perspectives:
- it would be breaking change (or it would have to be optional)
- there is no function for getting events based on correlationId (yet)
from cosmostore.
from cosmostore.
FYI, I am about to release version 2 soon (tomorrow or day after tomorrow most likely) with having both CorrelationId & CausationId. Also from v2.0.0 each CosmoStore implementation will be in separate package where CosmoStore
is only API definition.
- https://www.nuget.org/packages/CosmoStore/2.0.0-beta1
- https://www.nuget.org/packages/CosmoStore.TableStorage/2.0.0-beta1
- https://www.nuget.org/packages/CosmoStore.CosmosDb/2.0.0-beta1
from cosmostore.
That's pretty awesome! Unfortunately for me, I had to stick with Postgres for the backing store along with some additional weird requirements like having to rely on FSharpLu's serialization, so I ended up writing my own poor man's store that's clearly never meant to be battle-ready, but I did use the opportunity (if it can be calle that) to familiarize myself with CQRS.
from cosmostore.
Aaaaaaaaaaaand it is published and docs updated. Thanks for hints! 🙏
from cosmostore.
Related Issues (20)
- Collection name cannot be specified? HOT 4
- ESERROR_POSITION_POSITIONNOTMATCH return last position? HOT 1
- Version 3 discussion HOT 42
- In memory example configuration HOT 8
- Confusion in types. Might need some extra functions. HOT 6
- Should we have read me for all stores ? HOT 3
- We should have github actions to push to do all the CI / CD. HOT 2
- Agreegate in CosmoStore HOT 2
- There is some Dependancy issues HOT 1
- Missing Version in CosmoStore 3.0? HOT 7
- Dapper implementation for CosmoStore
- MongoDB implementation for CosmoStore
- CouchDB/ Cloudant / Couchbase implementation for CosmoStore.
- Azure TableStorage from connectionstring
- CosmosDB ChangeFeed - Read Document as EventRead outside of CosmosDB EventStore
- Observing appended events on distributed systems HOT 7
- Azure Table Storage requires JToken payload HOT 1
- One or more errors occurred. (unordered field Item) - This is probably more a question. HOT 13
- Switching to Azure.Data.Tables HOT 2
- Easy Migration from AzureTable to Serverless CosmosDB Account HOT 1
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 cosmostore.