bayeux4netty suggestions

이희승 (Trustin Lee) trustin at gmail.com
Tue Sep 1 20:02:25 EDT 2009


On Wed, 2 Sep 2009 07:09:11 +0900 (KST)
Bob McWhirter <bmcwhirt at redhat.com> wrote:
> Hiya Dai and folks--
> 
> So, I've gotten bayeux4netty codec happy with
> dojo-cometd-javascript, but I had to patch cometd.js.  Maybe I'm just
> doing it wrong.
> 
> Anyhow, it seems that if a client just goes away, and doesn't  
> disconnect cleanly, the BayeuxRouter hangs onto its BayeuxConnection  
> indefinitely.  Should these timeout-if-idle, like HTTP sessions?
> 
> Also, it seems awkward to use router.onPublish( publishRequest ) to  
> pump data down the pipe.
> 
> 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 anticipate needing to batch, instead of the single send/flush that  
> occurs with onPublish().  I'd be using this API from another source  
> (such as perhaps a JMS->Bayeux bridge).
> 
> I'd also like to not rely on the singleton
> BayeuxRouter.getInstance(), but other code seems to assume that's how
> we get it.  I'd like to be able to inject a router to be used by
> BayeuxDecoder and BayeuxConnection.
> 
> We could instead inject a BayeuxRouter instance into BayeuxDecoder,  
> which passes it along to BayeuxConnection.  All avoiding  
> getInstance()'s singleton, and allowing for multi-application
> isolation.

+1

> I'd also like to see BayeuxRouter be an interface I could implement  
> myself.  If running a cluster of servers, we need a router that can  
> talk to other routers, not just BayeuxConnections.  Clients talking
> to ServerA would need their stuff pushed to clients connected to
> ServerB in the same cluster.

+1

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?

-- 
Trustin Lee, http://gleamynode.net/


More information about the netty-dev mailing list