These are chat archives for reactphp/react

14th
Mar 2017
JD Williams
@jdwil
Mar 14 2017 23:30
has anyone here set up the symfony kernel to run via a react loop? There are many posts about it that are purely concerned with speed, but I want to know how it works functionally. I was imagining a use case like this... the kernel is handed a request and I could set up an early event listener to inspect the request and determine if I'm going to need information from a 3rd party api. If so I kick off the request(s) asynchronously and let the kernel keep chugging along. Then at the point where I need the data, check to see if the requests are complete and block until they are. If I run the kernel from within a react loop, and inject that loop into the symfony container, and use that same loop for the http requests, would that do it? Anyone done something like that? Is it worth it or am I trying to use async in a place it doesn't belong? Seems like it would be very efficient.