You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hello,
since I'm implementing an application using ES/CQRS (completely using Prooph components), I'm wondering how to deal with the following situation:
I'm sending a GET request to the server (NOT react PHP) and I want to return a result from my read model using the QueryBus
The QueryBus works asynchronously which is perfect since the read model could be stored anywhere
My Finder returns the promise
Now, since I'm on a blocking server using a regular webframework my action wants me to return a value directly (synchronously)
This approach works since the query happens within the request on the same server accessing the DB and blocks but it won't work anymore when moving my read model to any other async service because the action would return without waiting for the promise to be finished (of course).
In addition my current solution above feels really clumsy imho. I'm I missing something / getting something wrong?
Guzzle Promises support $promise->wait() which would be a solution for this case I think.
Thank you in advance!
The text was updated successfully, but these errors were encountered:
Hello,
since I'm implementing an application using ES/CQRS (completely using Prooph components), I'm wondering how to deal with the following situation:
So, how to deal with it?
This approach works since the query happens within the request on the same server accessing the DB and blocks but it won't work anymore when moving my read model to any other async service because the action would return without waiting for the promise to be finished (of course).
In addition my current solution above feels really clumsy imho. I'm I missing something / getting something wrong?
Guzzle Promises support $promise->wait() which would be a solution for this case I think.
Thank you in advance!
The text was updated successfully, but these errors were encountered: