I got an app where the user has a way to sell things and add costs of his services.
You can manipulate one of the 5 fields of prices/costs.
From those elements - I display the estimated price/margin split for different people involved.
This is done on the frontend. In the end it is 8 fields I sum up in a different way, depending on people configuration.
The program doesn’t know when the user is done, as it is an autobinding operation.
But here is the problem. Those selected fields should be sum up for a user, creating a pool of his money from all his open sales. But if I updated all 8 fields everytime the user edits the 5 fields he can, I will race a lot of operations which can collide with each other leading to misscalculations.
How would you approach it, in order to provide the user good and dynamic overview of his deal pool?
I have an idea - to allow for changing the fields and display of results on the frontend and somehow schedule a workflow on a backend for current date + 5 minutes, that will update those 8 fields.
This way his deal pool will have just 5 minute delay maximum. But is it the best way, or there is another approach?
Acceptence Criteria:
User sees price calculations dynamically.
Deal pool is up to date dynamically (or can have at least few seconds delay).
There is no additional user action required - like clicking the button.