Skip to content
giongto35 edited this page Aug 31, 2019 · 3 revisions

Introduction

WebRTC is a project that provides web browsers and mobile applications with real-time communication (RTC). It has low latency and is commonly applied in video and audio call application.
WebRTC relies on ICE, which is the process of determining the best method of communication between 2 peers and bypass NAT.
WebRTC relies on Session Description Protocol (SDP) to exchange a minimal amount of information including address, port, encryption method, keys, codec, and stream identification.
-- TODO: Update: Offer and Answer in WebRTC --

WebRTC in CloudRetro

WebRTC in Cloud Retro is applied in Server-Client manner. As mentioned in 3.Overview, the coordinator will setup peer-connection through SDP exchanging between worker and user. All exchanges process relies on WebSocket.

WebRTC steps

  1. A user opens CloudRetro.io will open a WebSocket connection between client and coordinator. On user side, frontend will create a SDP describing user webRTC information. That SDP is sent to coordinator over WebSocket. Update code
  2. After the coordinator received SDP from a user from a Websocket connection, the coordinator picks the best worker in the available pool and send that user's SDP to that worker. This exchange is over another socker connection between coordinator and workers.
  3. When the worker received user's SDP (offer), the worker will create a response SDP (answer in webRTC term) and send back to user over coordinator.
  4. If the user can succesfully receives answer from worker, the handshake fully finishes. User and Worker can start communicating with each other directly over WebRTC peer-connection with small latency.