The following needs to be discussed and improved...
The user profile is used both at i-card broker and at RP site. So there are user's personal data on two different sides. So changing a profile at one side means that those changes should be seen on the other side. That is why it was decided to get some kind of synchronization going. It is needed to be able to keep the two user profiles, the one at i-card broker and the one at RP site, in sync.
A number of scenarios need to be considered:
- HBX user has an i-card and lands on RP site's edit profile page the first time, HBX detects the RP site and requires the user info from i-card broker for this site
- If user did not have the profile on RP site (it means that broker does not have user info as well), then i-card broker creates a new user profile for this RP site, fills it with user info from the Middle Context and returns the RSS feed URL to the RP site via HBX. RP site requests the corresponded RSS feed and could automatically create a new profile for the user.
- Else if user already has the RP site's profile, i-card broker retrieves the user profile info for this RP site and returns the RSS feed URL to the RP site via HBX. RP site requests the received RSS feed.
- If the i-card's profile and the RP site's one are different (had previously edited, etc.) then RP site could decide to do the SSE merging (synchronization) with remote RSS feed
- Else if profiles both on the i-card and on the RP site are equal (had not previously edited), then it is not needed to do anything