Re: FastCGI C library with async I/O?

Basile STARYNKEVITCH <[email protected]>
Newsgroups gmane.comp.web.fastcgi.devel
Message-ID <[email protected]>
Le Thu, Apr 27, 2006 at 11:19:26AM -0700, Jens Alfke écrivait/wrote:
> I'm looking at serving HTTP from an existing C++ application, by  
> using FastCGI to receive requests from Apache.
> 
> Unfortunately the standard FastCGI SDK doesn't fit my requirements  
> because it uses blocking I/O, meaning that it can either process only  
> a single request at a time, or must spawn a new thread for every  
> simultaneous request. Neither of these options work for me --  
> parallel requests are a must, I can't spawn new instances of the app,  
> and multiple threads are problematic, primarily because the app code  
> isn't thread-safe. [....]

You might re-implement your FastCGI protocol

> 
> If I can't find a library that exists, I'm likely to switch to SCGI  
> instead simply because the protocol is so simple. Or alternatively,  
> if anyone knows of a C/C++ library that implements a small HTTP  
> server embedded in an app, I could use that with Apache's mod_proxy.

I actually did switch to SCGI because of exactly the same
reason. Maybe SCGI is a bit slower (because of the accept syscall for
each HTTP request) but I am even not sure of that.

Actually, I also tend to find the FastCGI client library also a bit
messy and underdocumented. It is a pity that the library contains
select or poll calls, it should provide a layer which leaves them to
the user. (like the Multi interface of CURL).


-- 
Basile STARYNKEVITCH         http://starynkevitch.net/Basile/ 
email: basile<at>starynkevitch<dot>net 
aliases: basile<at>tunes<dot>org = bstarynk<at>nerim<dot>net
8, rue de la Faïencerie, 92340 Bourg La Reine, France
___________________________________
fastcgi-developers mailing list
http://fastcgi.com/fastcgi-developers/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.