commanded / recipes

Commanded recipes
12 stars 1 forks source link

[Recipe] Long-running streams #6

Open slashdotdash opened 4 years ago

slashdotdash commented 4 years ago

How to deal with streams which have thousands of events and/or are long running.

Use the approach taken by accountants where at the end of each financial year the current ledger is closed and the closing balances are taken as the starting balance into the next period. This can be used to limit the duration or length of event streams by closing the old stream and migrating to a new stream with any required state carried over as an initial event in the new stream.

ukazap commented 1 year ago

So the stream id should contain accounting period?