Search code examples
javascriptclientnode.jsp2pdistributed-computing

Could Node.js run client side in Chrome with its native client (to be released soon)


Google Chrome's native client is soon to be released. http://blog.chromium.org/2011/02/native-client-getting-ready-for-takeoff.html Would this allow node.js to be run within the browser enabling distributed applications to communicate with each other without having to go through the server?


Solution

  • node.js is not pure Javascript code. There are parts of it written in C++ so this is unlikely.

    There are a couple of possibilities for distributed communication. One is to use the Websockets api in the browser to communicate with other browsers. The other one is to run node.js as a separate server process on the same machine as the browser.

    This second is a better choice for building a distributed application because it reduces dependence on the browser. Version 0.5.0pre of node.js now builds OK on Cygwin and it is possible to bundle up the essential components of Cygwin as a standalone binary to distribute to Windows clients. Older versions of node.js used to be distributed this way.