Closed dropdevcoding closed 7 years ago
Hi, we just return a reactPHP promise to allow you to execute queries async and continue with other stuff while you are waiting for the response. How to deal with it is userland implementation ;) Maybe you can get some ideas from this post: http://stephencoakley.com/2015/06/11/integrating-guzzle-6-asynchronous-requests-with-reactphp
Let me know if it helps you!
Looks promising ;-)
Also I realized that you are using the approach I mentioned above as well in your PSR-7 middleware what already soothed me sufficiently.
Thank you very much!
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!