7 Comments

Hey Oskar - how would a process know what the latest version of a stream is, since the process would only know the id of the stream upon executing the use case. The post seems to kind of assume it knows "somehow"?

Thanks

Expand full comment
author
Sep 2·edited Sep 2Author

Anes, good call, I added information about that in this point https://www.architecture-weekly.com/i/148403275/finding-the-latest-chunk

Essentially you can use the list objects api with filtering and sorting. Having the predictable key strategy discussed in article, helps also in that.

Does that make it a bit more clearer? :)

Expand full comment

Yeah, missed that point. My thoughts also - shame that it is kind of the only way to make it work since it is the ugliest / most inefficient part of the whole approach ...

Expand full comment
author

You missed that point because I added it after your good question to follow up on it 😅

Definitely, it's not pretty. Still, I think that the more people come up with (not so?) crazy ideas I outlined in the article, the more we'll get support for such features. I hope that conditional writes are just a first step.

The other option is using s3 to select file contents, but that can cost more. I'd probably go with filtering and, when the stream is longer, keeping the metadata with the pointer updated once per time. Typically streams in event sourcing don't have a lot of events, so 1000 is a decent sanity check.

Expand full comment

Ah, I see lol - tnx

Yes I agree regarding the crazy ideas - good way to push features, actually I have a couple of my own with C# and Go (shameless plug):

- https://medium.com/@aneshas/c-event-sourcing-example-with-tactical-ddd-and-aperture-4ade39cbaac3

- https://github.com/aneshas/tactical-ddd

- https://github.com/aneshas/eventstore)

btw. I love the passion you have for Event Sourcing it is inspiring. I lost mine a bit somewhere along the way ever-since I moved out from a company (the only one) where I got the chance (took it myself) to execute a couple of Event Sourcing projects using .NET / SQL Server as an event store but Event Sourcing for me personally still remains one of if not the most natural way to develop software (in the right context of course).

Expand full comment
author

Thanks for sharing and for the kind words. It's not that I'm a psychofan of Event Sourcing, but I believe that it should have wider usage as it could help many companies and projects. It'll be always a niche, but I hope that broader than it is right now. :)

Expand full comment

Exactly

Expand full comment