On Thu, May 22, 2003 at 03:19:24PM -0500, Luke A. Kanies wrote: > On Thu, 22 May 2003, Sam Vilain wrote: > > > On Thu, 22 May 2003 17:15, Rocco Caputo wrote: > > > If I understand, IKC::ClientLite is a small client library specifically > > > for programs that don't need an event stream. For example, a small CGI > > > program that passes requests to an application server and receives > > > responses back. > > > > > > Apache <-via CGI-> IKC::ClientLite program <-via IKC-> POE app server [...] > > http://www.fastcgi.com/devkit/doc/fcgi-spec.html [...] > [...] > > The biggest problem I see with having an explicit 2nd tier in most > people's web applications, though, especially if we use POE as the second > tier, is that the developer suddenly has to take care of having enough > processes to handle the load, which apache (mostly) does for us if we > leave the 2nd tier as mod_perl. Yeah, there are lots of app servers we > could pick, but, well, I want to use POE. > > So who wants to write the first POE web application server? Or am I > convinced about this?
Philip Gwin does, and did. See http://pied.nu/Perl/JAAS/ > > FastCGI is currently available for: Apache 1&2, IIS, Zeus, SunONE (Netscape > > iPlanet), and some others. Zeus+FastCGI is blinding fast compared to > > Apache+mod_perl. Look at all of the other enterprise web servers, how do > > they communicate with their back-ends? An asynchronous, binary protocol > > (ISAPI, NSAPI, ZDAC...) > > Okay, I see what this is, after looking through the site a bit, and > installing the FCGI module. Nice standard, if seemingly baroque. Is it possible to write a POE::Filter::FastCGI? If so, you could probably use it just about everywhere POE::Filter::Line fits. That would let you write clients and servers fairly trivially. > > The current FCGI.pm Perl module is just begging to be ported to the POE > > event architecture IMHO. Everything about FastCGI screams `asynchronous > > event loop'. Right now, receiving an event via FCGI.pm is a blocking XS > > library call. > > Hmm, seems like it's just begging to be ported to perl, frankly. It's > mostly C, it looks like: > [...] > > This is just a quick glance, so I'm sure I'm missing a lot, but my guess > is that if you wanted to use the POE event model, you'd have to port FCGI > entirely to perl, and that looks like a lot of porting, in terms of > percentage of code. Or write a different FCGI.xs that exports the protocol functions without the application stuff. That's just a guess, though. > Speaking of which, are there ways to communicate between POE and C, or are > there equivalent event models in C? I've been planning on writing a > specific app for a while, and I'm planning on putting it in C at this > point, but I'm more and more wanting it to work with POE, so I'm wondering > if I'll have to use perl instead. It depends on what you want your C to do. If POE is to drive it, sure. Expose a callback-driven interface through XS, and you're good to go. -- Rocco Caputo - [EMAIL PROTECTED] - http://poe.perl.org/
