You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
For web clients, it's essential to determine the originator of a request to trigger an SSE Event. The initiator could be a browser, a mobile client, or even a browser tab. For instance, a user might initiate a delete action in one browser tab and expect the corresponding resource to be deleted in another tab through SSE Event logic.
Including the initiatorClientId in the emission will enable us to identify whether the current client instigated the request. This identification is crucial because, in most cases, we don't require a response to the SSE Event. Instead, our proprietary business logic will execute, eliminating the need to listen for the event and potentially duplicate this logic, which could also involve additional server resource requests.
The initiatorClientId could be generated by the client itself and transmitted through request headers during graph or WebDAV requests to the server. Subsequently, it can be emitted via the SSE event.
Alternatively, the server can inform the client of its initiatorClientId. This information can then be utilized by the client and transmitted through request headers during graph or WebDAV requests, eventually being emitted via the SSE event.
Real world example
When a folder is deleted in the active browser tab where we are currently located, our business logic automatically navigates us to the parent folder. However, in a second browser tab where we haven't initiated this action, the SSE Event Business logic will be triggered to display a message advising us to navigate elsewhere without automatically moving us to the parent folder. This is to ensure accessibility compliance. Without the initiatorClientId, we would display this message on both browser tabs, which would be incorrect in the first case where we've already navigated to the parent folder.
The text was updated successfully, but these errors were encountered:
AlexAndBear
changed the title
SSE add inititiatorClientId
Add SSE inititiatorClientId to event data
Mar 18, 2024
Enabling the described feature allows us to bypass some SSE event business logic if the clientId matches the initiatorClientId. This is because the existing business logic in the web already handles the actions effectively.
General
For web clients, it's essential to determine the originator of a request to trigger an SSE Event. The initiator could be a browser, a mobile client, or even a browser tab. For instance, a user might initiate a delete action in one browser tab and expect the corresponding resource to be deleted in another tab through SSE Event logic.
Including the initiatorClientId in the emission will enable us to identify whether the current client instigated the request. This identification is crucial because, in most cases, we don't require a response to the SSE Event. Instead, our proprietary business logic will execute, eliminating the need to listen for the event and potentially duplicate this logic, which could also involve additional server resource requests.
The initiatorClientId could be generated by the client itself and transmitted through request headers during graph or WebDAV requests to the server. Subsequently, it can be emitted via the SSE event.
Alternatively, the server can inform the client of its initiatorClientId. This information can then be utilized by the client and transmitted through request headers during graph or WebDAV requests, eventually being emitted via the SSE event.
Real world example
When a folder is deleted in the active browser tab where we are currently located, our business logic automatically navigates us to the parent folder. However, in a second browser tab where we haven't initiated this action, the SSE Event Business logic will be triggered to display a message advising us to navigate elsewhere without automatically moving us to the parent folder. This is to ensure accessibility compliance. Without the initiatorClientId, we would display this message on both browser tabs, which would be incorrect in the first case where we've already navigated to the parent folder.
The text was updated successfully, but these errors were encountered: