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

API For Adding Messages Without Loading Entire Stream #393

Open
warappa opened this issue Feb 16, 2015 · 4 comments
Open

API For Adding Messages Without Loading Entire Stream #393

warappa opened this issue Feb 16, 2015 · 4 comments

Comments

@warappa
Copy link

warappa commented Feb 16, 2015

I have a constantly growing stream to which I just append messages. I don't need the entire stream, but currently the only 3 options I have are the following:

  • use Store.OpenStream:
    Loads whole stream (with deserializing,...) and append the new messages. Not performant, not memory-friendly
  • use snapshots:
    Snapshots are planned(?) to be deprecated in the future.
    Also: why load a big snapshot if you just want to add 1-n messages?
  • Use Store.Advanced.GetFrom(streamName,0, Int32.MaxValue):
    Use Store.Advanced.GetFrom(...).LastOrDefault() to get the latest StreamRevision and CommitSequence and prepare a CommitAttempt.
    Still loads the whole stream.

Greg Youngs eventstore has the ability to just append a message: EventStoreTransaction.WriteAsync(...) - an API like this would be great!

@dillenmeister
Copy link

You're not the only one requesting this feature. I think snapshots are currently the best work around.

https://stackoverflow.com/questions/28264533/get-neventstore-head-revision

@danbarua
Copy link

I've bodged this with an empty snapshot object every 10 commits - yuck!

@damianh
Copy link
Contributor

damianh commented Feb 22, 2015

+1

@mikhailshilkov
Copy link

+1 for this feature. Opening a stream for append-only sounds like a natural idea. Any specific reason why it's not implemented?

@alkampfergit alkampfergit added this to the v6.1.0 milestone Jul 12, 2016
@AGiorgetti AGiorgetti removed this from the v6.1.0 milestone Jul 11, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

7 participants