Hot to make the aggregate thread-safe (suggestions)?
weare8 opened this issue · 0 comments
weare8 commented
As far as I understand the aggregates are not thread-safe.
I am looking to see how we could implement a thread-safe aggregate without introducing some distributed locking using DynamoDB or Redis.
An example scenario is if you have an ASP.NET REST API and consider the following endpoints for the same user aggregate invoked in parallel from a front end client it can result in weird results in event data (skipped version, dynamodb streams INSERT and MODIFY events writing the same aggregate ID and Version for different events).
- /create
- /set-email
- /set-preferences
- /set-profile-picture
Any ideas?