jet / propulsion

.NET event stream projection and scheduling platform with CosmosDB, DynamoDB, EventStoreDB, MemoryStore, message-db, Equinox and Kafka integrations
https://github.com/jet/dotnet-templates
Apache License 2.0
178 stars 24 forks source link

feat!(Streams): Support propagating Unfolds; remove StreamResult #264

Closed bartelink closed 1 month ago

bartelink commented 2 months ago

Enhances the pipeline to support propagation of Unfold events through the pipeline:

As before, given a Propulsion.Sink.Event[], you compute:

Note that the following assumptions no longer hold if you have unfolds in an Event[]:


What is the use case? If you're running a ChangeFeedProcessor from an Equinox.CosmosStore, the changefeed includes:

Being able to route the Unfolds to the Handler alongside normal events enables:

bartelink commented 2 months ago

but this would be a new major version since the user facing API seems to be changing

You are not wrong of course... But I have some buts:

This handler signature was only introduced in the V3 timeframe, and I believe it to have been a misdesign - you want calculating the next version (or having it flow from what the sycing is going into) be foremost in people's minds

For a V4, I think Propulsion.Feed and Propulsion should be merged as lots of modules depend on Propulsion.Feed and it in turn depends on Propulsion

What if I promised to mint a V4 as soon as Equinox.CosmosStore 4.1.0 is final ? (and kill Propulsion.CosmosStore3 the minute that's done)

Other things on the list that I'd like to do at some point (which don't change the V4 API but simplify the whole deal):