I was hunting for node.js tutorials when I came across a what I thought was a node.js blog with tutorials, but it actually ended up potentially being better. NowJS is a node.js module that acts as an additional layer above socket.io (it requires socket.io to function). Its website claims it creates a "magic namespace" called "now" in your application that allows the client to read variables and call functions from the server, and the server to read variables and call functions on the client. So basically, it is cutting out all semblance of the web sockets, and simply acting as though the server and client are running in the same application on the same machine.
It sounds like it could massively cut down on the already fairly small amount of work to get web sockets running in Socket.io, and could allow the developer a lot more flexibility in how they want to organize and manage their web socket application.
I am not at a point with node.js where I could effectively test it and compare it to vanilla Socket.io. Has anyone used NowJS or heard of it? Does it deliver on its promises, and could it potentially be valuable to real-time multiplayer game development in HTML5 with node?
Real-time even easier with NowJS?
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Real-time even easier with NowJS?
The indelible lord of tl;dr
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Real-time even easier with NowJS?
Kinda surprised no one seems interested in this. It got me extremely excited when I saw it, but I understand some people have no interest in real-time MMO development, or have no interest in Node.js. If you do, however, this is a really, really cool module for node!
The indelible lord of tl;dr
Re: Real-time even easier with NowJS?
I am just getting on and i am really interested 
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Real-time even easier with NowJS?
Glad to hear it! If you are new to node.js, then I would suggest starting with Halls' node and Impact tutorial series. You don't necessarily have to use ImpactJS, and if that is the case, then you can just skim those parts to get to the node usage. However, it is a great engine, and there is already a lot of work going on in getting working MMOs up and running with a combination of node and Impact (a lot of pioneering by Halls and other members of the Impact community)! 
The indelible lord of tl;dr
Re: Real-time even easier with NowJS?
Fail to see any advantages over socket.io, and also possible security risks. The should have called it JSONP with Node.
Fighting for peace is declaring war on war. If you want peace be peaceful.
Re: Real-time even easier with NowJS?
Honestly I don't see the difference, watched the video on the site, they did a chat but I think that's possible just with socket.io.
Orgullo Catracho
- Jackolantern
- Posts: 10891
- Joined: Wed Jul 01, 2009 11:00 pm
Re: Real-time even easier with NowJS?
It is all possible with Socket.io. It is just easier and more flexible.
Chris: What do you think the security risks could be? Everything that is callable on the server must be explicitly put into the "now" namespace. This would be the same as setting up callbacks on the server for Socket.io web socket connections, which the user could spoof anyway. So using it, it seems to me that you would need the same security as a vanilla Socket.io application.
Basically, I felt its value could be in allowing more organizational decisions on the part of the developer, as well as cutting down on a lot of the boilerplate Socket.io code needed. I am still learning node.js, so maybe the value isn't there as much as I thought, but almost every Socket.io application I have seen have been organized in the same way. They also include a fair amount of boilerplate to set up each callback.
Chris: What do you think the security risks could be? Everything that is callable on the server must be explicitly put into the "now" namespace. This would be the same as setting up callbacks on the server for Socket.io web socket connections, which the user could spoof anyway. So using it, it seems to me that you would need the same security as a vanilla Socket.io application.
Basically, I felt its value could be in allowing more organizational decisions on the part of the developer, as well as cutting down on a lot of the boilerplate Socket.io code needed. I am still learning node.js, so maybe the value isn't there as much as I thought, but almost every Socket.io application I have seen have been organized in the same way. They also include a fair amount of boilerplate to set up each callback.
The indelible lord of tl;dr