Return-Path: Delivered-To: apmail-httpd-modules-dev-archive@minotaur.apache.org Received: (qmail 27612 invoked from network); 15 Sep 2010 20:52:46 -0000 Received: from unknown (HELO mail.apache.org) (140.211.11.3) by 140.211.11.9 with SMTP; 15 Sep 2010 20:52:46 -0000 Received: (qmail 64362 invoked by uid 500); 15 Sep 2010 20:52:45 -0000 Delivered-To: apmail-httpd-modules-dev-archive@httpd.apache.org Received: (qmail 64318 invoked by uid 500); 15 Sep 2010 20:52:45 -0000 Mailing-List: contact modules-dev-help@httpd.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: modules-dev@httpd.apache.org Delivered-To: mailing list modules-dev@httpd.apache.org Received: (qmail 64310 invoked by uid 99); 15 Sep 2010 20:52:45 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Sep 2010 20:52:44 +0000 X-ASF-Spam-Status: No, hits=0.7 required=10.0 tests=FSL_HELO_NON_FQDN_1,HELO_NO_DOMAIN,SPF_NEUTRAL X-Spam-Check-By: apache.org Received-SPF: neutral (athena.apache.org: local policy) Received: from [80.229.52.226] (HELO baldur) (80.229.52.226) by apache.org (qpsmtpd/0.29) with ESMTP; Wed, 15 Sep 2010 20:52:38 +0000 Received: from baldur (localhost [127.0.0.1]) by baldur (Postfix) with ESMTP id C0F41C135C45 for ; Wed, 15 Sep 2010 21:52:15 +0100 (BST) Date: Wed, 15 Sep 2010 21:52:13 +0100 From: Nick Kew To: modules-dev@httpd.apache.org Subject: Re: modules architecture issue Message-ID: <20100915215213.59fff917@baldur> In-Reply-To: References: X-Mailer: Claws Mail 3.7.2 (GTK+ 2.18.3; i486-pc-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit On Wed, 15 Sep 2010 14:57:25 -0300 Fabio Kaminski wrote: I'm not certain I understand the question, but here goes ... > and at least for data, i thought use something like [input filter -> > handler -> output filter] > > where the input filter receives a formated string and parse into a internal > object struct.. the handler get it > and using a rest mechanism (put,delete,get,post) in the handler.. An input filter doesn't strictly speaking asynchronously with your handler, but conceptually you should think of it as asynchronous. If that fits your application well, go right ahead. Otherwise it's probably going to be easier to do all that within your handler. The exception to that is if you have functionality that becomes re-usable across multiple applications if you put it in a filter. > the handler then call a db api, for the data operation.. and if is something > like get.. the output filter decode our internal object struct into > the formated string.. That sounds like it should be just fine running asynchronously. But using a filter may still call for more groundwork. Ideally you should create a new bucket type for your internal objects to pass them down the chain. > i saw the smart filter, but couldnt fire it.. since i didnt see a example > module using it.. Smart filtering is a matter for configuration. If your application requires the filters, it should probably manage its own configuration. If the filters are optional then by all means leave it to the sysop and recommend using mod_filter in your documentation. -- Nick Kew