I'm sorry.
Never mind on what I mentioned below, number 1.
I found the code which handles dynamic "join" and "leave" in
GrizzlyNetworkManager class.
Just answer number 2 and number 3, please.
-------------------------
Miju Byon
Senior Developer
TmaxSoft Co., Ltd.
Korea
From: Miju Byon <miju0628_at_tmax.co.kr>
Reply-To: <dev_at_shoal.java.net>
Date: Thu, 05 Apr 2012 10:46:12 +0900
To: <dev_at_shoal.java.net>
Subject: limitation of VirtualMulticastSender
Hi,
I'm trying to use VirtualMulticastSender, but it seems to have some
limitations and a tiny bug.
1. If A member joins a group and B member joins that group more than 10 sec
later, A cannot discover B and drops B from virtualPeerIdList.
A cannot broadcast messages to B any more even if B is alive in that group
because VirtualMulticastSender removes unknown members from the list but it
does not add new discovered members to the list.
It looks like that VirtualMulticastSender does not support dynamic "join"
and "leave".
2. There is no way to combine multicast and virtual-multicast.
If only a few members of all members in a group are on the different subnet
from the others, now I have to configure all members to use
virtual-multicast.
3. I'm not sure what lastReportedSendFailure is for, but time calculation
code below looks strange.
lastFail currentTime and e.getValue() - System.currentTimeMillis() are
always negative.
Is it supposed to be currentTime - lastFail and System.currentTimeMillis()
-e.getValue()?
protected boolean doBroadcast( final Message message ) throws IOException {
Š
} catch( IOException ie ) {
Long lastFail = lastReportedSendFailure.get(peerID);
long currentTime = System.currentTimeMillis();
if (lastFail == null ||
((lastFail - currentTime) >
LAST_REPORTED_FAILURE_DURATION_MS) ) {
if( LOG.isLoggable( Level.FINE ) ) {
LOG.log( Level.FINE, "failed to send message to a
virtual multicast endpoint[" + peerID +
"] message=[" + message + "]",
ie );
}
lastReportedSendFailure.put(peerID, currentTime);
}
Š
}
private void purge() {
Iterator<Map.Entry<PeerID, Long>> iter =
lastReportedSendFailure.entrySet().iterator();
while (iter.hasNext()) {
Map.Entry<PeerID, Long> e = iter.next();
if (e.getValue() - System.currentTimeMillis() >
LAST_REPORTED_FAILURE_DURATION_MS) {
iter.remove();
}
}
}
Let me know if what I'm thinking is right or not and if shoal has a plan to
improve or fix these issues.
Thanks in advance.
-------------------------
Miju Byon
Senior Developer
TmaxSoft Co., Ltd.
Korea