|
Boost : |
Subject: Re: [boost] CGI / FastCGI library update
From: Artyom (artyomtnk_at_[hidden])
Date: 2010-05-20 15:54:50
> >
> > I agree that there is no reason to do this for FastCGI
> and CGI
> > (even official libfcgi supports it) but if you once
> > implement SCGI you will want to be able to switch
> between FCGI/SCGI
> > without recompilation.
> >
>
> I don't think there's any foolproof way of doing this
> interrogation
> automatically?
>
> If it's a manual, runtime configuration option anyway, then
> the library user
> would be able to use the sort of selecting I mentioned in
> my previous post.
I'd rather prefer to write in the beggining
boost::cgi::acceptor ac;
if(scgi)
ac.open(scgi,tcp::ip);
else
ac.open(fcgi,unix)
boost::cgi::request r
ac.accept(r);
Rather checking if it is scgi of fcgi at every point.
As I can see from your code you ave each class type of each protocol.
And it is bad (IMHO)
> The goal of supporting multiplexing is less about pure
> speed than about
> resources. Having 1 connection per request means you can
> only support N
> simultaneous requests, where N is not really that huge of a
> number on most
> machines.
>
epoll/kqueue/devpoll allows you support them efficiently
and N as bis as number of file descriptors in process.
10,000 is low? I don't think so (see 10K problem)
Best,
Artyom
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk