[Spread-users] Order of members in vs_sets

Luke Marsden luke at hybrid-logic.co.uk
Mon Mar 30 17:31:28 EDT 2009


Hi guys,

Is there any way to get the order in which nodes joined a group out of
Spread without "watching" (not always possible)?

I'd like to use the oldest member of the group as the leader rather than
the lowest IP address, which is what we're presently using.

Thanks!
Luke Marsden
Hybrid Logic Ltd.


On Mon, 2009-03-30 at 18:19 -0400, John Schultz wrote:
> I believe each vs_set is sorted using strcmp as the comparison.  So,
> within a single vs_set I *believe* they will be sorted in ascending
> order according to strcmp.
> 
> I don't know if that means you can use std::set_difference() or not
> as I'm not intimately familiar with all the STL functions.
> 
> Cheers!
> John
> 
> ---
> John Lane Schultz
> Spread Concepts LLC
> Phn: 443 838 2200 
> Fax: 301 560 8875
> 
> Monday, March 30, 2009, 2:07:51 PM, you wrote:
> 
> > Dear Spread users,
> 
> > I wonder if the list of members in a vs_set, as returned by 
> > SP_get_vs_set_members(), is ordered in a deterministic way. The 
> > documentation for SP_receive() states that the list of members returned
> > through the groups parameter (the current membership view) is the same
> > for all the processes receiving the membership message, so that a leader
> > can be deterministically elected for the group. Does the list of members
> > is a vs_set follow the same ordering?
> 
> > In other words, can I use std::set_difference(), between 
> > SP_get_vs_set_members(vs_sets[my_vs_set]) and the previous membership 
> > view, to determine the members who are no longer part of the group after
> > receiving a CAUSED_BY_NETWORK membership message?
> 
> > Thanks,
> 
> 
> > Tudor
> 
> 
> 
> _______________________________________________
> Spread-users mailing list
> Spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users
-- 
Luke Marsden BA Hons (Oxon)
Director, Hybrid Logic Ltd.

Mobile: +447791750420






More information about the Spread-users mailing list