Re: [jgroups-dev] Advice on best practices for implementing a new protocol

<[email protected]>
Newsgroups gmane.comp.java.javagroups.devel
Message-ID <[email protected]>
 
I think I ran into something similar, and found that the
ConnectionMap/table
already prunes a connection for you, done deterministically on accept
(based on a address comparison). It could be more graceful though
(merge the send queues, finish receiving data in flight..)

 
________________________________

From: Mike Jensen [mailto:[email protected]] 
Sent: Tuesday, August 24, 2010 5:14 PM
To: jg-dev
Subject: Re: [jgroups-dev] Advice on best practices for implementing a
new protocol


Lastly, since multiple TCP connections may be established between two
nodes (as described earlier, since two nodes probably have the same
internal models, there is a high probability that they will decide to
connect to each other at the same time), I need a way to distinguish
between two different connections of the same node.  I have so far been
implementing everything by referencing to different nodes via their
"Address" object.  Of course that does not work for the above situation,
because their address objects should return false in .equals, even when
they are of the same node (it returns false because the ports should be
different, and if they did return true you might have a connection leak
in AbstractConnectionMap).

------------------------------------------------------------------------------
Sell apps to millions through the Intel(R) Atom(Tm) Developer Program
Be part of this innovative community and reach millions of netbook users 
worldwide. Take advantage of special opportunities to increase revenue and 
speed time-to-market. Join now, and jumpstart your future.
http://p.sf.net/sfu/intel-atom-d2d

_______________________________________________
Javagroups-development mailing list
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.