fastcgi perl (reload)

#1
Hi,

I have lsws set for running my fastcgi perl script. But I am developing the script and testing at the web at the same time. But the changes I make at the script does not appear on the web page, since lsws/fastcgi does not have a new copy of the updated script.

When I used to develop using modperl, it had some kind of verification to check if the script changed, and if it did, it would reload automatically in memory.

Can this be done using lsws and fcgi?

Thanks!
 

mistwang

LiteSpeed Staff
#2
Running perl CGI inside mod_perl is completely different to running perl FCGI. What you want is possible, but as I know, no other web server can do that right now, including Apache, if you use FCGI.

We have a perl runner FCGI script, lsws/fcgi-bin/lsperld.fpl, which is similar to Apache's mod_perl, and it does the reload automatically. I personally prefer perl FCGI over the perl runner or mod_perl running plain CGI script for the sake of better performance though.
 
#3
By the way, will there ever be a LSAPI designed for Perl? And would it perform any better then the default FastCGI one?

Thanks!
 

mistwang

LiteSpeed Staff
#4
There might be. We are busy with other work, have no time for this yet. :)

It should be faster than the FastCGI one, I believe. If you are good at C coding, you can even make one yourself, should be pretty easy as LSAPI is similar to FCGI's interface. Just use the FCGI.pm as prototype.
 
#5
Thanks for the (very) fast reply!

As for the script reload, I created a new "CGI" context pointing to the same script. It will load each time, but for this very early development period, this will do.

Thanks once again.
 
Top