The GameLink connection provides a persistent, publish-subscribe connection for data flow between game clients or servers and a massive live streaming audience.

A scalable server architecture, together with topic/channel communication, enable Muxy to provide real-time game data to viewers. The Muxy Cloud powers new and innovative viewer engagement interactions, with services that maintain developer-defined user and extension state, aggregate viewer input in variety of ways, and facilitate audience monetization actions.

The GameLink library provides these services through a persistent bidirectional connection to the Muxy Cloud. Hundreds of thousands of persistent connections are maintained for hours at a time. During peak events, the Authorizer/Router handles hundreds of thousands of requests per second, with 24/7 availability and low-latency responses, even under peak load.

GameLink services are available through the low-level native-code Muxy GameLink Library , and at a higher level through the MEDKit REST API and JavaScript.

GameLink Messaging and State Tracking

Extension data and messages are broadcast through an event system on top of underlying WebSocket connections.

  • Game clients can subscribe to events on a named topic thread to receive updated information on audience participation.
  • Clients can publish events to send information to all or a filtered subset of the live-streaming viewers.
  • Clients can get and set developer-defined state values through the event system, and subscribe to state-update events.

The WebSocket protocol defines the following set of actions that a client can request.

ActionDescription
authenticateRequires a Client ID and authorization (PIN or JWT)
subscribe, unsubscribeTargets a named topic. Can contain developer-defined data.
broadcastTargets a named topic, and contains data (the message to broadcast). Can be filtered to a subset of all viewers.
get, set stateSubscriptions target a path to a state key. The set call creates and manages developer-defined game-state key-value pairs, the get call returns the current value for a given key.

GameLink Services

In addition, polling and transaction events are supported through special connection targets poll and transaction_completed.

Event streamDescription
Polling and voting eventsSubscriptions target the poll event stream. Create, manage, and delete audience polls, and receive real-time updates on voting results.
Purchasing eventsSubscriptions target the transaction_completed event stream. When you offer products for sale through Twitch, respond to completed purchases of those products that are reported from Twitch.