Giter Site home page Giter Site logo

sa's Introduction

DWRTC - Distributed WebRTC Signalling

Sonar Rating CircleCI

DWRTC extends WebRTC with a decentralized connection setup (signaling). Users connect to different nodes on the Internet. These nodes are connected via a P2P network which stores the routing information. The connection setup messages are routed through this network. The WebRTC connection can then be used to send data, audio and video directly from web browser to web browser.

As a proof of concept, the project also includes a video call application using DWRTC to establish calls to a partner.


Project Page: dwrtc.net

WebSocket API documentation: docs.dwrtc.net/dwrtc/ch.hsr.dsl.dwrtc.websocket

Full Kdoc documentation: docs.dwrtc.net

JS documentation: src/main/resources/web/README.md

Run

To run DWRTC the easiest way is to use the Docker container:

docker run dwrtc/dwrtc

Use the environment variables mentioned in the options section to configure DWRTC.

Options

Options are loaded using Konfig. The priorities are:

  1. Command Line Properties overrides
  2. Environment Variables overrides
  3. Property file defaults.properties

Use the "dot"-syntax (http.port) for command line and property file, and "underscore"-syntax for environment variables (HTTP_PORT).

The options are:

  • Peer Port (Int): peer.port/PEER_PORT: port the TomP2P peer runs on
  • Webserver IP (String): http.ip/HTTP_IP: the IP the web server binds to (e.g. "127.0.0.1", "localhost", "0.0.0.0")
  • Webserver Port (Int): http.port/HTTP_PORT: the port the web server binds to
  • Bootstrap Peer (comma-separated list of HOST:PORT pairs): bootstrap.peer/BOOTSTRAP_PEER the list of peers to bootstrap to (e.g. "1.1.1.1:4000,2.2.2.2:3000")

Local Usage

$ docker-compose up -d
$ docker-compose ps

    Name               Command           State                        Ports
-------------------------------------------------------------------------------------------------
dwrtc_node1_1   java -jar /app/app.jar   Up      0.0.0.0:PORT1->7000/tcp, 0.0.0.0:32770->7532/tcp
dwrtc_node2_1   java -jar /app/app.jar   Up      0.0.0.0:PORT2->7000/tcp, 0.0.0.0:32768->7532/tcp

Connect to localhost:PORT1 for node1 and localhost:PORT2 for node2 via a web browser. You can also connect to the TomP2P ports (32768/32770 in this case) to bootstrap any instance running outside of this network.

sa's People

Contributors

thde avatar

Watchers

 avatar  avatar  avatar

sa's Issues

Project Plan

Write up a project plan, maybe similar to the one used in EngProj (including risks, organisation, time tracking, methods used (agile, iterative?), ...)

Persönliche Reflektion

Persönliche Berichte einschliesslich (selbst-)kritische Reflexion der Studierenden zu ihren Erfahrungen bei der Arbeit.

Title Page

Create it in Word, make sure the font is the same as in LaTeX. Then simply \includepdf

API Doc

Very basic. We can basically specify our message formats.

Document TURN ping state

Document that turn ping is used, but not the algorithm where all peers are asked for their ping measurements

Set up project page

Set up a website, where we could distribute documents. Probably use Github Pages?

Familiarize with TomP2P

Make ourselves familiar with TomP2P

We discussed setting up a DHT between all clients. When a client goes online, it PUTs its current connection details with its ID as the key. When you want to reach this client, you could GET the connection details from the DHT and connect directly.

But, this is all very open for discussion!

TURN server interface

What interface should a TURN server present to a browser?

This is needed if we develop our own TURN server

Write up what we've done so far

  • Start with idea of Java gui and Codecs etc
  • not good, too much effort
  • use webrtc, but most of the things are done for you
  • there's a signaling channel that you have to implement yourself
  • do that

Figure out a way for E2E testing (manual)

How can we start two of our servers so that they run on the same machine? These would simulate two servers.

  • This should scale, it should support more than two servers

Proof of Concept

This works already

  • Server 1 => puts something in DHT
  • Server 2 => reads something from DHT

We can add

  • Peer 1 => connects via Websocket to Server 1 and sends message (that

The rest will work as-is

If we want to go one step further

  • Peer 2 => connects via Websocket to Server 1 and gets the message (pushed)

Check SimplePeer

Does it help us?
Does it need a specific server interface for signalling or is that up to you?

Abgabe Checkliste

  • Update all draw.io drawings (upload, export as PDF using Crop + Selection Only, download)
  • "Remove intermediate files" before building PDF

Für die Publikation der Arbeit auf eprints.hsr.ch: Folder mit:

  • Zustimmung zur Publikation der Arbeit, unterschrieben von den Studierenden. Oder Information, ob einer oder beide der Studierenden die Arbeit, bzw. ihren Namen nicht publiziert haben wollen. Für vertrauliche Arbeiten: Aufgabenstellung aus der ersichtlich wird, dass die Arbeit vertraulich ist.
  • Ein Plain-Text Abstract der Arbeit, welches auf eprints.hsr.ch publiziert wird.
  • Für publizierbare Arbeiten: Ein PDF einer publizierbaren Version der Arbeit, ohne die
    persönlichen Berichte, Sitzungsprotokolle, Vereinbarungen über Urheber- und Nutzungsrechte, Adress-Informationen. Aus Datenschutzgründen ist darauf zu achten, dass keine persönlichen Daten von Industriepartner und Experten (Email-Adressen, Telefonnummern) enthalten sind.
  • Formulare (z.B. Eigenständigkeitserklärung, Nutzungsrechte, ...)

Amend TURN section: Tom's ideas

Our current main point against distributed TURN servers is performance. Tom suggested a procedure where we find the nearest TURN servers to both peers (or between them, etc.)

After figuring out #37, amend the section in the SA document with our findings.

Investigate new idea

  • Set up a few servers that make up a DHT
  • Each peer connects to one of these servers
    • A peer can also download the server software and become part of the DHT, independently
  • The server handles new peers, and when a peer wants to connect to another peer, would facilitate the exchange of connection details, and prepare both peers that they're going to be contacted directly

Different project proposal

We would rather use this architecture:

20180919_161615 1

Basically, we write a P2P API that's responsible for exchanging connection details between peers. It would consist of an API client, running in a browser, and an API server, running in whatever language would suit. They would communicate over HTTP. This would all run on each client!

The API server would have a DHT library at its disposal, which is joined in a DHT with other P2P servers. The API client would talk to the browser's built in WebRTC component.

Whenever the API client requests a peer's connection details, the server would in turn ask the DHT library. The client then hands this information over to the WebRTC component. The WebRTC component then opens a direct connection to the peer's WebRTC component.

Write requirements

  • Use Cases
  • Non-functional
    • Check EngProj doc. There's a cited standard way of doing these (what sections there are)

Check requirements

Sort through the documents and check what we need to do

Keerthi mentioned that Thomas is already doing this, as part of what he requires from our side.

Check codecs

Are these codecs suitable for a P2P Skype on a laptop?

Note: we've not yet defined if it's just about audio, or video too.

  • OPUS
  • AV1

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.