Skip to content

Add inititiatorClientId to SSE event data #8677

Closed

Description

@AlexAndBear

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.

Activity

  1. changed the title [-]SSE add inititiatorClientId[/-] [+]Add SSE inititiatorClientId to event data[/+] on Mar 18, 2024
  2. AlexAndBear commented on Mar 18, 2024

    @AlexAndBear
    ContributorAuthor

    Note:

    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.

  3. changed the title [-]Add SSE inititiatorClientId to event data[/-] [+]Add inititiatorClientId to SSE event data[/+] on Mar 18, 2024
  4. self-assigned this
    on Mar 19, 2024
  5. moved this from Qualification to In progress in Infinite Scale Team Boardon Mar 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions