[Spread-users] Re: partition detection

Jonathan Stanton jonathan at cnds.jhu.edu
Mon Apr 22 16:00:03 EDT 2002

On Mon, Apr 22, 2002 at 03:33:51PM -0400, Guido van Rossum wrote:
> > 1) JOIN: This means a single member joined the group. Noone failed and the
> > 
> > 2) LEAVE: A single member left the group (someone called SP_leave). the
> > 
> > 3) DISCONNECT: A single member 'disconnected' from the daemon it had been
> I believe the API provides for multiple members joining, leaving or
> disconnecting in this way.  Does Spread guarantee that you get a
> separate message for each join/leave/disconnect event?  Could this
> change in the future?  (IOW should I write code that can handle
> multiple members, or can I safely assume this will never happen?)

Currently the API specifys that a caused_by_join, caused_by_leave and
caused_by_disconnect will always be a single member. So changing that would
be an API break and major change. Because of the way it is implemented I
don't anticipate that changing anytime soon, if at all.

You may be thinking of the sp_multigroup_multicast which sends a message to
multiple groups at once. Or it would be possible to have an API allowing you
to join multiple groups in one "join" call, but that would still cause each
group to see a join of a single member.

Because join/leave/disconnect events are naturally generated one at a time
for a single connection at a time, the only way they could be aggregated
into multi-member joins is if we waited before handling one to see if more
arrived and that would not give much gain at all for the added complexity
(and increase in latency)

Now the Network events can easily have multiple members join or leave at
once because they represent actual topology changes which effect lots of
daemons and members. So if you receive a network event you must be able to
handle any possible membership change of possibly many members.

Jonathan R. Stanton         jonathan at cs.jhu.edu
Dept. of Computer Science   
Johns Hopkins University    

More information about the Spread-users mailing list