Return-Path: X-Original-To: apmail-qpid-users-archive@www.apache.org Delivered-To: apmail-qpid-users-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id D4E2AFDEF for ; Mon, 25 Mar 2013 14:35:06 +0000 (UTC) Received: (qmail 97125 invoked by uid 500); 25 Mar 2013 14:35:06 -0000 Delivered-To: apmail-qpid-users-archive@qpid.apache.org Received: (qmail 97096 invoked by uid 500); 25 Mar 2013 14:35:06 -0000 Mailing-List: contact users-help@qpid.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: users@qpid.apache.org Delivered-To: mailing list users@qpid.apache.org Received: (qmail 97084 invoked by uid 99); 25 Mar 2013 14:35:06 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 14:35:06 +0000 X-ASF-Spam-Status: No, hits=-0.5 required=5.0 tests=FREEMAIL_ENVFROM_END_DIGIT,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (athena.apache.org: domain of rajith77@gmail.com designates 209.85.214.182 as permitted sender) Received: from [209.85.214.182] (HELO mail-ob0-f182.google.com) (209.85.214.182) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 25 Mar 2013 14:35:01 +0000 Received: by mail-ob0-f182.google.com with SMTP id ef5so3413136obb.27 for ; Mon, 25 Mar 2013 07:34:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:x-received:in-reply-to:references:date:message-id :subject:from:to:content-type; bh=oM8wA4C9LxNEGfi/LPqZyz7m4tqm+MQ0tJrnxYWGKJ0=; b=oWEnjg/wHeLrVd214kks6YBX2S47ta1Ombz4AfcjqwnWB/PN0tSeci5S++vzxvel0b eZAr68BzLHvbk28UmrcYwfV26YOZRnf/K24z/xNSOswx8GnZTkYmg/Blmz4jpJpRIms5 EE2pXGNEepBQ5sx8CEjyqk5LRlRzhWtt/DlxY7YgIXfm8c+buBq6WEJGGfoVvqgMLaSj JwNc3OraVXTb2qkRW3zTqSeFUqK+MWinChq3dPKpVhYhv+wa+LDcLKHrOFqT6n2cSDvC Tsgw8uh0A6yAkOHm7HO8G1P+fSd9Q5x9VWYQcGcdC/Ib3m0+85LfygN/RPelf7izWNV2 hB+g== MIME-Version: 1.0 X-Received: by 10.60.118.104 with SMTP id kl8mr1753510oeb.68.1364222080690; Mon, 25 Mar 2013 07:34:40 -0700 (PDT) Received: by 10.76.90.70 with HTTP; Mon, 25 Mar 2013 07:34:40 -0700 (PDT) In-Reply-To: References: <515044DD.5050809@redhat.com> Date: Mon, 25 Mar 2013 10:34:40 -0400 Message-ID: Subject: Re: RFC: new routing functionality for messenger From: Rajith Attapattu To: proton@qpid.apache.org, users@qpid.apache.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Checked: Checked by ClamAV on apache.org For starters I would copy this email to the user list. (In the future we should post things like this to a more wider audience, especially if we are looking for feedback based on real world use cases.) I actually like the minimalistic approach you've taken here. It works well in an embedded context. Support for regex will be a welcome addition. I don't think we should bother with a config file for proton. To me it's neither here nor there. Let the application developer or the deployment folks who use the proton based application worry about it. As both you and Ted pointed out, a more sophisticated routing capability is best achieved outside the scope of Proton. Regards, Rajith On Mon, Mar 25, 2013 at 9:30 AM, Rafael Schloming wrote: > On Mon, Mar 25, 2013 at 8:36 AM, Ted Ross wrote: > >> I generally like this translation facility, though I'll need to think >> through some use cases to make sure there's sufficient capability in the >> matching and substitution. >> > > I would definitely appreciate some more feedback on this area. I think some > real world usage will help us out. I struggled with various options here. I > didn't want to add a dependency onto a regular expression library without > at least some kind of fallback as I think this functionality is going to > end up being too useful to be optional. > > There are a number of public domain regular expression libraries out there > (e.g. t-rex) that are basically designed to be small enough and simple > enough to be sucked into a codebase wholesale for when you can't afford an > external dependency. I considered grabbing one of those, but I also wasn't > 100% sure that full on regex was the best/only option here. There is > something nice and simple about being able to say route("*", "my-uplink") > as opposed to writing a fullon regex. > > I can see possibly even wanting to support multiple syntax options > eventually, but for starters I decided to keep it simple. I wrote a very > small glob style matcher with substitution. It's roughly 100 lines of code > and should work on any platform. I'm entirely open to replacing this with > something a real regex library if we want or something else entirely, I > just wanted something simple/portable to start with so we could actually > play with the functionality and learn a bit more about what is appropriate. > > >> I question the value of having this as part of the API. It seems to me >> that the Messenger routing table should be part of the configuration of a >> system (i.e. in a place like /etc/qpid/messenger/, or the Windows Registry, >> etc.). Eventually, it might be desirable to have an address translation >> service that can be accessed remotely. I guess I see this translation as >> being not the concern of the application, but more of the deployment of the >> application. >> >> > Initially I was actually going to add the functionality via some kind of > configuration file as you say. I have a similar conceptual view of the > functionality as you describe, i.e. it really should only be used as part > of the deployment/configuration of the messenger, not part of the > "application work" portion of the API. I ended up going this route for two > reasons (no pun intended). For starters it was a bit more expedient as I > didn't have to write some kind of file format parser, but the second, and > perhaps more important reason, is that I wasn't sure of the implications of > adding dependencies onto files/file systems. I want messenger to be usable > from embedded devices that might not even have a file system, so I figured > it would be safer to offer as a pure API. I do think it would be > appropriate to layer some kind of system integration on top of this API > just as you describe. > > --Rafael --------------------------------------------------------------------- To unsubscribe, e-mail: users-unsubscribe@qpid.apache.org For additional commands, e-mail: users-help@qpid.apache.org