qpid-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Robert Greig" <robert.j.gr...@gmail.com>
Subject Re: Use of AMQShortString in client side code
Date Wed, 19 Sep 2007 21:16:42 GMT
On 19/09/2007, Rafael Schloming <rafaels@redhat.com> wrote:

> One of the previously discussed improvements for 0-11 is to define a
> fixed width destination or address type that can be used to efficiently
> represent the exchange name + routing-key (i.e. something akin to an IP
> address). I suspect this would actually make the whole issue somewhat
> moot since shortstr decoding would be eliminated entirely from the
> critical path of the broker.

What advantages would that have over variable width plus tokenizing?

> To be clear I'm not against using CharSequence. Right now I'm just
> trying to nail down whether AMQShortString is a necessary API choice or
> simply an optimization. If it is the former there isn't much wiggle
> room. If it is the latter I think there are a number of reasonable
> alternatives, and using CharSequence would definitely be high on my list
> to try.

Thinking about this further, can your generated API not present
whatever it wants to users (e.g String just like JMS). We can optimise
AMQShortString so that it lazily encodes String->ByteBuffer. That
being the case, your API can create AMQShortString on behalf of the
user to make is "easy" to use, there is no performance hit and we
don't limit ourselves to CharSequence and avoid Rob's concern about
using instanceof or casts.

RG

Mime
View raw message