

Balloons.io: an awesome looking realtime chat on node.js - jondot
http://gravityonmars.github.com/Balloons.IO/

======
pssdbt
Live demo up here if anyone else was curious: <http://www.pssdbt.com:3000>

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).

~~~
fratis
It's also throwing a 404 error for modernizr. It's looking for it in
/rooms/js/libs/modernizr..., but it's actually in /js/libs/modernizr....

This'd all be easier to confirm, obviously, if they'd have set up a demo site.
Anyone else care to take a gander?

~~~
pssdbt
That's because they were using a relative reference, fixed it.

------
chetan51
This could totally use a live demo.

~~~
rglullis
Yes. But every chat application in node.js that has ever been presented in HN
faced the same fate of being brought down to a crawling pulp whenever it had
more than 100 or so concurrent users.

~~~
mickeyp
Which is a bit amusing, as I remember standalone IRC servers handling 40,000+
peak users with relative ease -- and that was back in the late 90s on
commodity server hardware.

~~~
will_work4tears
This makes me wonder, what is the difference in technologies? I never used IRC
to be honest, was it downloadable software or was it web based? (I'm not that
young I swear, I'll be 35 next week - I just didn't do chat)

~~~
moe
No need for the past tense, IRC is very alive!

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).

------
DigitalSea
I've yet to use Node.JS for anything yet even though I want too, it looks like
Node.JS is only being used for analytics and chat applications is that all it
is capable of or are people not fully using the power of Node? Balloons.io is
a beautifully designed chat app, better than that of any other Node chat demo
I've seen, nice one.

~~~
aaronblohowiak
>it looks like Node.JS is only being used for analytics and chat applications
is that all it is capable of or are people not fully using the power of Node?

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.

------
ajays
How scalable is this? I would think it's easy to put together something that
serves, say, 100 users simultaneously. But how well does this scale to 100K
users?

~~~
phillmv
>But how well does this scale to 100K users?

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?

~~~
blantonl
_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_ "

~~~
phillmv
Because the order of magnitude is insane.

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?"

------
rjsamson
My first thought was 'oh, another node.js chat app...', but I have to say, the
design is really slick - very cool.

------
a_macgregor
Found an interesting bug, you can inject JS code ... give it a try on
<http://www.pssdbt.com:3000> demo

Just type <script>alert('JS Injection for the win');</script> on the chat box,
it will execute for all members in the chat.

~~~
ricardorauch
We fixed it!

~~~
a_macgregor
Awesome

------
TazeTSchnitzel
What does "Twitter based" mean? It uses Twitter for authentication? Or it uses
bootstrap? Or tweets?

~~~
pssdbt
Authentication it sounds like: "Balloons uses easy-OAuth for authentication
with twitter. You can easily change this code to authenticate with Facebook,
for example, lets with Facebook."

------
rjsamson
Oh - and they might want to add .DS_Store to .gitignore :)

------
fratis
The readme isn't very well written. Would someone with Node.js/redis
experience be willing to write a more comprehensive installation guide?

------
halayli
The challenge in chat is really scalability. I see no mention about this.

How will it scale on 10 servers?

The UI is well executed.

