RAIDCDN Project @RAID CDN Developper

yu
4 min readJun 21, 2016

For more information about how to implement RAID CDN on your video site, please email our customer service: xfang@actiontec.com

0. Index

  1. Description
  2. Demos
  3. Implementation
  4. License

1. Description

RAID CDN uses web browser based P2P technology to break free from traditional CDN infrastructures. It is a hybrid solution of WebRTC, P2P, CDN, and hls for saving cost of video service provider. Drop one line of JavaScript on your video page, you are able lower the cost of your video delievery. No matter what kind of video, origin or CDN(s) you use — RAIDCDN can provide answers.

To provide an easy and straightforward way for how does RAIDCDN save bandwidth, we create this sample project to illustrate that.

RAIDCDN also offers a commercial CDN service, specifically designed for video delivery. For more information about how to implement RAID CDN on your site, please get in touch with us.

2. Demos

The first open browser fetches data from its original source.

The second open browser fetches part of data from the first open tab.

The third open browser fetches part of data from both first and secound open tabs.

The fourth open browser.

3. Implementation

We provide a VirtualBox Image for this demo in case you do not want to follow all the steps. You can:

a) Install VirtualBox from **VirtualBox Installation

b) Download image from Demo Image. Import and launch it using your VirtualBox

c) The login username/password is demo/demo. Defaulty you can log in without them

d) After it launches,

$ cd /home/demo/workspace/webRTC-CDN-raidcdn-sample folder $ http-server

e) Now the sample video streaming server is running with RAIDCDN gearing up. Visit its host 8080 port (http://localhost:8080) to see the magic of RAIDCDN

Alternatively, you can go through the whole process in your own environment

1. Sign up to RAID CDN.

Get instant access to your RAID CDN token. You will use it in 4.

2. Install Node.js From Node.js

For Ubuntu/Debian user:

$ curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash - $ sudo apt-get install -y nodejs

3. Install http-server

$ sudo npm install -g http-server

4. Clone this sample code, unzip it to any place, and modify the token by editting index.html:

<script>token = 'TOKEN VALUE'; trafficDisplay = true; </script>

replace ‘TOKEN VALUE’ with the token you registered on 1.

5. Enter the unzipped sample folder, and run your local video server:

$ cd webRTC-CDN-raidcdn-sample $ http-server

Done! Now the set up work is finished.

6. To experience it, please open your local browser and visit:

http://localhost:8080

You can play the video on your local video serer.

Then if you open a new tab on your browser, you will see the current video you are watching fetches video chunk from the previous open one. And if you open more tabs, you will find there are multiple nodes (current opened browser) which provide video chunks to the one your are viewing.

7. To view how much data RAID CDN helps you saved, please log in to http://accountsmgr.raidcdn.com/, click “Total” on left column and you will see:

which will illustrate your saving.

4. License

This sample is completely free for both non-commercial and commercial use.

Originally published at github.com. Please help to star the project, thanks.

--

--