Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Doubled-headed HTTP, via NodeJS and WebSockets
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.


Double-headed HTTP, via NodeJS.


Hydra makes it possible to:

  • Make browser-initiated HTTP requests to the servers.
  • Make server-initiated HTTP requests to browsers.

i.e. both the client and server can both make, and respond to, HTTP requests. In particular, HTTP clients running on the server can issue requests like

DELETE http://client16b759c4/item/78

to a NodeJS-powered HTTP proxy, and have the request tunnelled to the browser via a WebSocket.


At this point, Hydra is mostly a proof of concept. HTTP requests can be passed back and forth, and there's simple browser-based code for both HTTP servers and HTTP clients. WebSocket-tunnelled HTTP requests can't be chunked or streamed (in either direction), though the client can respond out of order (because messages have an id).

This has been tested in Chrome and Firefox. Chrome supports WebSockets natively; Firefox requires a Flash "shim".


  1. Download and install NodeJS.
  2. With npm, install the scylla packages: $ curl | sh # If you don't already have npm $ npm install $ npm install scylla
  3. Start the server: $ node demo.js External Httpd listening at Internal Proxy listening at 1 Aug 15:57:07 - ready - accepting connections
  4. Load (Using Google Chrome might be best.)
  5. You should see a page explaining how to:
    • Initiate requests on the client
    • Start a HTTP server on the client


Michael Stillwell

Something went wrong with that request. Please try again.