[ 
https://issues.apache.org/jira/browse/UNOMI-522?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17575864#comment-17575864
 ] 

Kevan Jahanshahi commented on UNOMI-522:
----------------------------------------

We decide to make the eventCollector endpoint to behave exactly like the 
context endpoint.

The existing logic about session/profile creation/anonymous/update etc that was 
already done in the context endpoint will be extracted, and reused by the event 
collector.

Basic usage like context endpoint:
 * send events to /eventsCollector with a new sessionId
 * the session will be reused if found in Unomi ES
 ** the profile will be found from the existing session
 ** or from the cookie
 ** or from the payload
 * the session will be created if not found
 ** the profile will be created
 * the profile id will be return as a cookie like for context.json endpoint.

 

This way we dont have strange temporary session and profiles, and we keep track 
of the visitor like we do for normal context.json requests.

> EventCollector saving temporary profiles
> ----------------------------------------
>
>                 Key: UNOMI-522
>                 URL: https://issues.apache.org/jira/browse/UNOMI-522
>             Project: Apache Unomi
>          Issue Type: Bug
>          Components: core
>    Affects Versions: 1.4.0, 1.5.7
>            Reporter: Kevan Jahanshahi
>            Assignee: Kevan Jahanshahi
>            Priority: Major
>
> There is issues with profile handling in the EventCollector.
>  * In case you send an event that will update the profile, like a login event.
>  * on a new session ID
>  * with no profile already known by unomi
>  * EventCollector is creating a temporary profile, prefixed by: "temp_"
>  * normally, this kind of profile should not persisted, but in case the event 
> sent trigger rules and actions that will modify the profile (that is new), 
> then the profile will be saved with the temporary id prefixed by "temp_"
> I think the profile creation handling in the event collector is really bad, 
> and should no deal with temporary id.
> The question is not easy to answer, does the event collector should do the 
> same as context.js ? 
>  * create the profile
>  * send the profile id in the cookie ?
> May be event collector should not be used to create profile, but then how can 
> we control this ?
> Anyway we should not persist this temporary profile.
> It can be dangerous with the profile merge, because user can get this 
> temporary profile assigned to them.



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to