Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate using System.Text.Json for storage persistence #831

Open
benaadams opened this issue Jan 31, 2021 · 1 comment
Open

Investigate using System.Text.Json for storage persistence #831

benaadams opened this issue Jan 31, 2021 · 1 comment

Comments

@benaadams
Copy link
Contributor

It allows for direct async saving to Stream; have added PR to FoundatioFx/Foundatio#259 to support the async mode

Would hopefully reduce the steps in serializing in memory, re-reading and then writing out again
image

@ejsmith
Copy link
Member

ejsmith commented Jan 31, 2021

I think it would be hard for us to have the events pipeline be completely stream based, but I wonder if we could have the reader be stream based and then have the pipeline iterate through one event at a time using an IAsyncEnumerable<PersistentEvent> where we just load a single event into memory at a time and process it and then release that memory back into a pool to load the next one.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants