fusio
fusio copied to clipboard
Fusio on Swoole
I wonder... can we make Fusio can run on Swoole? Honestly, I have no experience with Swoole. Just reading and watching some presentation videos about Swoole. But wouldn't it be awesome though?
Hey, yes I have also invested some research time on swoole and also other solutions like roadrunner or amphp. And in fact it would be already possible to run Fusio on swoole. Therefor you would need to install the psx/engine-swoole
package and in your index.php
file you can then use the engine s.
require_once(__DIR__ . '/../vendor/autoload.php');
$container = require_once(__DIR__ . '/../container.php');
$engine = new \PSX\Engine\Swoole\Engine();
$environment = \PSX\Framework\Environment\Environment::fromContainer($container, $engine);
$environment->serve();
So this would be an option. I have also though about using this as the default in our container but I think currently the major problem with most async solutions is that they all provide an async version of a mysql/http client etc. which we do not use at Fusio. So you would probably gain some speed by using swoole but the code inside your action would be most likely also blocking since we use standard PHP libraries like guzzle or doctrine dbal.