I'm trying to setup a WebApp using the CQRS/ES architectures. I have defined a model entity, with Create and Edit commands/events. Commands are handled by the related Saga. Events are saved to a mongo Event Store, which is the immediately consistent store. Events are handled by denormalizers that write to the eventually consistent SQL store.
Now I'm facing a problem with should-be-sync CRUD operations from the WebApp: the user opens a page with a list of these entities, read from the eventually consistent SQL store. Initially it's empty. Then, the user compiles a form to add a new entity. The client performs an ajax call to a method that issues a Create command to the bus, and then returns void.
On successful callback (and it is, because issuing the command no problem) the client refreshes the list of entities. If the denormalizer still hasn't handled the entity Created event, and written to the eventually consistent SQL store, the page will still present an empty list. What I want is a way to make the method that issues the Create command wait for the denormalizer.
I read a lot of blogs and stuff and I'm getting the idea that such synchronization goes against the idea of using a bus... but such user operations NEED to be synchronous: how can the user be presented with "insert successful!" and then still see an empty list??
I hope to get an answer since this use case seems basic to me...