Abstract: In order to improve the user experience and reduce the operators' cost, Real-Time Rich Internet Application (RIA) has become more and more important compared with other Web Applications. Real-time RIA combines the Multimedia and Real-time experience in the client side, which provides the live collaboration ability to the application and improves the user experience dramatically. This paper illustrates the Flash P2P mechanism including Multicast and Directed Routing in Flash Player 10.1 based on RTMFP (Real-Time Media Flow Protocol). RTMFP is a new communication protocol introduced since Adobe Flash Player 10. Its low latency, end-to-end peering capability, security and scalability make it very suitable for developing Real-Time RIA. In addition, we apply this technology to a Group Audio application in order to present the workflow.
The Scalability Challenge of Real-Time Media
In the early 2010s, the rise of Rich Internet Applications (RIAs) brought a significant demand for real-time collaboration tools, such as group voice chat and live streaming. However, these applications faced a massive scaling wall due to the reliance on traditional Unicast protocols like RTMP (Real-Time Messaging Protocol).
In a Unicast model, a central server must establish an individual stream for every single client. This creates a linear relationship between the number of users and the required server bandwidth. For instance, if 1,000 users each require a 1 Mbps stream, the server must provide 1 Gbps of upstream bandwidth. This "punishing math" made large-scale interactive media prohibitively expensive and created significant latency bottlenecks as the server's resources became saturated.
Leveraging RTMFP for P2P Multicast
To address these limitations, this research explores the use of RTMFP (Real-Time Media Flow Protocol), introduced in Flash Player 10.1. Unlike RTMP, which is built on the connection-oriented TCP, RTMFP utilizes UDP (User Datagram Protocol). This shift is critical for real-time audio, as UDP allows for much lower latency by avoiding the overhead of TCP's retransmission rules. In a live conversation, a minor packet loss is often preferable to the long delays caused by waiting for retransmitted data.
RTMFP enables Application-level Multicast, where the burden of data distribution is shifted from the central server to the clients (peers) themselves. In this model, the server's load remains virtually constant regardless of the group size, as the "mesh" of peers grows in capacity with every new user who joins.
Intelligent Mesh Management: Pull and Push
To maintain an efficient and reliable P2P network, the system employs a hybrid pull/push mechanism:
- Pull Strategy: Receivers maintain a "map" of available data blocks among their immediate neighbors. They proactively request specific missing blocks to ensure the continuity of the audio stream.
- Push Strategy: To further optimize delivery, clients periodically test their neighbors for the lowest latency. Once a high-speed neighbor is identified, data is "pushed" to them immediately upon arrival. This reduces the time spent waiting for requests and ensures the fastest possible propagation through the mesh.
This intelligent mesh reforming allows the network to self-correct on the fly, finding the most efficient paths for data slices even as users join or leave the group.
Implementation and Performance
The authors developed a modular group audio application using Flash Builder 4 and Flex. The architecture was split into a communication library (LibP2P_Xlh) for group management and a main interface (P2PAudioTest).
Functional testing in a Local Area Network (LAN) environment demonstrated the system's viability. Users were able to join groups, monitor their "neighbor count," and subscribe to specific audio streams from other peers. The observed latency was approximately one second, which, while not instantaneous, was considered a successful benchmark for medium-scaled group chatting at the time. Most importantly, the P2P approach confirmed a dramatic reduction in upstream bandwidth requirements for the service provider compared to the 1-to-N unicast model.
Limitations and Future Outlook
While the P2P multicast approach excels at live delivery, it faces challenges regarding data persistence. Because the audio data lives within the active mesh of peers, the system does not natively support recording or archiving; once the original participants go offline, the data is lost.
Future iterations of this technology suggest a hybrid architecture. In such a setup, Flash P2P would handle the efficient, low-cost delivery of live streams, while a traditional media server (such as Adobe Media Server or Red5) would be integrated specifically for recording and long-term storage tasks. This combination would provide the scalability of P2P with the reliability of server-side archiving.
Summary updated