On 28/11/2017 18:18, Colm O hEigeartaigh wrote:
Thanks Francesco! What do you think of the following additions to GroupTO:

  - staticMembershipCount
  - dynamicMembershipCount
  - totalMembershipCount (maybe not necessary?)

Hi Colm,
the first two look good; the third is effectively not needed IMHO.

Regards.

On Wed, Nov 22, 2017 at 12:11 PM, Francesco Chicchiriccò <[email protected]> 
wrote:

Hi Colm,

On 20/11/2017 18:19, Colm O hEigeartaigh wrote:

Hi all,

Recently we updated the RelationshipTO class to return the "other" end of
the relationship. I'm wondering if it's possible (or desirable) to try and
do something similar with memberships?

Not sure what you mean here: if I am reading an user, I can see from
relationships that the other end is an AnyObject; from memberships, I can
see that the other end is a Group.

So the only difference would be when reading a group instead, to see all
members there (as SCIM does).

As a motivating use-case, take seeing how many users are members of a
particular group. It's not possible to do it via the group REST API
(unless
I'm mistaken, please correct me if it is possible), but by querying the
users REST API with (for example) $groups==employees.

Let's say we want to get a list of all of the group names in Syncope, with
a corresponding user membership count. We have to get the groups, then
find
the count of users in each group, which is not very efficient.

I'm guessing listing the users who are members of the group in a call to
GET a given group could result in a massive response.
Definitely agree.

But perhaps we could include a simple count in GroupTO representing the current 
static and
dynamic users who are members of the given group at that point in time?
Understand: we can even differentiate between static and dynamic members,
users and any objects.

+1 to go ahead and fill an improvement on JIRA for this.

Regards.

--
Francesco Chicchiriccò

Tirasa - Open Source Excellence
http://www.tirasa.net/

Member at The Apache Software Foundation
Syncope, Cocoon, Olingo, CXF, OpenJPA, PonyMail
http://home.apache.org/~ilgrosso/

Reply via email to