Closed watfordsuzy closed 9 months ago
@watfordsuzy, let me quote my response on your PR:
@watfordsuzy, thank you a lot for the PR and for the issue. Indeed, the lack of optimistic concurrency is a big thing. I didn't add that initially without the intention to hide that part or ignore it. The first release was focused on the business logic; now it's time to do the application layer correctly.
I'm planning to do it more or less like in the solution in my self-paced kit: https://github.com/oskardudycz/EventSourcing.NodeJS/blob/2d417bd2e650c16b4af68b6a752bd684ce0a8fc0/workshops/introduction_to_event_sourcing/src/solved/07_optimistic_concurrency_eventstoredb/tools/eventStore.ts#L99
I'm going to pull your changes in and restructure them a bit. Thank you a lot for the contribution and double-checking if I didn't miss it!
I'm going to work on that today and tag you also in the PR that will fully introduce that 🙂
@watfordsuzy see the changes made in:
Feedback is welcome 🙂
Thank you, pulling it down now!
I'm looking through the API Docs while playing with Emmett and am wondering about the elision of
expectedVersion
on theEventStore
interface: https://github.com/event-driven-io/emmett/blob/9650af6625f2b2065dcad1db2c96aa6495c6afa2/packages/emmett/src/eventStore/eventStore.ts#L3-L20It is my assumption this interface would instead look something like:
Is this a conscious design choice to represent a simpler model of event sourcing?