bayeux4netty suggestions
Bob McWhirter
bmcwhirt at redhat.com
Tue Sep 1 18:09:11 EDT 2009
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.
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.
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.
Thoughts?
-Bob
More information about the netty-dev
mailing list