[Spread-users] How to get list of all Groups and its connected members.

Ryan Caudy rcaudy at gmail.com
Fri Jul 23 20:36:09 EDT 2004


The common theme from past discussions of this and similar issues on
the list is that, if that's what you want, the only really
satisfactory way to do so is to modify the code.  While Spread
daemon's maintain this information internally, there is no API
function that allows a connected process to obtain a complete list. 
One concern, were we to include such a function, is that the response
to it would need to be sent asynchronously (meaning that the call
couldn't be blocking), and arrive as a message (or, alternatively,
another channel/socket would need to be used).

How exactly do you plan to use this data?  If all you want is to see
the list on the daemon side, adding calls to g_print() (see groups.c
in the Spread source code) should accomplish what you need.

You could also try to do something at the application level, i.e.
having a control group of some sort, and forwarding group change
information to it.

Cheers,
Ryan


On Fri, 23 Jul 2004 18:57:28 +0530, Murali Bommaku <muralib at bsil.com> wrote:
> Hi,
> Thanks for your answer. I apologize as this perticular question was not
> listed in archives. Please if you have information regarding the subject,
> kindly send me, it will be of great help.
> Though its not directly supported by spread but i guess there must be
> someway to get all list of groups and its members.
> 
> I repeat the question as bellow:
> 
> 1.      I want to list all groups name (including joined group), which are
> existed in Spread Daemon
> (connected and other daemons).
> 2.      I want to list all members for each group.
> 
> Regards,
> Murali.
> 
> 
> 
> -----Original Message-----
> From: Jonathan Stanton [mailto:jonathan at cnds.jhu.edu]
> Sent: Tuesday, July 13, 2004 10:33 PM
> To: Murali Bommaku
> Cc: spread-users at lists.spread.org
> Subject: Re: [Spread-users] How to get list of all Groups and its
> connected members.
> 
> Hello,
> 
> You can find some discussion of this issue of listing all available groups
> and members in the list archives. The short answer is that Spread does not
> provide a way to directly query that currently. You can easily know the
> list of members of a group you have joined (that is the membership
> message) but if you do not join a group, Spread doesn't tell you the
> members.
> 
> See below for more answers.
> 
> On Tue, Jul 13, 2004 at 11:41:17AM +0530, Murali Bommaku wrote:
> > Hi,
> >       Is it possible to get list of all groups (including the joined group and
> > other groups) and its connected members info from a valid group member?
> > My requirements are as follows:
> >
> > I am using Spread 3.17.2, I connected to Spread and joined into a group. I
> > wanted to do the following things:
> >
> > 1.    I want to list the other groups name, which are existed in Spread
> Daemon
> > (connected and other daemons).
> > 2.    I want to list all members for each group.
> 
> See above.
> 
> > 3.    I want to send a message only to specified member through Spread (both
> > same group and differnt group).
> 
> Just send the message using the private group name of the targeted member
> as the "destination" group. So if you want to send a message to a client
> whose private name is "joe" who connected to the daemon running on machine
> with name "a", then just send a SP_multicast to the group "#joe#a" which
> is the private group name of that client. This 'unicast' message can be
> done wither or not either client has joined any groups -- they just have
> to have connected to a daemon. The easiest way to learn the private group
> name of another client is to have them send you a message (as then the
> 'sender' field has the private group name). You can also 'guess' the name
> as I did above because the names always follow a standard pattern
> "#user#machine"
> 
>  > 4.   Is there anyway to send a message to other
> group/group member?
> 
> Yes, Spread supports "open-group" semantics. Meaning any client can send a
> message to any group (even if it has not joined the group).
> 
> > 5.    If I am disconnected due to spread daemon crash/termination then I want
> > any nearest spread daemon automatically binds the members who are bind the
> > just terminated spread daemon without losing any communication data.
> 
> This is not the way Spread works. The clients are responsible for any
> fault-handling and failover because only the clients know the actual state
> of the their application data. The Spread daemons do maintain their
> internal state in the presense of failures and the set of daemons will
> maintain all of hte groups -- however, the clients who were directly
> connected to a failed daemon will have to reconnect to another daemon (or
> wait for the failed daemon to restart) and then run a resynchronization
> protocol for their application to catch up with clients and daemons who
> did not fail.
> 
> In Spread 'clients' are in control of all of the connections and initiate
> actions, the daemons just process messages requested by clients, so the
> daemons can not initiate a failover of clients they are not connected to
> as they do not know anything about their state.
> 
> Cheers,
> Jonathan
> 
> --
> -------------------------------------------------------
> Jonathan R. Stanton         jonathan at cs.jhu.edu
> Dept. of Computer Science
> Johns Hopkins University
> -------------------------------------------------------
> 
> _______________________________________________
> Spread-users mailing list
> Spread-users at lists.spread.org
> http://lists.spread.org/mailman/listinfo/spread-users
> 


-- 
---------------------------------------------------------------------
Ryan W. Caudy
<rcaudy at gmail.com>
---------------------------------------------------------------------
Bloomberg L.P.
<rcaudy1 at bloomberg.net>
---------------------------------------------------------------------
[Alumnus]
<caudy at cnds.jhu.edu>         
Center for Networking and Distributed Systems
Department of Computer Science
Johns Hopkins University          
---------------------------------------------------------------------




More information about the Spread-users mailing list