Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement presence API for IServiceConnectionContainer #2125

Merged
merged 6 commits into from
Jan 23, 2025

Conversation

Y-Sindo
Copy link
Member

@Y-Sindo Y-Sindo commented Jan 15, 2025

To expose presence API to the caller in the IServiceConnectionContainer interface, we have two choices:

  1. Expose a low-layer method like "WriteXXXMessage", which accepts a GroupMemberQueryMessage parameter and return GroupMemberQueryResponse. However, the MultipleEndpointServiceConnectionContainer also implements this interface and has to implement this method. In multi-endpoint case, we have to have some aggregation logic on the results from all the endpoints. Then the verb Write cannot describe what has been done in multiple endpoint cases. Therefore we don't expose a low-layer method.
  2. Expose a high-layer method ListConnectionsInGroup, to wrap operations including writing messages, fetch next pages according to continuationToken.

@Y-Sindo Y-Sindo force-pushed the presencewebsocket branch 2 times, most recently from 8e3670d to 4fa2477 Compare January 16, 2025 06:14
@vwxyzh
Copy link
Contributor

vwxyzh commented Jan 16, 2025

rough idea for n-way merge for multi-endpoint.
#2126

sequenceDiagram
    participant c as Client
    participant s as SDK
    participant m as Multi Endpoint Service Connection Container
    participant s1 as Service Connection Container For Service 1
    participant s2 as Service Connection Container For Service 2

    c->>s: Enumerate group member
    s->>m: Enumerate group member
    loop
        opt Need more data from Service 1
            m->>s1: Enumerate group member with pagination
            s1->>m: Pagination result
        end
        opt Need more data from Service 2
            m->>s2: Enumerate group member with pagination
            s2->>m: Pagination result
        end
        loop
            m->>m: N-way merge
            m->>s: Yield return
            s->>c: Yield return
        end
    end
Loading

@Y-Sindo Y-Sindo changed the title Implement presence API for management SDK persistent mode Implement presence API for websocket transport Jan 20, 2025
@Y-Sindo Y-Sindo changed the title Implement presence API for websocket transport Implement presence API for IServiceConnectionContainer Jan 20, 2025
@Y-Sindo Y-Sindo force-pushed the presencewebsocket branch 2 times, most recently from f363820 to dfe26e5 Compare January 22, 2025 05:45
@Y-Sindo Y-Sindo enabled auto-merge (squash) January 22, 2025 07:43
@Y-Sindo Y-Sindo disabled auto-merge January 22, 2025 07:43
@Y-Sindo Y-Sindo enabled auto-merge (squash) January 23, 2025 05:14
@Y-Sindo Y-Sindo merged commit c01c309 into Azure:dev Jan 23, 2025
8 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants