SPT Sri Pranav Tene

pushed to lupyd/firefly

← all work

06 / WebRTC · RPC

Light

Lightweight WebRTC-based RPC library for building peer-to-peer sync engines.

Light is a lightweight RPC layer built on WebRTC, for sync engines that need direct, real-time communication between peers rather than a round trip through a server.

     Peer A                                       Peer B
  +-----------+         RTCDataChannel         +-----------+
  |   sync    |------- call(id, method) ------>|  handler  |
  |  engine   |<------ result(id, value) ------|           |
  +-----------+                                +-----------+
        \                                            /
         \______ signaling, only to connect ________/

Figure 1: Request and response over a data channel (illustrative)