bpipe icon indicating copy to clipboard operation
bpipe copied to clipboard

Investigate using WebRTC instead of client-server

Open Marak opened this issue 11 years ago • 2 comments

It should be possible to eliminate the use of sending streams through the server by using WebRTC to establish a peer-to-peer connection.

Investigate this option and implement.

The functionality of streaming through a server should be preserved as a fallback API in case a WebRTC session can't be started.

Marak avatar Sep 29 '14 14:09 Marak

I have performed a preliminary test of implementing WebRTC.

Switching to WebRTC communication is a relatively easy change to the code-base. The existing websocket server / client is ideal for acting as a signal server between peers.

The primary issue I ran across ( and blocked on ) was the fact that for node (itself) to peer via WebRTC ( such as peering a browser to a node, not just peering two browsers ) requires custom bindings and additional dependencies. see: https://github.com/js-platform/node-webrtc

Relying on additional deps and custom bindings are fragile and outweigh the immediate benefit of adding WebRTC to bpipe.

If anyone wants / needs WebRTC in the future I would agree to add it if the primary method of communication ( server-client websockets ) was preserved and used as a fallback should WebRTC not be available on the system.

Marak avatar Oct 04 '14 10:10 Marak

:+1:

dominictarr avatar Oct 04 '14 10:10 dominictarr