[phpBB Debug] PHP Warning: in file [ROOT]/includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4762: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4764: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4765: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
[phpBB Debug] PHP Warning: in file [ROOT]/includes/functions.php on line 4766: Cannot modify header information - headers already sent by (output started at [ROOT]/includes/functions.php:3897)
newlispfanclub.alh.net • View topic - Multi-threaded newLISP webserver with net-eval

Multi-threaded newLISP webserver with net-eval

Featuring the Dragonfly web framework

Multi-threaded newLISP webserver with net-eval

Postby hilti » Thu Sep 01, 2011 4:02 pm

Hi Guys!

Is it possible to setup a multi-threaded webserver with net-eval? I've studied the "mapreduce example" where a worker node splits up a task to several worker nodes by using net-eval.

But I can't figure out the starting point in splitting up http requests.

Your help is needed, please.

All the best
Hilti
--()o Dragonfly web framework for newLISP
http://dragonfly.apptruck.de
hilti
 
Posts: 140
Joined: Sun Apr 19, 2009 10:09 pm
Location: Hannover, Germany

Re: Multi-threaded newLISP webserver with net-eval

Postby Lutz » Thu Sep 01, 2011 11:28 pm

You could start the first server using 'command-event'. The parameter passed in the 'command-event' function is the HTTP request.

Perhaps the easiest would be to run newLISP under the inetd utility on a UNIX box:

http://www.newlisp.org/downloads/newlis ... etd_daemon

this way a request automatically starts a newLISP demon process if required. newLISP's low memory requirements and quick start-up make this an efficient method.

You could also use something like Squid or a similar proxy server to route requests to different newLISP server processes already running.
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California

Re: Multi-threaded newLISP webserver with net-eval

Postby hilti » Fri Sep 02, 2011 5:42 am

--()o Dragonfly web framework for newLISP
http://dragonfly.apptruck.de
hilti
 
Posts: 140
Joined: Sun Apr 19, 2009 10:09 pm
Location: Hannover, Germany

Re: Multi-threaded newLISP webserver with net-eval

Postby Lutz » Fri Sep 02, 2011 3:13 pm

It's interesting to see, that newLISP server on its own or running it via inetd, is not much of a difference. But that is because of the small CGI test-page. If you would have a page with a longer processing time (e.g. 2 secs each) then the inetd approach would show a much bigger advantage, because you would be able to run several newLISP servers at the same time, and accepting connections.

The local Apache server on OSX with PHP mod_php will always be much faster than newLISP server with CGI, newLISP when doing CGI, loads an extra newLISP process for each CGI request. But a newlisp_mod for Apache should be easy to built.

In the end it will be difficult for newLISP HTTP server to outperform any other HTTP web server specifically written for this purpose, i.e. Apache. newLISP HTTP mode was added on as a quick and handy web server set-up for testing, low volume and for use in embedded systems.
Lutz
 
Posts: 5279
Joined: Thu Sep 26, 2002 4:45 pm
Location: Pasadena, California


Return to So, what can you actually DO with newLISP?

Who is online

Users browsing this forum: No registered users and 0 guests

cron