Dynamic Real-Time Identification & Session Control (DRISC) otherwise known as Simultaneous Session Control is a session management mechanism that will allow our broadcasters to define and control the number of simultaneous sessions allowed per offer for a given user. Simultaneous Session Control integration is largely based on APIs which allow easy integration with any client application that supports basic protocols.
In order to achieve this, the client application needs to maintain a Websocket connection which allows bidirectional data flow between the application and Simultaneous Session Control. The simultaneous Session Control mechanism uses WebSocket to exchange messages to ensure all sessions are alive as well as communicate events.
For fully functional integration, it is crucial to:
- Allow content stream / playback only when connection is established and server responded with Message - OK
- Respond to server Message - PING with the Message - PONG to ensure DRISC can keep track of disconnected sessions.
All modern technologies should support Websockets and HTTP, it’s up to you to choose the library or native API of your technology. For documentation purposes, we are going to focus on native APIs from Web browser but this should be easily achieved with popular libraries, for example, Axios, etc.
Before we start the integration, please make sure you have the following technical requirements ready:
- Websockets client
- HTTP client
- (Optional) Offline persistence layer. For example Web Storage API
All requests are being authorized with the Authorization header, using the Bearer token which is JWT. Refer here to know more about JWT token generation and refresh token.
DRISC can be used with the following use cases:
This use case covers only the session control mechanism. Following this will help you to create and end the sessions for the end-user.
This use case covers the takeover functionality. This will help the end-user to take over the other concurrent active sessions at a given time.
This use case covers how to handle DRISC, when the integration is completed, but for some reason, you want to keep DRISC disabled.
To have the session control mechanism work properly, the number of sessions allowed per offer has to be properly defined. So the Simultaneous Session Control server can use
sessionLimit set per offer to control the session pool for a given customer.
Also, you should enable the Simultaneous Session Control functionality in the Cleeng dashboard to complete the setup. You can find the Simultaneous Session Control settings in the Admin section of the Cleeng dashboard. Without Simultaneous Session Control enabled in the dashboard, you will get a 200 "DRISC Disabled" error while trying to create a new session.
Now you have read and understood the prerequisites to build a frictionless session control mechanism for your application. Continue reading further the Configure Session control article to start the integration.
Updated 3 months ago