Make Core work with ReactPHP
Closed this issue · 5 comments
It should be relatively easy to implement a connector that would use ReactPHP's Http Client.
Need to investigate this further (especially implementing promises and exposing them to higher level).
👍 To this one. I have been investigating react recently and it looks very interesting. Maybe guzzle 5 which is async would be a good choice.
Yes, ReactPHP is definitely still on the plate and I read a bit about Guzzle 5, yesterday, after restructuring Core's code a bit (in devel). Though, I still have not reached a decision on the extent and implementations of compartmentalization (and therefore, extendability and customizability) of the Core. I will have to do some testing with Guzzle & ReactPHP in order to include the correct handling of that type of flow in the Core.
Well, after trying to learn Guzzle & ReactPHP to make them work with Core, I painfully found out that ReactPHP socket-client has a problem working with 127.0.0.1 or any other address inside a docker container and generically docker environment. Curl works ok inside the docker environment, and Guzzle (using ReactPHP) also works outside the container in the docker host's (Boot2Docker) host (Windows 7) OS.
So, I'll first try to find out what's wrong and file an issue with whomever I have to (docker, ReactPHP?)...
So, after finding a solution to the "ReactPHP and linked Docker container" problem (see my blog post), I got the Guzzle Provider on the road pretty quick. The Result is this still experimental but working project: https://github.com/frankmayer/ArangoDB-PHP-Core-Guzzle.
There's still some work to do on the structure, tests & docs, so it's not stable yet. Will let you know.
💃