I’ve been using axon for a few weeks now and I have come across a problem I’m trying to solve( not necessarily axon-related only)
I have an aggregate(Agent) who does sales and I’m projecting that to a table that contains only their Id and balance. The balance is part of the agent aggregate.
Let’s say I have about 2000 concurrent transactions going on, trying to update the same table(using MySQL), and the updated balance is sent to the UI. From what I’ve read, MySQL does table level locking on updates (MyISAM engine) . Will the database support such volume of updates or are there any strategies you propose to prevent failures?
I thought of implementing pure Event Sourcing such that each time a sale is made, the UI is updated directly, and when a query is made the aggregate state is rebuilt from the snapshot table and event store. I basically want the UI to display each agent’s balance, and I believe I can get that from my event store directly. I know complex queries is an issue with Event Sourcing but how could I achieve this using Axon for such a scenario?