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
In serverless mode, customer can also use streaming feature in SignalR.
Overview
sequenceDiagram
participant c as Client
participant s as Service
participant u as Upstream
participant g as Stream Generator
c->>s: Stream Invocation
s->>u: Rest API<br>(Stream Invocation)
u->>+g: Generate
loop
g-->>s: Send partial result
s-->>c: Send partial result
end
g-->>-s: Complete stream
s-->>c: Complete stream
Loading
Programming model
Client
Clients initialize streams by current stream invocation like followings:
functioninvokeStream(){conststream=connection.stream("YourStreamingMethod",arg1,arg2);stream.subscribe({next: (item)=>{console.log(item);// Handle each item received from the stream},error: (err)=>{console.error(err);// Handle any errors},complete: ()=>{console.log("Stream completed");// Handle stream completion}});}
Function
Function binding will handle REST API requests to a method invocation.
In the method invocation, it will start a generator with connection id, stream id and arguments in long run. And the method should return void.
Generator
Generator uses our Data Plane API to send stream item back to client.
Goal
In serverless mode, customer can also use streaming feature in SignalR.
Overview
Programming model
Client
Clients initialize streams by current stream invocation like followings:
Function
Function binding will handle REST API requests to a method invocation.
In the method invocation, it will start a generator with connection id, stream id and arguments in long run. And the method should return void.
Generator
Generator uses our Data Plane API to send stream item back to client.
Data Plane API
c#: Microsoft.Azure.SignalR.Management
Rest API: swagger coming soon.
The text was updated successfully, but these errors were encountered: