This project is under heavy development. Its API is subject to major, breaking changes.
A peer-to-peer, rich-client web app library that uses HTML5 WebRTC and Web Workers to reduce reliance on central servers and enable greater decentralization by routing requests directly to peers.
Nodetron helps you easily create peer-to-peer applications that do more than just send chats or transfer files. Nodetron consists of a routing and discovery system with which developers can build rich client-side apps that control all user data locally. With Nodetron, all data validation and access permissions are delegated to and handled by the client. Developers are encouraged to then take advantage of IndexedDB, AppCache, and other HTML 5 APIs. In the future, Nodetron will feature tighter integration with those kinds of rich-client APIs.
In more detail:
Technologies used: WebRTC, socket.io, MongoDB, node-restify.
Note: only recent versions of Chrome and Firefox are currently supported
nodetron.min.js) scripts manually or use
bower install nodetron.
npm install nodetron.
npm install && bower installin the project root.
git submodule init && git submodule update --remote
--remoterequires git version >=1.8
npm -g install node-inspector
If you intend to run the
demo app, be sure to follow the submodule README instructions.
grunt all to run the server and the
demo client-side app, with livereload.
:<number>to specify how many demo client-side instances you want to run.
:debugto run node-inspector as well.
grunt:4:debugruns 4 demo client instances at ports 9000-9004 and runs node-inspector.
grunt client to serve the demo client-side app, with livereload.
:unitto run unit tests.
grunt server to run the server, with reloading.
:unitto run unit tests.
:debugto run node-inspector.
grunt e2e to run client e2e tests on Chrome (not implemented yet).
grunt cross to run client e2e tests on Firefox as well as Chrome (not implemented yet).
If you get a
Error: Cannot find module './build/Debug/DTraceProviderBindings' error, remove
restify from your local
node_modules folder and re-run
npm install in the project root.
Clients send 'discovery queries' to a central server/database. The server responds with potential matches. Clients then contact the matches directly over a WebRTC connection that is brokered by the server. Clients then freely exchange information. Clients specify what information they make publicly available for discovery on the central server. Clients are also responsible for granting or denying access over WebRTC.
The client-side WebRTC code includes a forked version of PeerJS (https://github.com/peers/peerjs).
The Nodetron server code is also a heavily modified fork of PeerJS's PeerServer (https://github.com/peers/peerjs-server). Thanks to their great work!