From what I read, CQRS projects include asynchronous commands, where commands are queued. The user assumes that everything is in order, and polls of the user interface or through the timer return some channels if everything works or not.
How does it work if I had a user interface where I drag and drop folders into a tree? I can have one user deleting a folder, and another - dragging a folder into it (to make it a subfolder).
So, from the user interface, I can show that the drag was done, and then use some timer to check whether my reading model is updated (i.e. check the parent folder of the folder being dragged and if it is installed correctly, I know it worked).
If the user performed several drag and drop operations, I would need to save the list of these operations in the user interface and check the read repository (removing any successful commands from the list).
There may be better ways to do this.
It seems that most of the work with the user interface is more error prone, whereas if I just run the synchronous command, and if everything is in order, then I proceed to the next operation.
source share