Balloons.io: an awesome looking realtime chat on node.js
gravityonmars.github.com
gravityonmars.github.com
If you want to run it yourself on a public-facing server, you'll need to change the connection to Socket.IO on line 2 of /public/js/script.js to point to your server instead of localhost. I also had to edit /views/themes/default/room_list.jade and put the 'each room,key in rooms' bit inside of an 'if rooms' statement because that was throwing an error.
Also worth noting, nothing is filtered (you can send <script> tags for example and they'll run for everyone).
This'd all be easier to confirm, obviously, if they'd have set up a demo site. Anyone else care to take a gander?
Popular GUI-clients would be Colloquy on Mac, mIRC on windows and XChat on linux. Just download one and see for yourself; Freenode is a popular network for hackers of all kinds, QuakeNet is the network for gamers (and also happens to be the biggest with ~60k users online at any given time).
IRC is amazing. Servers are linked as leaves to hubs, or as hubs, linking to other hubs or leaves. If the network splits (one server goes down, breaking the tree) it can be quickly relinked to secondary or tertiary servers, restoring connectivity. For its time, and even to this day, it is an impressive protocol that is not only fairly easy to implement from a client perspective, but a very scalable chat server architecture.
More importantly IRC servers have a battle hardened scaling solution baked right in, based on the spanning tree protocol.
Anyone looking to write a scalable chat software would be well advised to study the evolution of IRC. Anyone looking to hack a scalable chat solution would be well advised to use a mature IRCd for the backend.
Citation: http://www.shortnews.com/start.cfm?id=27080
Edit: I hung out on DALnet back when twisted was still linked and when it got taken down the crush of the users, as the article mentions, rendered the network virtuall inaccessible. Goes to show what happens when you rely too much on one link.
Node is still immature, so it makes sense to use it in spite of the relative roughness only when it has a distinct advantage over other available technologies. Its ecosystem has also streamlined the building of server-push apps.
You can use node/express in lieu of rails or django, but it doesn't offer anything particularly interesting here. Analytics and chat apps tend to be built on persistent servers that have long-running stateful sessions, which the node ecosystem has focused on making easy... you could use EM or Twisted or Netty, but they aren't as shiny / low barrier to entry.
So, we are seeing people take advantage of the comparable strengths of a new technology that makes certain apps easier to build.
For everything else, you'd much better served by using Django/Rails/etc.
It wouldn't. Designing a system to handle 100k simultaneous users is hard, and a problem few people suffer from.
Why would you ask this question?
Because maybe he is looking to develop a chat system that can scale to 100,000 users? There are many instances where someone is tasked to look at a technology and understand how it scales.
Frankly, it would be helpful for you to tell us how "It wouldn't"
It's a) not a common problem, and b) is obviously non trivial with current technology.
The bandwidth necessary for 100k users would saturate many a pipe, and would immediately require more than one commoditized machine.
It's like saying "That's a cute little Prius you got there. How many semi trailers can it pull?"
I use a sharded approach where each room is assigned to a random node.js websocket server when the first person enters it, and it's unloaded when the last person leaves. Just spin up more websocket servers to scale.
We have a hybrid platform with the website running on Ruby on Rails (REE 1.8.7, Unicorn, fronted by Nginx), and the real-time interaction handled by Node.js. I can tell you that the RoR servers fall over LONG before the Node.js servers even begin to break a sweat.
edit: Link to Worlize if you're curious: https://www.worlize.com/ Our Node.JS WebSocket Library: https://github.com/Worlize/WebSocket-Node
How does it compare with Socket.io? I use Socket.io for Review19 - http://review19.com - and am always looking to experiment with new frameworks.. :-)
If you want WebSocket specifically, and don't care about falling back to long-polling techniques, or you want something that allows you to use true binary messages, look at a WebSocket library rather than an abstracted communications library like Socket.IO.
Just type <script>alert('JS Injection for the win');</script> on the chat box, it will execute for all members in the chat.
How will it scale on 10 servers?
The UI is well executed.