[Spread-users] Is there a way to get the name(s) of members in a group using spread ?
jgreen at spreadconcepts.com
Tue Mar 23 16:34:31 EST 2004
It just so happens that we are implementing a project that needs the same
service as what you describe. We need it for an IM/chat network. I need to
list all users and all groups, and who is in which groups at all times.
While Spread itself is not currently designed for this, you can build such a
service on top of Spread, or modify Spread to give you this info.
First, it is trivial to get the names of members of a group, if you are a
member of that group. A copy of the members is given to you when you join a
group, and then just track the joins, leaves, and network event messages.
If you know all your groups in advance, you can then just join all the
groups and track this info. However if don't want to pay the overhead for
joining all groups, or you don't know all the groups, there are at least two
1. Modify Spread to give you this information on request. The Spread
Daemons track this info, and dynamic code that is in the Spread Daemon
process space has access to it. One solution would be to link into spread
using the Access Control Framework to initialize your code functions. Then
open a listening socket that will respond to queries into the Events
subsystem of Spread. When a request comes in, respond to it by looking at
the internal data structures of Spread. (You could also create a new
command for the monitor program and do it this way, but I like to keep the
Spread Daemon as clean as possible).
2. The other option is to not modify spread, but build it at the SP client
level. Have a special "admin" group that all clients join on connect. For
each group, have a member announce to the "admin" group, all membership
changes. Make sure to include self-leaves that leave the group empty. The
admin group will notify of any disconnects or network partitions. This way
you can track if users or entire groups leave unexpectedly and can't
announce their departure. If you detect a merge in the "admin" group, then
every group needs to re-announce its membership to catch if a whole group
existed on the other side of the partition. From this information you can
track all the users in the system, all the groups in the system, and what
the memberships of each group is.
Other problems include ensuring the ordering of the view change announcement
msgs in the admin group if you simply announce the full membership, and
serializing the full data to new members.
We chose option (2). We are using the "Flush Layer" (or a lightweight
version of it) and Spread Concept's "Replicated Hash Table" to get around
> -----Original Message-----
> From: spread-users-admin at lists.spread.org [mailto:spread-users-
> admin at lists.spread.org] On Behalf Of nilay padh
> Sent: Tuesday, March 23, 2004 3:42 PM
> To: spread-users at lists.spread.org
> Subject: [Spread-users] Is there a way to get the name(s) of members in a
> group using spread ?
> Hi All,
> Is there a way to get the name(s) of members in a group using spread ?
> I want to implement a kind of "Director/Registry Service" using Spread.
> I'll require the name(s)
> of all the members of a group.
> The idea is to have a group name for the Service and all the applications
> would have to be a member of that group. In that way I can pass messages
> those members and they can reply back with their membership
> and other details. Any other elegant way ?
> Post Classifieds on MSN classifieds. http://go.msnserver.com/IN/44045.asp
> Buy and Sell on MSN Classifieds.
> Spread-users mailing list
> Spread-users at lists.spread.org
More information about the Spread-users