Hi,
I’ve recently discovered that George W.'s LiteSpeed PHP SAPI is
actually quite good and probably one of the best php sapis out there. Of
course, im not talking about the LiteSpeed web server, which is a
completely different matter entirely.
The litespeed interface to php has a simplified protocol, and is
supposed to be, well, a lot faster. It may be even faster than PHP-FPM
sapi (and should do a performance comparison to confirm this). You might
believe that its a bad idea to support this kind of a proprietory thing.
However after reviewing the licenses, there seems no problem. Its all
freely available under BSD license, and is included with php5.3+.
Check it out at:
The tricky bit is we have yet to write an nginx module to understand /
forward requests over the lsapi protocol.
It would make a great little project if anyone is interested.
The tricky bit is we have yet to write an nginx module to understand /
forward requests over the lsapi protocol.
It would make a great little project if anyone is interested.
You are right it looks very interesting.
I have never developed a nginx module, looks a interesting start
download the php 5.3.X sources and build --with-litespeed → build
ls-php binary
Study any available litespeed lsapi protocol documentation
Study the nginx fast-cgi module, how it forwards the requests
Study the ‘how to write and nginx module’ guide for writing an nginx
module
Modify the existing nginx fast-cgi module (and replace the
fcgi-specific parts with lsapi interface)
It may help to study these lsapi requests and responses directly by
attaching to the TCP port.
i.e. Tracing the conversations between webserver and the ls-php program
(ethereal)
You may also try to debug / step the code in php-src/sapi/litespeed.
This is OSS code available under BSD license.
The tricky bit is we have yet to write an nginx module to understand / forward requests over the lsapi protocol.
It would make a great little project if anyone is interested.
I’ve not looked at the code to check, but it may well work for Ruby too
(and I believe they’re planning on offering other languages e.g. Python
at some stage).
I’ve not looked at the code to check, but it may
well work for Ruby too
(and I believe they’re planning on offering other
languages e.g. Python
at some stage).
Marcus.
Yeah sure - the protocol should to support ruby, and python too.
Its just probably a little bit easier to develop it with php.
Posted at Nginx Forum:
This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.