Return-Path: Delivered-To: apmail-perl-modperl-archive@www.apache.org Received: (qmail 13708 invoked from network); 3 Mar 2006 15:28:54 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (209.237.227.199) by minotaur.apache.org with SMTP; 3 Mar 2006 15:28:54 -0000 Received: (qmail 90557 invoked by uid 500); 3 Mar 2006 15:29:27 -0000 Delivered-To: apmail-perl-modperl-archive@perl.apache.org Received: (qmail 90361 invoked by uid 500); 3 Mar 2006 15:29:26 -0000 Mailing-List: contact modperl-help@perl.apache.org; run by ezmlm Precedence: bulk list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list modperl@perl.apache.org Received: (qmail 90318 invoked by uid 99); 3 Mar 2006 15:29:26 -0000 Received: from asf.osuosl.org (HELO asf.osuosl.org) (140.211.166.49) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Mar 2006 07:29:26 -0800 X-ASF-Spam-Status: No, hits=1.8 required=10.0 tests=HTML_MESSAGE,RCVD_IN_WHOIS_BOGONS X-Spam-Check-By: apache.org Received-SPF: pass (asf.osuosl.org: local policy) Received: from [63.109.157.69] (HELO mail.rccw.com) (63.109.157.69) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 03 Mar 2006 07:29:25 -0800 Received: from unknown (HELO rccs1.rccw.com) ([111.111.115.117]) by mail.rccw.com with ESMTP; 03 Mar 2006 09:29:02 -0600 X-BrightmailFiltered: true X-Brightmail-Tracker: AAAAAQAAA+k= X-IronPort-AV: i="4.02,163,1139205600"; d="scan'208,217"; a="28233421:sNHT40542688" Received: by rccs1.rccw.com with Internet Mail Service (5.5.2657.72) id <1WBTTWXC>; Fri, 3 Mar 2006 09:28:45 -0600 Message-ID: From: Chris Werner To: modperl@perl.apache.org Subject: Protocol Philosophy Date: Fri, 3 Mar 2006 09:29:01 -0600 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2657.72) Content-Type: multipart/alternative; boundary="----_=_NextPart_001_01C63ED7.32AA1B5C" X-Virus-Checked: Checked by ClamAV on apache.org X-Spam-Rating: minotaur.apache.org 1.6.2 0/1000/N This message is in MIME format. Since your mail reader does not understand this format, some or all of this message may not be legible. ------_=_NextPart_001_01C63ED7.32AA1B5C Content-Type: text/plain; charset="iso-8859-1" Mod_perl list, Apache 2.2.0 mod_perl 2.0.2 I have been working with an alternative protocol implementation for apache for some time now and [as would be expected with a perl based tool] I have found many ways to accomplish the same task. I am asking about the philosophy or design intent of these filters. I have read the provided docs, copied, executed and modified the examples. My best understanding of the intent is that the PerlProcessConnectionHandler sets up the connection, and issues a request to the PerlInputFilterHandlers for data. The PerlInputFilterHandlers gets the raw data in a bucket brigade(s) and have first crack at massaging the data. Here we handle data overrun, underrun, and reorder bucket (and brigade) contents to have reliable contents. The PerlInputFilterHandlers do not send this data downstream per se, instead they respond to requests for incoming data from downstream and answer these requests by manipulating the bucket brigades supplied by the PerlProcessConnectionHandler. The PerlProcessConnectionHandler does the work of implementing the protocol; here state machine actions and database accesses are performed. The PerlOutputFilterHandler fills out bound bucket brigades with outbound server side protocol messages. That is my best understanding of how a protocol implementation should be constructed... As the provided examples show, work can be done, for example, in the FilterHandlers. What was the original intent? Is there ever a case where it would make sense to perform database queries/updates or hold state machine logic external to the data stream in a FilterHandler? Making things work is not a problem. I can always make things work. What is the prevailing wisdom as to how things should work? Thanks in advance, and kudos for a well built tool, Christian Werner ------_=_NextPart_001_01C63ED7.32AA1B5C Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Protocol Philosophy

Mod_perl list,   Apache = 2.2.0 mod_perl 2.0.2

I have been working with an = alternative protocol implementation for apache for some time now and = [as would be expected with a perl based tool] I have found many ways to = accomplish the same task. I am asking about the philosophy or design = intent of these filters.  I have read the provided docs, copied, = executed and modified the examples.

My best understanding of the intent is = that the PerlProcessConnectionHandler sets up the connection, and = issues a request to the PerlInputFilterHandlers for data. The = PerlInputFilterHandlers gets the raw data in a bucket brigade(s) and = have first crack at massaging the data. Here we handle data overrun, = underrun, and reorder bucket (and brigade) contents to have reliable = contents. The PerlInputFilterHandlers do not send this data downstream = per se, instead they respond to requests for incoming data from = downstream and answer these requests by manipulating the bucket = brigades supplied by the PerlProcessConnectionHandler. The = PerlProcessConnectionHandler does the work of implementing the = protocol; here state machine actions and database accesses are = performed. The PerlOutputFilterHandler fills out bound bucket brigades = with outbound server side protocol messages.

That is my best understanding of how a = protocol implementation should be constructed...

As the provided examples show, work = can be done, for example, in the FilterHandlers.  What was the = original intent? Is there ever a case where it would make sense to = perform database queries/updates or hold state machine logic external = to the data stream in a FilterHandler?

Making things work is not a problem. I = can always make things work. What is the prevailing wisdom as to how = things should work?

Thanks in advance, and kudos for a = well built tool,
Christian Werner

------_=_NextPart_001_01C63ED7.32AA1B5C--