-
Notifications
You must be signed in to change notification settings - Fork 350
WebRTC
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 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.
- 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
- 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.
- 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.
- 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.