Lisp HUG Maillist Archive

comm:start-up-server/serving web pages in parallel?

This is possibly a silly question.

I wrote a tiny web server. Now I ask myself, what the difference
to a professional server might be.

The server started by comm:start-up-server does not accept more
connections
until the passed function returns.

Is it still possible to serve requests in parallel?

This might be interesting if my web server asks another machine to do
some
processing which will take some time. During this time the web server 
machine just idles and might serve other requests.

Any hints or pointers are appreciated :)


Thanks

Andreas


Re: comm:start-up-server/serving web pages in parallel?

"Andreas Thiele" <andreas@atp-media.de> writes:

> This is possibly a silly question.
>
> I wrote a tiny web server. Now I ask myself, what the difference
> to a professional server might be.
>
> The server started by comm:start-up-server does not accept more
> connections
> until the passed function returns.
>
> Is it still possible to serve requests in parallel?

Yes. Let the function passed to start-up-server be a tiny function
that does nothing else than calling process-run-function with the
"real" function and the given fd as parameters.
-- 
  (espen)


AW: comm:start-up-server/serving web pages in parallel?


> -----Ursprüngliche Nachricht-----
> Von: owner-lisp-hug@lispworks.com 
> [mailto:owner-lisp-hug@lispworks.com] Im Auftrag von Espen Vestre
> Gesendet: Donnerstag, 18. August 2005 14:08
> An: Andreas Thiele
> Cc: lisp-hug@lispworks.com
> Betreff: Re: comm:start-up-server/serving web pages in parallel?
> 
> 
> "Andreas Thiele" <andreas@atp-media.de> writes:
> 
> > This is possibly a silly question.
> >
> > I wrote a tiny web server. Now I ask myself, what the 
> difference to a 
> > professional server might be.
> >
> > The server started by comm:start-up-server does not accept more 
> > connections until the passed function returns.
> >
> > Is it still possible to serve requests in parallel?
> 
> Yes. Let the function passed to start-up-server be a tiny 
> function that does nothing else than calling 
> process-run-function with the "real" function and the given 
> fd as parameters.
> -- 
>   (espen)
> 

Wow, striking hint. Thanks a lot.

Andreas



Re: comm:start-up-server/serving web pages in parallel?

On Aug 18, 2005, at 6:03 AM, Andreas Thiele wrote:

> The server started by comm:start-up-server does not accept more
> connections
> until the passed function returns.
>
> Is it still possible to serve requests in parallel?


Sure. And probably expected in the real world :). If you want to see  
some examples, download the source of Portable AllegroServe. It sets  
up multiple Lisp processes to handle requests in parallel.



John DeSoi, Ph.D.
http://pgedit.com/
Power Tools for PostgreSQL


Updated at: 2020-12-10 08:50 UTC