toggle quoted messageShow quoted text
On 9/3/2020 09:57, J_Catlady wrote:
Yes it can be done, but should it? I say no.
On 9/3/2020 09:39, Duane wrote:
On Thu, Sep
3, 2020 at 11:14 AM, Chuck Palmer wrote:
I would think that somewhere in the back-end of
groups.io is my profile that says what groups I am a
member of, what my roles are in those groups, and which
groups have donations turned on.
Let's see... Let's say 100,000 groups, 5,000,000 accounts,
at least 3 possible roles per account. True, a computer can
figure all that out, but it takes computing cycles to do
it. It would have to be an almost instantaneous status in
order to be useful, like when someone starts a group and
wants to upgrade immediately. Seems like a terrible waste
of resources to me, though I'm sure it could be done. BTW,
I doubt that many of my members (~7,000 total) even know the
Billing item exists in their account and no one has ever
asked about it.
So, I'm a software engineer for Second Life. We have over 2.6
million resident groups in our system and we provide realtime
group information, include roles for a member.
The simple db schema for such a thing is to have a user table
which has information about users, including a UUID for the
user; a groups table that has information about groups
including a group UUID and a roles table that has role
information including a role UUID. Then, there is a simple
mapping table that has rows consisting of tuples
(userid,groupid,roleid) that is updated whenever someone
joins, leaves or changes roles in the group. Then, retrieving
the roles and groups for a user is a simple SELECT statement
against the mapping table and decoding the group and role id's
back to human readable strings by a secondary lookup. No
"waste of resources" and yes, it is available instantaneously.
A query of this kind, even including the subqueries for the
strings returns in fractions of a second - yes cycles are
used, but not an appreciable amount. This is, after all, what
databases are built to do.
Best,
Glenn
--
PG&E Delenda Est
--
J
Messages are the sole opinion of the author, especially the
fishy ones.
My humanity is bound up in yours, for we can only be human
together. - Desmond Tutu
|