4 ms·
I like the look of swoole, first i've heard of it. There is also a complete application server that supports php servlets, message queue, persistence etc. that
by dana321 7y ago
I like the look of swoole, first i've heard of it.
There is also a complete application server that supports php servlets, message queue, persistence etc. that is well-supported. Its free, open source.
https://appserver.io/ https://appserver.io/
A team that supports Magento, Typo etc. based in Germany wrote it.
You can use either the PHP-FPM or the more interesting is the servlets, because the data is kept in-memory - probably much in the same way as swoole functions.
Its basically enterprise Java for PHP.
- fraktl 7y agoI know about appserver.io and I would strongly advise against it (I have used it, along with every other project that tried to use pthreads or bypass PHP-FPM). It's not scalable. It also achieves "performance" by having the same process(es) work on the requests over and over again, effectively bypassing what PHP-FPM does on each request. If you set PHP-FPM up that a child process kills itself after 500 requests processed, you'll get the same performance as with appserver, but it'd scale horizontally. It's a toy and I would never use it in production, the authors made a huge mistake of trying to process requests in separate threads - my assumption is they just learned there's a way to expose threads to PHP userland so they toyed with it. Swoole is entirely different beast, it's like comparing a skateboard (appserver) to intergalactic starship (swoole). It's not just about the performance as it is about exposing OS primitives and having fine control over I/O and processes. Excellent find, but luckily - the current tools we've got at our disposal are even better. No offense to people using or working on appserver, some projects are just that - toys that help people learn more.
- dana321 7y agoYeah, looks like an extension to bring a lot of functionality go has into the php space.
- pbowyer 7y agoHave you any view on libev and the PECL ev library? There's been a recent discussion on the php-internals mailing list about whether PHP needs a built-in event based system (https://externals.io/message/108226 https://externals.io/message/108226) . Having input from you with production experience of Swoole would be _fantastic_.