Return-Path: Delivered-To: apmail-directory-dev-archive@www.apache.org Received: (qmail 74978 invoked from network); 21 Jun 2007 13:56:06 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 21 Jun 2007 13:56:06 -0000 Received: (qmail 61652 invoked by uid 500); 21 Jun 2007 13:56:08 -0000 Delivered-To: apmail-directory-dev-archive@directory.apache.org Received: (qmail 61601 invoked by uid 500); 21 Jun 2007 13:56:08 -0000 Mailing-List: contact dev-help@directory.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Apache Directory Developers List" Delivered-To: mailing list dev@directory.apache.org Received: (qmail 61590 invoked by uid 99); 21 Jun 2007 13:56:08 -0000 Received: from herse.apache.org (HELO herse.apache.org) (140.211.11.133) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jun 2007 06:56:08 -0700 X-ASF-Spam-Status: No, hits=-0.0 required=10.0 tests=SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (herse.apache.org: domain of elecharny@gmail.com designates 66.249.92.169 as permitted sender) Received: from [66.249.92.169] (HELO ug-out-1314.google.com) (66.249.92.169) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 21 Jun 2007 06:56:04 -0700 Received: by ug-out-1314.google.com with SMTP id u2so647095uge for ; Thu, 21 Jun 2007 06:55:40 -0700 (PDT) DKIM-Signature: a=rsa-sha1; c=relaxed/relaxed; d=gmail.com; s=beta; h=domainkey-signature:received:received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=e2zezQzpAj6BvMF0WltPrkb2RkrLNgxNcvc/bhR6w8KmmqXxgqSRwDPpHUYQa0mY0LV+f62LbYGhR1Og1lNf5bkn4jzADimreRPWPlCcsUiWvd9QOGRQWRPmqi5wS8VcTuW3q8pw+60et5xK73MGxZjIeoGFgFaio2TOInwETpQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=beta; h=received:message-id:date:from:reply-to:to:subject:mime-version:content-type:content-transfer-encoding:content-disposition; b=MRScL9aA/wV7IVZE3p7AaDz/Dp9ja2QUfF1m8/o5Rf0zq1ezmKv3cxwq6XQCgnN5BCd5puHgt8ksx76kxpPD3HsBFeKfgHJwVXlA8EoJOLzAb2arzlIM6jJctXi8NX2QA848kq6fzfW9l/JwJ6w0MHYxl2GaLsOC0rb5aOZdEac= Received: by 10.78.159.7 with SMTP id h7mr964333hue.1182434139942; Thu, 21 Jun 2007 06:55:39 -0700 (PDT) Received: by 10.78.42.11 with HTTP; Thu, 21 Jun 2007 06:55:39 -0700 (PDT) Message-ID: Date: Thu, 21 Jun 2007 15:55:39 +0200 From: "Emmanuel Lecharny" Reply-To: elecharny@iktek.com To: "Apache Directory Developers List" Subject: Moving from IoHandlerChain to something easier to debug MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: quoted-printable Content-Disposition: inline X-Virus-Checked: Checked by ClamAV on apache.org Hi, in the different protocols we have in ADS, we are using a IoHandlerChain inherited class to handle the received messages. Although I think that this pattern is sometime usefull if you want to use an evolving message handling (like adding dynamically some processing), in this very case, we have just fixed handlers. There are three main concerns whith this pattern usage : 1) it's really painfull to debug, as you have to set BP in every handler when you step through the code 2) it slow down the processing for heavily loaded servers 3) it forces the implementor to inject data through a session attribute, which is not exactly the best solution, but you do'nt have any other I would suggest to switch from this pattern to a simpler one, where we keep the handler decomposition (I like the idea of decomposing treatments in small disconnected methods, compared to a big fat method), but using as many methods as we have handlers. Doing so will remove the 2 first points, without modifying the logic of the current code, while the 3rd point will substitute a parameter passing to a session storage. The last gain is that we won't have anymore 150 lines in stackTraces ... wdyt ? --=20 Regards, Cordialement, Emmanuel L=E9charny www.iktek.com