How to add 100000 Users to Group in Alfresco

cancel
Showing results for 
Search instead for 
Did you mean: 
dsr471
Active Member

How to add 100000 Users to Group in Alfresco

Hi,

We are using Alfresco 5 version. I've an users more that 100,000 users in Alfresco . Now my requirement is I've to add all users to two groups called 'Group1' & 'Group2'. I tried by Javascript api , but it taking so much time & impacting performance of application.

Can you please suggest easiest way to add huge amount of users into Groups without impacting performance of application. 

We are using Postgres as DB.

Regards,

DSR

1 Reply
afaust
Master

Re: How to add 100000 Users to Group in Alfresco

Ehm - are you really sure you want to add 100.000 users directly to a group? Are there no abstract groups which you could use to build a hierarchy, avoiding the 100.000 members case?

Anyway, you will need to do Java-based batch processing, only adding a sub-set of the users per iteration. Adding 100.000 to one group in one go simply overwhelms all assumptions made when Alfresco core services were implemented... A batch of 25-50 should be a reasonable number. Using default cache configurations, I would not want to push it over (100 - #activeUsers), or risk performance issues due to transactional cache being full and triggering global cache clearing.

Lastly, I want to reiterate that you should consider if that is really the best way to go about your use case, and if you could not realise it in a different way. I personally would not add 100.000 users to a group. Such a case would warrant some small customisation within Alfresco to create a "virtual" group which does not really exist in the database, but is injected in a users list of authorities by applying the same rule you use to assign the users to group 1 or 2 (or both).