Total Pageviews

Sunday, 7 February 2016

Run HTTP server over UDP with Node.js for P2P and Peer Web

HTTPP - Run HTTP over UDP and Bring Web in Peer or P2P styles.

It consists of four modules: udt.js, httpp.js, udts.js, httpps.js, that keeps the same api like net.js/http.js/tls.js/https.js.
It's simple to use node-httpp:
1. replace net with udt, http with httpp, tls with udts, https with httpps when require net/http/tls/httpps modules.
2. do the rest as http.
To build it manually, clone the repository and checkout v0.8-httpp branch firstly, then do steps as below.

Features

  • Run http and https over udp, taking udp high data transfer performance
  • Configurable Congestion Control
  • Per-socket network performance monitor
  • Per-socket bandwidth limitation
  • Multiplex connections on single udp port, saving system resources
  • Extend client/central server style web service transparently
  • Easy to use API, reuse existing http/web and node.js technology
  • Support windows/linux/OSx, RaspberryPi, Android

TODO

  • Support iOS, WP8
  • Make node-httpp as Node.js module instead of fork
  • Add more test cases
  • Improve documents, RFC draft

third-party source

Evented I/O for V8 javascript. Build Status

To checkout the sourcecode:
git clone https://github.com/InstantWebP2P/node-httpp.git
git checkout v0.8-httpp

To build:

Prerequisites (Unix only):
* Python 2.6 or 2.7
* GNU Make 3.81 or newer
* libexecinfo (FreeBSD and OpenBSD only)
Unix/Macintosh:
./configure
make
make install
Cross compile for Raspberry Pi:
setup toolchain env first, then
source cross-compile-pi.sh
Cross compile for Android:
setup Android NDK env first, then
source android-configure NDK_PATH
make -C out  
If your python binary is in a non-standard location or has a non-standard name, run the following instead:
export PYTHON=/path/to/python
$PYTHON ./configure
make
make install
Windows:
vcbuild.bat

To run the tests:

Unix/Macintosh:
make test
Windows:
vcbuild.bat test

To build the documentation:

make doc

To read the documentation:

man doc/node.1

Resources for Newcomers

from https://github.com/InstantWebP2P/node-httpp