2

Will the Websocket Api implementation of HTML5 make node.js irrelevant? If not, what are the differences between the two ans where to use what?

2 Answers 2

4

Node.js is a server side, event based, asynchronous I/O framework.

HTML5 WebSockets a pretty much TCP sockets in the Browser, that's all they don't di much more then establishing a two way channel of communication.

For example, you would write your game Server with Node.js and then use WebSockets to communicate between your Browser based client and the server.

An example of such a Game (disclaimer, I'm the author of the project):
http://github.com/BonsaiDen/NodeGame-Shooter

To get an idea what Node.js does, I recommend that you watch some talks that are listed on our Node.js tag wiki.

Sign up to request clarification or add additional context in comments.

1 Comment

Any chance you know how to host all this on an apache server?
2

Actually, WebSockets makes Node far more applicable; a good number of the interesting server side implementations of WebSockets use Node.

In fact, a library that is growing very fast in popularity is Socket.IO. Socket.IO is a server-side (Node) and client side library that allows you to rapidly create interactive web applications. The client and server coordinate to pick the best communication mechanism available to both (WebSockets is the preference but falls back to long-polling). The client and server side Javascript library interface is very similar (and both are Javascript) so it's very easy to create web applications quickly.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.