Re: [jgroups-dev] FD_ICMP useability
Bela Ban <[email protected]> Thu, 27 Oct 2011 15:56:43 +0200
| Newsgroups | gmane.comp.java.javagroups.devel |
|---|---|
| Message-ID | <[email protected]> |
Thanks, I fixed this (pull from master to see my changes).
I doubt FD_ICMP makes a lot of sense, as it only checks the IP address,
*not* the IP address:port combination...
On 10/26/11 9:41 PM, balrog of moria wrote:
> I am playing around with my TCP protocol stack a little and I wanted to use
> the FD_ICMP, since I'm on a constant quest to reduce bandwidth consumption
> :)
>
> Anyhow I noticed firstly that the magic number wasn't present so I added it
> (I guess that experimental protocols are not included).
> Then it didn't work since now logical addresses are used rather than
> IpAddress so I needed to "patch" it as following:
>
> In the PingMonitor, there was this:
>
> // 1. execute ping command
> InetAddress host=ping_dest instanceof IpAddress?
> ((IpAddress)ping_dest).getIpAddress() : null;
> if(host == null)
> throw new IllegalArgumentException("ping_dest is not of type IpAddress -
> FD_ICMP only works with these");
>
>
> I replaced it with this:
>
> // Determine the physical address of ping_dest
> InetAddress host;
> PhysicalAddress physicalAddr;
> if (ping_dest instanceof PhysicalAddress) physicalAddr = (PhysicalAddress)
> ping_dest;
> else physicalAddr = (PhysicalAddress) FD_ICMP.this.down(new
> Event(Event.GET_PHYSICAL_ADDRESS, ping_dest));
> if (physicalAddr == null) log.warn("Unable to determine the physical address
> for " + ping_dest);
> else host = ((IpAddress) physicalAddr).getIpAddress();
>
>
> Now it seems to work but I was curious how safe it was to pass a down event
> from a FD monitor task and how costly it was to traverse the task at each
> heartbeat cycle.
>
> Thanks again, and I'll continue playing with it ;)
>
> Regards
>
> Nicolas
--
Bela Ban
Lead JGroups (http://www.jgroups.org)
JBoss / Red Hat
------------------------------------------------------------------------------
The demand for IT networking professionals continues to grow, and the
demand for specialized networking skills is growing even more rapidly.
Take a complimentary Learning@Cisco Self-Assessment and learn
about Cisco certifications, training, and career opportunities.
http://p.sf.net/sfu/cisco-dev2dev
_______________________________________________
Javagroups-development mailing list