The most powerful news usually comes surprisingly silent. AWS released a humble news: S3 now supports conditional writes. In the article I'll show you why is it groundbreaking and how powerful this is. We'll discuss building a strongly consistent event store on S3 using conditional writes for optimistic concurrency!
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"?
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 ...
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.
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).
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. :)
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
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? :)
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 ...
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.
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).
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. :)
Exactly