[jboss-dev-forums] [Design of Messaging on JBoss (Messaging/JBoss)] - Re: Shared Transport in JGroups

bstansberry@jboss.com do-not-reply at jboss.com
Tue Mar 25 11:12:51 EDT 2008


[OT] Wow, firefox crashed about 3/4 way through this long response. Restarted it and when it restored the tab it resurrected my in progress response. :-)

"clebert.suconic at jboss.com" wrote : I have been testing JGroups 2.6.2 and it is working fine without any problems.

Great. :-)

anonymous wrote : I'm a little confused to what will replace the multiplexor.

Basically, JGroups maintains a static Map<String, TP> (where TP is the base class for all transport protocols, i.e. UDP and TCP).  If you add a singleton_name="xxx" attribute to your UDP or TCP protocol config, JGroups sees that and checks the map for xxx before instantiating an instance of the protocol, uses the existing protocol if it finds one.

So, say the JBC cache used for session repl needs a channel.  It's configured to use the "udp" stack. So, it does this:

Channel ch = channelFactory.createMultiplexerChannel("udp", .......);
ch.connect("Tomcat-DefaultPartition");

If JBM also wanted to use the "udp" config, your code could:

Channel ch = channelFactory.createMultiplexerChannel("udp", .......);
ch.connect("JBM-CTRL");

In the AS, each service will have it's own channel. Only thing shared would be the UDP protocol at the bottom of the protocol stack.  That's because the config of the UDP protocol in the "udp" stack includes singleton_name="udp".

Let's make it more interesting.  Say JBM doesn't want to use the "udp" stack; you want a customized stack, say w/o STATE_TRANSFER. So you'd added a "jbm-ctrl" stack to the -stacks.xml file and instead of the above you do this:

Channel ch = channelFactory.createMultiplexerChannel("jbm-ctrl", .......);
ch.connect("JBM-CTRL");

Now two different channels with separate UDP protocols. OK, but maybe not ideal, since admins now have to work harder to isolate AS clusters from each other, since there are now multiple mulitcast sockets being created.

But, if you guys and I came to an agreement where we realized the same configuration *of just the UDP protocol* was fine for the "udp" and "jbm-xxx" stacks, then we could specify the same UDP config in all of them. And change the value of the singleton name, for example to singleton_name="shared-udp".

Now JBC and JBM once again share a UDP protocol.

anonymous wrote : Whatever it is we need the stack we currently use available on JBAS 5.

Please send me whatever you want to use and I'll make sure it's integrated. 

Let's continue this dialogue re: shared transport to see if we can agree on a common config for a shared UDP protocol (or not).

View the original post : http://www.jboss.com/index.html?module=bb&op=viewtopic&p=4138755#4138755

Reply to the post : http://www.jboss.com/index.html?module=bb&op=posting&mode=reply&p=4138755



More information about the jboss-dev-forums mailing list