durusmail: quixote-users: Non-reentrant functions in Quixote
new user, and session questions
2001-10-27
2001-10-29
2001-10-29
Non-reentrant functions in Quixote
2001-10-29
2001-10-29
2001-10-29
2001-10-29
Non-reentrant functions in Quixote
Greg Ward
2001-10-29
On 29 October 2001, Neil Schemenauer said:
> Some functions are non-reentrant.  That sucks even for applications that
> don't use threading.  On the weekend I was working on a simple FastCGI
> replacement.  Here's how it works:
>
>     * Application servers listen on a known address and port,
>
>     * On each request, Apache connects to application server and sends
>       the request in a simple format (i.e. an RFC822 like message).
>
>     * Apache reads the response and sends it to the client.

Why not just add an HTTP server to Quixote and be done with it?
(Something I've been thinking of doing.)

Actually, there's room for both solutions; Neil's would be good if your
site has some static content and some (Quixote) dynamic content, or even
if you just want to use Apache's snazzy rewrite engine.  A Quixote HTTP
server would be useful for small projects that don't want a lot of
external dependencies.

Now, if the Apache side of your "simple FastCGI replacement" simply
speaks HTTP to the web application server, then life is easy.  You just
tell Apache that requests for /q are handled by the server at port xxx
(which would be Quixote's HTTP server), and away you go.  To make
Quixote take over the whole site, just shut down Apache and make Quixote
handle port 80.  Neat.

> One valid way of writing the application server would be to use select()
> or poll() and make it event driven.

Everybody *says* that's the best way to write a high-performance server,
so it must be true!  ;-)

> That doesn't work with the current
> version Quixote.  We should think about fixing that.

Bogus.  Where is the non-reentrant code?

        Greg


reply