2 ms·
Good question, the flow is like this: 1. Clients trigger HTTP function endpoints (add a player, do an attack). 2. Centralized state is being updated (based on
by marcduiker 4y ago
Good question, the flow is like this:
1. Clients trigger HTTP function endpoints (add a player, do an attack).
2. Centralized state is being updated (based on Durable Entities).
3. The Azure Functions publish messages to the realtime channel (via a REST based client).
4. Clients are subscribed to the realtime channel (using a WebSocket based connection) and respond to the messages (update player health etc).
So clients are only subscribing to messages that the Azure Functions are publishing.
- daleksti 4y agoGot it, thanks. So clients use REST, which triggers a publish?
- marcduiker 4y agoYes, the Ably REST API is used within the Azure Functions to publish a message. The Ably platform then uses WebSocket connections to the connected player devices to deliver the messages.