bayeux4netty suggestions

Dai Jun guiwuu at gmail.com
Wed Sep 2 05:58:01 EDT 2009


Hi Bob,

On Wed, Sep 2, 2009 at 3:54 PM, Dai Jun<guiwuu at gmail.com> wrote:
> HI Bob,
>
> On Wed, Sep 2, 2009 at 8:44 AM, Bob McWhirter<bmcwhirt at redhat.com> wrote:
>>>> I'd ultimately like a router.send(PublishRequest r) or
>>>> router.send(BayeuxData m), plus a List<X> form of those.
>>>
>>> Would PublishRequest... and BayeuxData... (varargs) also be useful?
>>
>> I think List<X> suffices for my immediate use-case.
>
> Thanks for you suggestions. En, List is very required and I will add
> it very soon. I think varargs is very useful to avoid initialize List,
> when just sending 2-3 messages. And it's also interesting to
> Javascript developers. We could implement it in future.

I add a batch onPublish method to BayeuxRouter as well as two new
publish methods. The mothod onPublish is a legacy from former
BayeuxRouter, which process PublishRequest and publish DeliverEvent
both. It requires a PublishRequest object before real publishing, even
if there is not such a object. In such case, the connection have to
create a useless PublishReuqst.

So I add new publish methods to replace them and mark them deprecated
now. Additionally, there is another performance benifit, because it
avoids building same DeliverEvent obejcts repeatly in onPublish.

Do you think it work? Please let me know whether the changes work to
you. If it works, I will delete onPublish methods after testing.

>
>>
>>> Another thing Bob and I discussed about naming was receiveToQueue()
>>> and
>>> sendToQueue() in BayeuxConnection.  Perhaps they could be renamed to
>>> something more comprehensive, like offerUpstreamEvent() and
>>> offerDownstreamEvent() for example.  I guess we need some
>>> brainstorming, Bob and Danny?
>>
>> I'm a tad too ignorant to chime in just yet.
>
> Not at all. You're very welcome!
>
>>
>>        -Bob
>> _______________________________________________
>> netty-dev mailing list
>> netty-dev at lists.jboss.org
>> https://lists.jboss.org/mailman/listinfo/netty-dev
>>
>
>
> Best regards,
>
> Dai Jun or Danny Dai(in English) - http://guiwuu.googlepages.com
> GTalk: guiwuu at gmail.com | QQ: 93409048 | MSN: guiwuu at hotmail.com |
> Twitter: @guiwuu
> Sent from Beijing, 11, China
> Samuel Goldwyn  - "I'm willing to admit that I may not always be
> right, but I am never wrong." -
> http://www.brainyquote.com/quotes/authors/s/samuel_goldwyn.html
>



-- 
Best regards,

Dai Jun or Danny Dai(in English) - http://guiwuu.googlepages.com
GTalk: guiwuu at gmail.com | QQ: 93409048 | MSN: guiwuu at hotmail.com |
Twitter: @guiwuu
Sent from Beijing, 11, China
Stephen Leacock  - "I detest life-insurance agents: they always argue
that I shall some day die, which is not so." -
http://www.brainyquote.com/quotes/authors/s/stephen_leacock.html



More information about the netty-dev mailing list