Skip to Content.
Sympa Menu

grouper-users - Re: [grouper-users] RE: Get Primary and Non Primary affiliations

Subject: Grouper Users - Open Discussion List

List archive

Re: [grouper-users] RE: Get Primary and Non Primary affiliations


Chronological Thread 
  • From: "Sachdeva, Vivek" <>
  • To: Chris Hyzer <>
  • Cc: "" <>
  • Subject: Re: [grouper-users] RE: Get Primary and Non Primary affiliations
  • Date: Wed, 8 Oct 2014 08:04:26 +0000
  • Accept-language: en-US

Thanks Chris,

I have a question about transaction. So, if I implement method membershipPostAddMember and store values in the custom table in this method, and let us say the transaction fails in this method, will I have data inconsistency because person is now member of group in the main grouper table but not in the custom table?



From: Chris Hyzer <>
Date: Mon, 6 Oct 2014 13:44:25 +0000
To: vivek sachdeva <>
Cc: "" <>
Subject: RE: [grouper-users] RE: Get Primary and Non Primary affiliations

I agree J  If you need help let me know

 

Thanks,

Chris

 

From: Sachdeva, Vivek []
Sent: Sunday, October 05, 2014 4:30 AM
To: Chris Hyzer
Cc:
Subject: Re: [grouper-users] RE: Get Primary and Non Primary affiliations

 

I did some more research and looks like grouper hook (MembershipHooks) is better option to achieve it. What do you think?

 

Thanks,

Vivek

 

From: vivek sachdeva <>
Date: Sun, 5 Oct 2014 00:45:44 -0700
To: Chris Hyzer <>
Cc: "" <>
Subject: Re: [grouper-users] RE: Get Primary and Non Primary affiliations

 

Thanks Chris,

 

What I am thinking of trying is that I can create a rule so that when a member is added to any group, I find out the name of the school, division, department etc from the group name and then populate a new table which will have columns something like:

 

User Id, School, Division, Department, Sub-Department….

 

This way when I have to read the school, division, department, etc for a user, it would be faster. 

 

I will have to create a couple of more rules to handle the delete and update memberships.

 

What do you think?

 

Thanks,

Vivek 

 

From: Chris Hyzer <>
Date: Thu, 2 Oct 2014 19:48:03 +0000
To: vivek sachdeva <>, "" <>
Subject: [grouper-users] RE: Get Primary and Non Primary affiliations

 

You should filter by subfolders when getting someone’s memberships or attribute assignments.  Don’t worry about string parsing, that wont be the bottleneck.

 

You could make some SQL views that give you the memberships and attributes you need and use those instead of the WS, that might help.  (You could grant READ on those views to another schema so this process doesn’t use the main Grouper RW schema)

 

Whether SQL or WS, you should try to do things in bulk and cache the results, e.g. the attributes on the folders you need…

 

If you need help with the SQL queries let me know.

 

Thanks,

Chris

 

From: [] On Behalf Of Sachdeva, Vivek
Sent: Thursday, October 02, 2014 1:28 PM
To:
Subject: [grouper-users] Get Primary and Non Primary affiliations

 

Hi,

 

I am trying to figure out the best way to achieve a requirement. I need to populate user table in the UI like below.

 

Name,   User Id,    Primary department,  Primary Division,     Primary School,              Non Primary Departments

Vivek,    786876,   English,                            Humanities,              Letter and Sciences,     Maths, Law

John,      565655,   Neurology,                     blank,                          Medicine,                        blank                     

 

Our current hierarchy structure which is in the development stage looks like below:

 

ucla:college-letter-sciences:humanities:english:appointed:[primary]:set of people

ucla:college-letter-sciences:humanities:english:appointed:[non-primary]:set of people

ucla:college-letter-sciences:humanities:english:prospect:[primary]:set of people

ucla:college-letter-sciences:humanities:english:prospect:[non-primary]:set of people

 

ucla:law:appointed:[primary]:set of people

ucla:law:appointed:[non-primary]:set of people

ucla:law:prospect:[primary]:set of people

ucla:law:prospect:[non-primary]:set of people

 

The above two examples show that there is not a standard structure. Basically, one school can have a division under it and the other school might not have it. So I have attached the metadata (attributes) to the folder names to figure out if a folder is a school, division, department or sub-department.

 

So currently I am thinking of achieving the requirement by calling the membership service which will give me all the group names a person is member of. Then, I can look at the last word of the fully qualified group name and tell if it is a primary or non-primary. So, after that for all the groups names I received, I can break the group name into separate words like (ucla , college-letter-sciences, humanities, english) and call the attribute service to know if the folder is a school or department or division. And in the end I can populate the table. 

 

My concern is that it is going to be slow because I will be doing a lot of string parsing, calling the attribute service to know what is the level of the folder. Plus the use case requires it to be done on a list of users at once. 

 

Is there a better way of doing it? 

Am I missing any basic grouper component which can help me achieve it ? 

Should I store some data in the separate database for fast lookups ?

 

Thanks,

Vivek

 

 

 

 

 

 

 

 

 




Archive powered by MHonArc 2.6.16.

Top of Page