[jbosscache-dev] Re: JGroups Shared Transport support in JBC

Brian Stansberry brian.stansberry at redhat.com
Tue Mar 4 10:21:23 EST 2008


Sorry Tim, I'd meant to include you on this thread from the start. :(

We were having a discussion of how to handle the difference between a 
JGroups JChannel w/ a shared transport (new in 2.6.2) and the old 
multiplexer MuxChannel.

If you call ChannelFactory.createMultiplexerChannel() the return type is 
Channel, but the code actually returns the MuxChannel implementation 
class. Which is reasonable; the name of the method implies the 
multiplexer will be used.

But, a shared transport JChannel is actually a much better solution to 
JGroups resource sharing. So, question is how to get a shared transport 
JChannel into users' hands.

1) Have them specifically ask for a JChannel by calling 
ChannelFactory.createChannel(String) instead of 
ChannelFactory.createMultiplexerChannel().  Puts the issue back in the 
user service; e.g. JBC might add a config property to help it determine 
if a call to createMultiplexerChannel() or createChannel() is the 
desired way to go. Or maybe just switch to createChannel().

2) Have the createMultiplexerChannel() method internally decide whether 
to return a MuxChannel or a shared transport JChannel.

Due to the late date this came up, my plan for AS 5 was #2. 
JBMESSAGING-1244 is a problem with that plan, but I see you have a JBM 
1.4.1.BETA2 Fix Version on that, so I think it's OK.

#1 isn't workable yet; it requires a minor change in JGroups that won't 
be out until 2.6.3.  After I found JBMESSAGING-1244, I pinged Bela/Manik 
to see if it could be done quickly in case JBMESSAGING-1244 was 
something that wouldn't get done in time for AS 5. Sounds like it's not 
an issue.

Tim Fox wrote:
> 
> 
> Manik Surtani wrote:
>> Is Tim even on this list?
> 
> On jbosscache-dev - no I'm not
> 
> Can someone recap?
> 
>>
>> On 4 Mar 2008, at 11:58, Bela Ban wrote:
>>
>>> Releasing 2.6.3 is not really feasible, as I've just released 2.6.2. 
>>> So, if the change in JBC and JBM is minor (which I think it is), then 
>>> I'd appreciate your guys fixing this.
>>> Cheers,
>>>
>>> Manik Surtani wrote:
>>>> And I could implement this in JBC 2.1.0.GA easily enough, but if 
>>>> there is a viable workaround I'd rather leave this for 2.2.0 given 
>>>> current timeframes.
>>>>
>>>>
>>>> On 4 Mar 2008, at 07:14, Bela Ban wrote:
>>>>
>>>>>
>>>>>
>>>>> Brian Stansberry wrote:
>>>>>> Being able to handle this in JBC 2.1.0 is a bit more of an issue 
>>>>>> due to a bug in the way JBM handles a Channel.connect() call 
>>>>>> (http://jira.jboss.com/jira/browse/JBMESSAGING-1244).  The bug 
>>>>>> basically means JBM will fail if it calls 
>>>>>> ChannelFactory.createMultiplexerChannel() and the call doesn't 
>>>>>> return a MuxChannel.  So, my intended approach for AS 5 (override 
>>>>>> createMultiplexerChannel()and return a regular JChannel if it's 
>>>>>> configured for shared transport) breaks JBM.
>>>>>>
>>>>>> Maybe they'll get JBMESSAGING-1244 fixed in time for AS 5; maybe not.
>>>>>
>>>>> I certainly hope so, sounds like a small change (use a JChannel 
>>>>> type rather than a MuxChannel (extends JChannel))...
>>>>>
>>>>>> If we can get a JGroups 2.6.3
>>>>>
>>>>> Another release, so soon after 2.6.2 ? Only if absolutely 
>>>>> necessary. Seems to me that Tim can fix his stuff much more 
>>>>> quickly... In any case, let me know, I need a few days to get a 
>>>>> 2.6.3 out (including fixing the NPE you opened).
>>>>>
>>>>>> and JBC 2.1.0.GA able to call ChannelFactory.createChannel(), then 
>>>>>> I can just let JBM get a MuxChannel.
>>>>>
>>>>> This is possible in 2.6.3 by which feature/bug I implemented ?
>>>>>
>>>>> -- 
>>>>> Bela Ban
>>>>> Lead JGroups / Clustering Team
>>>>> JBoss - a division of Red Hat
>>>>
>>>> -- 
>>>> Manik Surtani
>>>> Lead, JBoss Cache
>>>> manik at jboss.org
>>>> msurtani at redhat.com
>>>>
>>>>
>>>>
>>>
>>> -- 
>>> Bela Ban
>>> Lead JGroups / Clustering Team
>>> JBoss - a division of Red Hat
>>>
>>
>> -- 
>> Manik Surtani
>> Lead, JBoss Cache
>> manik at jboss.org
>> msurtani at redhat.com
>>
>>
>>
> 

-- 
Brian Stansberry
Lead, AS Clustering
JBoss, a division of Red Hat
brian.stansberry at redhat.com



More information about the jbosscache-dev mailing list