SARISKA
  • Introduction
  • Overview
  • Getting Started
    • Get API Key
    • Authentication
  • Real Time Messaging
    • Overview
    • Development
      • JavaScript
      • Swift
      • Kotlin
      • Java
      • Dart
      • C# (Unity Engine)
    • API References - Real Time Messaging
  • Video Calling/ Video Conferencing Api
    • Overview
    • Development
      • JavaScript
      • Swift
      • Kotlin
      • Java
      • Flutter (Dart)
      • C# (Unity Engine)
      • C++ (Unreal Engine)
    • API References - Video Calling
      • Video Calling CDR API's
      • Conference Scheduling Reservation APIs
  • Co-Browsing
    • Overview
    • Javascript
  • Server
    • Pub/Sub Node.js environment
  • Project Management
    • Pricing And Billing
    • Quotas and Limits
  • SDK
    • Mobile
      • Video Calling Mobile Apps
      • Messaging Mobile Apps
    • Desktop
      • Video Calling Desktop Apps
      • Messaging Desktop Apps
    • Browser
      • Video Calling Browser Apps
      • Messaging Browser Apps
      • Co-browsing Browser Apps
  • UI Kit
    • Generating the API Key for your Project
    • Video Conferencing
      • Running Sariska's Unity Demo
        • Android
      • Unity Engine
      • Unreal Engine
    • Audio Conferencing
  • Live Streaming
    • Interactive Live Streaming
    • Non-Interactive Live Streaming
    • API References - Live Streaming
      • API Reference - Interactive Live Streaming
      • API Reference - Non-Interactive Live Streaming
    • Guide to Interactive streaming
  • Sariska Analytics
    • Overview
Powered by GitBook
On this page
  • Key Features
  • Use Cases
  • API Structure and Terminology
  • API Endpoints
  • Platform Support
Export as PDF
  1. Real Time Messaging

Overview

Real-Time Messaging SDK for Seamless Communication

Last updated 1 year ago

Real-time messaging (RTM) has become an integral part of modern communication, enabling seamless and instantaneous interactions between individuals and groups. Sariska's Real-Time Messaging API provides a powerful and versatile platform for incorporating RTM capabilities into your applications and systems.

At the core of Sariska RTM is the utilization of the programming language, renowned for its concurrency model, process isolation, and fault-tolerant design. Erlang's capabilities make it an ideal foundation for real-time messaging systems, ensuring high availability and reliability even in the face of unexpected failures. Erlang's process isolation strengthens the system's resilience by preventing the failure of one component from affecting others. Additionally, Erlang's unique hot reload capabilities allow for seamless updates and modifications to the system without interruption, ensuring continuous operation.

Sariska RTM's architecture is not only robust but also distributed, allowing for scalable and efficient communication across a network of interconnected nodes. This distributed nature enhances its ability to handle large volumes of traffic seamlessly.

Key Features

  • Real-time communication: Deliver messages to users in real time, fostering continuous engagement and interaction.

  • Scalable architecture: Handle millions of connected clients simultaneously, ensuring seamless communication even at large scale.

  • Flexible channel management: Create and manage channels to organize and categorize messages effectively.

  • Multi-platform support: Integrate RTM functionality into web, mobile, and game development environments.

One of the standout features of Sariska RTM is its integration with . Phoenix, built on top of the Erlang ecosystem, leverages the power of Erlang's concurrency, process isolation, and fault-tolerance to facilitate soft real-time communication among millions of connected clients. This makes Phoenix Channels an essential component of Sariska RTM, enabling the efficient and scalable exchange of messages between users and applications.

Use Cases

Sariska's Real-Time Messaging API caters to a wide range of applications, including:

  • Chat rooms and messaging apps: Build real-time chat features for personal and professional communication.

  • Breaking news and alerts: Deliver real-time notifications for urgent updates and critical events.

  • Real-time tracking: Monitor the movement of objects, vehicles, or participants in real time.

  • Multiplayer game interactions: Facilitate real-time communication and synchronization in multiplayer games.

  • IoT device monitoring and control: Receive real-time sensor data and send control commands to IoT devices.

  • Browser notifications: Notify users of page updates or changes in web applications.

API Structure and Terminology

Channel

Channels are a way to organize and manage real-time communication between clients and a server in Socket.IO. They allow you to send and receive events to specific groups of clients, and they can be used to create a variety of applications, such as chat rooms, multiplayer games, and collaborative editing tools.

Channel Prefix

Each channel name starts with a prefix that determines the message serialization format and persistence behavior.

chat: Use this prefix for persisting messages to the database. This prefix requires a fixed schema and is ideal for chat applications.

 channel = socket.channel("chat:room123");

rtc: Use this prefix for scenarios where message persistence is not necessary. This prefix allows sending arbitrary JSON data, making it suitable for events in multiplayer games, IoT applications, and others.

channel = socket.channel("rtc:room123");

sariska: Use this prefix for performance-critical applications that utilize Flatbuffers as the serialization format and do not require message persistence. This prefix provides zero-copy serialization/deserialization, significantly enhancing performance.

channel = socket.channel("sariska:room123");

API Endpoints

Establishing a Socket Connection

To establish a socket connection for real-time messaging, use the following URL:

wss://api.sariska.io/api/v1/messaging/websocket

Connection with Flatbuffers as a Serializer

To establish a connection for real-time messaging (RTM) with Flatbuffers enabled, use the following URL:

wss://api.sariska.io/api/v1/messaging/websocket/serializer

Implement proper error handling and security measures when establishing connections, especially for high-performance applications.

Platform Support

Sariska's real-time messaging SDK offers versatile cross-platform communication across browsers, Android, iOS, Mac, Windows, Linux, and gaming consoles.

For performance-critical applications, consider using Flatbuffers, which offers near-zero serialization/deserialization time compared to JSON on both the device and server ends. Flatbuffers is particularly well-suited for use with mmap (or streaming), as it requires only a portion of the buffer to be in memory. Access speed is comparable to raw struct access, with only one additional indirection (a Vtable) to accommodate format evolution and optional fields. For more details, refer to the .

Server-side Phoenix Channel Implementations: for Phoenix channels facilitate seamless message exchange from the server.

Unity Integration: Integration with the game engine enables bidirectional messaging within Unity's cross-platform environment.

Godot Integration: Integration with the game engine ensures bidirectional messaging within Godot's open-source ecosystem.

Flatbuffers documentation
Server-side implementations
Unity
Godot
Erlang
Phoenix Channels
Phoenix Channel Architectture