node.js
Posted: Thu Oct 13, 2011 9:05 pm
Does anyone here have experience with node.js? I had heard the name over and over, but I was always getting a rather shallow, bland answer as to what it was: "It is server-side Javascript". That answer was rather unappealing to me, as I have always had my stylistic difference with Javascript and was in no hurry to change to it from PHP or .NET.
But now, after looking into it more (which was prompted after seeing about my 100th WebSocket server made in it, and almost no WS servers made on other platforms), it looks interesting! It really seems to have 2 different goals: to be a scalable web application server, and to be a real-time server (sockets, Comet, etc.). And the latter is by an event system rather than through threads. So part of node's entire existence is to be a real-time server! And Socket.IO just looks awesome! If WebSockets are not available, it starts rolling through other options automatically, from Flash sockets, to Comet, etc.
So maybe .NET or Java isn't the way to go to make complicated real-time online game servers to back HTML5 games. I started getting a bit concerned when I was reading how much you have to do on the server-side to ensure you can work with older WebSocket protocols. I don't know if that is straight-forward in another platform such as .NET or Java (I know it is possible, since both do have WebSocket servers, but I was not sure if it was the easiest way).
So does anyone have any practical experience or tips for using node.js? Are there any good development packages like WAMP is for PHP/Apache/MySQL? I picked up a book (Paktpub Node Web Development) and am planning on looking in to it. I may need to brush up again on OO Javascript, as I experimented with it a while back but have forgotten a lot about how to work with Prototypes, chaining, etc.
But now, after looking into it more (which was prompted after seeing about my 100th WebSocket server made in it, and almost no WS servers made on other platforms), it looks interesting! It really seems to have 2 different goals: to be a scalable web application server, and to be a real-time server (sockets, Comet, etc.). And the latter is by an event system rather than through threads. So part of node's entire existence is to be a real-time server! And Socket.IO just looks awesome! If WebSockets are not available, it starts rolling through other options automatically, from Flash sockets, to Comet, etc.
So maybe .NET or Java isn't the way to go to make complicated real-time online game servers to back HTML5 games. I started getting a bit concerned when I was reading how much you have to do on the server-side to ensure you can work with older WebSocket protocols. I don't know if that is straight-forward in another platform such as .NET or Java (I know it is possible, since both do have WebSocket servers, but I was not sure if it was the easiest way).
So does anyone have any practical experience or tips for using node.js? Are there any good development packages like WAMP is for PHP/Apache/MySQL? I picked up a book (Paktpub Node Web Development) and am planning on looking in to it. I may need to brush up again on OO Javascript, as I experimented with it a while back but have forgotten a lot about how to work with Prototypes, chaining, etc.