We may bootstrap user*name*s from LDAP and store them in the DB (If we go for space-optimization we can just store username and status), as well as storing a group-user mapping and group sharing mapping, making 3 tables in total. We can then bump out rosters by (dynamic?) DB queries.
If we queue the roster recalculation schedule user by user, the connection setup delay can be an issue, so I'd prefer unified synchronization, by gathering all online users and get their rosters when time has come. Moreover, batch-processing grouped users can also speed up the process.
Seems I am getting past caching but if we just dynamically build up changes for the cached, it may cause hinderance...
Shouldn't clients be able to recognize roster changes when they are just pushed out to them as regular roster items. When several clients are connected with different resources on the same node aren't roster updates pushed out this way?