Menu

Home

Sajjad Taheri

Welcome to WebRTCBench wiki!

Overview

WebRTC is an industry and standards effort to provide real-time communication capabilities into all browsers and make these capabilities accessible to software developers via standard HTML5 and Javascript APIs [1].
WebRTC fills a critical gap in web technologies by allowing (a) the browser to access native devices (e.g., microphone, webcam) through a Javascript API and (b) to share the captured streams through using browser-to-browser Real-Time Communication. WebRTC also provides data sharing.

WebRTCBench in a Nutshell

The goal of WebRTCBench is to provide a quantitative comparison of WebRTC implementations across browsers and devices (i.e., hardware platforms). WebRTC accomplishes three main tasks: Acquiring audio and video; Communicating Audio and Video; Communicating Arbitrary Data. The
se tasks are mapped one to one to three main Javascript APIs. These are as follows: MeadiaStream (i.e., getUserMedia); RTCPeerConnection; RTCDataChannel. Hence, a quantitative assessment of WebRTC implementations across browser and devices is performed via collecting performance of MediaStream, RTCPeerConnection, and RTCDataChannel.
Because a MediaStream contains one or more media stream tracks (e.g., Webcam and Microphone), WebRTCBenc allows to define MediaStreams composed of Video, Audio, Data and any combination thereof. Likewise single peer connection with web server and multiple peer connections between browsers are supported in a WebRTC triangle [1].

What Is Included ?

This release is composed of two components:
1. a web server based on socket.io [2]
+ a WebRTCBench application on peers side.

Webserver: Benchmark comes along with a Webserver which when run, allow clients to download the WebRTCBench application and to do the signalling. Signaling trough STUN or TURN servers is currently not supported. Furthermore, it is used to integrate a database.
WebRTCBench application: A WebRTC application that allows to acquire streams, open connections, and both streams and data sharing.do testing and performance measuring of different functionalists of WebRTC implementation across different browsers.

WebRTCBench 0.2

This version of WebRTCBench adds an automated mechanism to collect experiment information from peers' browsers within text format and also in rational database. Although benchmark supports having up to 10 peers connecting to each other in mesh form, collecting information is currently limited to connection between only two peers. Also, web server now provide a secure connection.

Getting started

This section illustrates how to download WebRTCBench, install and execute the web server; and how to set up the database. Web server and database can be installed both on Linux and Windows based machines.

Starting the web server

In the first step download the benchmark suite ; On a terminal execute the following command :

$hg clone http://hg.code.sf.net/p/webrtcbench/code webrtcbench-code

enter into the directory webrtcbench-code.

$npm install express async mysql socket.io

The correct deployment of WebRTCBench in a test environment requires the configuration of the method "OpenSignalingChannel" by which our WebRTC application signals to other browsers through the web server. IP address and port number of the web server is hard coded in the method "OpenSignalingChannel".

To start the web sever use the following command (On Unix/Linux machines the user issuing the following command must be root or a sudoer):

$node socket-server.js > socket-server.log &

The web server will be listening to the socket indicated during its configuration. To stop the signaling server, use the following command on Unix/Linux machines:

$kill -9 `pidof node`

or press "Cntrl+C" on Windows machines.

Setting Up The Database

At this step, you should have a version of MySQL database installed on your machine. In order to create the database, a MySQL database user with sufficient privileges should execute the "createdb.sql" script provided by the benchmark using the following command in MySQL console.

$source createdb.sql

By executing this command a database called "webrtcdb" --if does not already exist-- will be created. After creating the database, the following modifications should be made to "config.js" configuration file.
1. Make sure that "db.present" variable is set to true
+ parameters regarding database address and authentication is set properly. Note that regardless of database presence, timing information will always be saved into text files on the web server.

db.present = true;  // DB is present
db.host = 'localhost';
db.user     = 'user' ;
db.password = 'pass' ;
db.database = 'webrtcdb' ;

User Guide

To use WebRTCBench, a user has to open multiple instances of a browser and navigate to the benchmark's hosted location. For example, if the benchmarks hosted location is core7.ics.uci.edu, open a browser and access the benchmark home page at the URL http://core7.ics.uci.edu.
User should provide its own machine specification at "User Agent Info" section menu. These specification include: device type, processor, connection type. By pressing "Store Agent Info" button the provided specification will be stored in browser cache and will be restored in later uses. Once at the benchmark home page, a user can select any combination of audio, video, or data in the connection type box, choose a channel id or number to open, and then select "Open Channel". To add a peer connection, input the opened channel id or number into the channel name of a new browser; then input the connection type into the appropriate box. A connection of the selected type will then be opened between the two browsers.
If an audio/video connection is selected, a prompt will appear to ask the user permission for accessing the corresponding devices; the user must allow access for the application to work properly. If the connection between browsers and web server is secure, browsers will remember user permission when accessing that website.
Multiple audio and video connections can be created by navigating the home page and joining channels from different browsers. If a data connection is opened, any user can send a text message or send a file to other users by using the appropriate web forms.
Information about completion time for operations related to MediaStream, RCTPeerConnection and RTCDataChannel is displayed in the console below the application. If "Sending timings to Server" is enabled in GUI, information will be sent to server and will be stored in text files named in the format "$channel_no.txt" where $channel_no is the channel number for that connection. Additionally if configured, those information can be stored in the database for further analysis. Currently, only experiments involving two peers can be inserted in the database.

Supported Browsers

Chrome 25.0+ (28.0+ for best performance)
Firefox 22.0+
Chrome 29.0+ on Android

Reference

[1] Alan B. Johnston and Daniel C. Burnett. 2012. WebRTC: APIs and RTCWEB Protocols of the Html5 Real-Time Web. Digital Codex LLC, USA.
[2] Socket.io http://socket.io/