Custom User Profile Properties - Synchronization across Author and Publishers (Non-UGC)

Avatar

Avatar

Gdubz-57m2mu

Avatar

Gdubz-57m2mu

Gdubz-57m2mu

19-12-2016

Hi all,

Had a question about user profile synchronization.

Existing State (AEM 5.6.1):
Right now we have an offline process create an XML dump of users and their custom properties and store them in a file. Everyday at 5am, we've got a scheduler running in AEM that parses that file and updates the "/profile" child node of each rep:User in AEM if a property's value has changed. If something was changed, we mark a cq:Page under the rep:User as modified and needing forward replication, to which a workflow launcher listens to. The workflow that runs then activates that rep:User node, effectively pushing the updated "/profile" child node to all publish instances. This works fine right now because "/home/users/t/test-user" is the path on author and all publishers.

Future State (AEM 6.2):
I could keep doing what I'm doing for 5.6.1 but wanted to see if anyone else has tried or done something differently. I kinda feel like this method is less than stellar. I thought about User Sync[1] but that's really only for profile properties that were modified on a Publish instance, which as far as I'm aware, don't even get stored back on the Author instance when changed. Also, given the user node name changes[2] between versions, activating a user node on Author has some weird behavior when it gets to the Publish instance.

BEFORE ACTIVATION:
Author: "/home/users/p/pMyHnSw5-WblDPZIVlph [test-user]"
Publish: "/home/users/V/VEmvMSsosOQKYc8p72t6 [test-user]"

AFTER ACTIVATION:
Author: "/home/users/p/pMyHnSw5-WblDPZIVlph [test-user]"
Publish: "/home/users/p/VEmvMSsosOQKYc8p72t6 [test-user]"

It replicated the rep:User and "/profile" node properly, but it just moved the rep:User node to a different rep:AuthorizableFolder path. I feel like after updating a few user profile properties, this would get extremely confusing (visually). Users would still have to be looked up programmatically by their userID though, so it wouldn't be that bad, just weird. Also, because rep:User node(s) were modified on Publish, if User Sync IS setup, it kicks back a reverse replication package to Author telling it to update/delete any nodes that have changed:

19.12.2016 11:49:29.503 *INFO* [sling-threadpool-788bd608-1fcc-47b6-b22e-420e5f85890d-(apache-sling-job-thread-pool)-9-org_apache_sling_distribution_queue_socialpubsync_endpoint0(org/apache/sling/distribution/queue/socialpubsync/endpoint0)] org.apache.sling.distribution.agent.impl.SimpleDistributionAgent [agent][socialpubsync] [endpoint0] PACKAGE-DELIVERED DSTRQ36: ADD paths=[/home/users/p/VEmvMSsosOQKYc8p72t6, /home/users/p/VEmvMSsosOQKYc8p72t6/profile, /home/users/p/VEmvMSsosOQKYc8p72t6/rep:policy], importTime=5ms, execTime=242ms, size=5963B 19.12.2016 11:49:29.573 *INFO* [sling-threadpool-788bd608-1fcc-47b6-b22e-420e5f85890d-(apache-sling-job-thread-pool)-10-org_apache_sling_distribution_queue_socialpubsync_endpoint0(org/apache/sling/distribution/queue/socialpubsync/endpoint0)] org.apache.sling.distribution.agent.impl.SimpleDistributionAgent [agent][socialpubsync] [endpoint0] PACKAGE-DELIVERED DSTRQ36: DELETE paths=[/home/users/V/VEmvMSsosOQKYc8p72t6], importTime=1ms, execTime=312ms, size=49B

Question:
What is the best way to handle these custom profile properties and keep them in sync across all publish instances? These aren't properties that can be modified on the publish instance (not really UGC), so User Sync wouldn't work. I've considered possibly reading/writing these with the SRP API anyway, even though they're not UGC. This would prevent the need for replication of non-content, just wondering what (if any) drawbacks that may have?

[1] https://docs.adobe.com/docs/en/aem/6-2/administer/security/security/sync.html
[2] http://help-forums.adobe.com/content/adobeforums/en/experience-manager-forum/adobe-experience-manage...

View Entire Topic