How RTMS Revolutionizes Real‑Time Messaging for Massive Interactive Apps

RTMS (Real Time Message Service) is a frame‑synchronization‑based real‑time communication solution that offloads logic from the server, uses in‑memory processing, and employs decentralized, non‑persistent, publish‑subscribe routing to dramatically improve latency, scalability, and interactivity for high‑frequency multi‑user scenarios.

Alibaba Terminal Technology
Alibaba Terminal Technology
Alibaba Terminal Technology
How RTMS Revolutionizes Real‑Time Messaging for Massive Interactive Apps

RTMS stands for Real Time Message Service. Based on frame‑synchronization concepts, it provides a real‑time network communication solution where the server only forwards messages without any business logic, targeting scenarios that demand high real‑time performance and interactivity.

Implementation-wise, RTMS integrates with business servers via an SDK, reducing east‑west traffic and eliminating reliance on external storage services such as distributed caches or databases. It operates entirely in memory, offering low‑level network capabilities that boost real‑time performance and stability.

Business Background

To increase user activity and stickiness, Alipay offers many interactive products (e.g., Ant Forest, Ant Manor, Baba Farm). During major sales events like 618 and Double‑11, additional interactive games appear. However, existing interactive products lack strong real‑time competition; users cannot compete simultaneously, resulting in low interactivity and engagement.

In the seventh year of the New Year “Five Blessings” (Wu Fu) activity, a new “battle the Year Beast” game was introduced, responding to user demand for more interactive, PK‑style experiences. RTMS’s networking capabilities perfectly matched the requirements of this multiplayer mode, playing a crucial role in the 2022 event.

Business Pain Points

1. Complex, low‑latency multi‑user interaction

Traditional distributed, stateless microservice architectures route client requests through load balancers to random servers. Maintaining room state then requires centralized caches or databases, and message delivery relies on a centralized message core that persists every message, adding latency and complexity.

2. Large‑scale random user subscription (e.g., stock market data)

During trading hours, millions of users view rapidly changing stock data, requiring real‑time, high‑frequency pushes. Existing designs involve traversing user lists and sending messages one‑by‑one, which becomes a bottleneck as user scale grows.

Design Solution

We redesigned a north‑south real‑time message push architecture called RTMS, employing directed routing, publish‑subscribe mechanisms, removal of message persistence, and decentralization to meet high‑real‑time, large‑scale diffusion needs.

Decentralization & No Persistence

Unlike a centralized message core, RTMS handles connection management, upstream routing, and downstream distribution via the SDK deployed alongside business services, reducing east‑west traffic. Because real‑time scenarios tolerate less offline message handling, we eliminated server‑side persistence, improving latency and reducing storage pressure.

Bidirectional Communication

RTMS enables clients to send upstream requests and receive downstream results over the same connection, simplifying the link and unifying the programming model.

Upstream Message

Clients send messages to the server, which are first placed in the client’s upstream queue and then asynchronously delivered to the target via inspection tasks.

Downstream Message

The server pushes messages to clients through meeting and topic queues, which are then asynchronously delivered to users’ downstream queues and finally to the client.

Directed Routing

Users belonging to the same logical “room” are routed to the same server by attaching a token to their long‑connection request; the load balancer uses this token to direct connections, allowing the room’s logic to be processed on a single server, reducing complexity and improving real‑time performance.

Publish‑Subscribe Model

RTMS offers basic user‑specific pushes as well as two higher‑level modes: Meeting and Topic.

Meeting Mode

A Meeting represents a single “room” instance (e.g., a multiplayer game). All users in the same Meeting are handled on one server, consolidating upstream and downstream traffic.

Topic Mode

A Topic abstracts a class of related messages (e.g., a stock symbol). Users subscribe to a Topic, and the server pushes updates to all subscribers via cluster‑wide diffusion.

Summary & Outlook

RTMS introduces a new programming model for message pushing and end‑to‑end network communication, delivering high real‑time performance and simplifying architecture for interactive scenarios. Future work will explore mesh‑style deployment and edge proximity to further reduce latency and enhance user experience.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

Distributed Systemsreal-time messagingBackend ArchitectureDecentralizationPublish-SubscribeRTMS
Alibaba Terminal Technology
Written by

Alibaba Terminal Technology

Official public account of Alibaba Terminal

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.