

Open Source Chat Server in Node.js with dynamic rooms - mlakkadshaw
http://chat.techcentroid.com/

======
i386
Not to be a killjoy, but isn't this the hello world of node projects?

~~~
mlakkadshaw
Yes it is. It's the first project I've created in node. EDIT: Only difference
form other hello world servers is that it displays online users and supports
dynamic rooms (Dynamic rooms are not working due to excessive traffic)

------
swiecki
It seems like it's really getting killed under the load. This also isn't the
first node project demo I've seen deployed that gets destroyed by a bunch of
people visiting it to check it out. Anyone have some tips for deploying Node
in a manner that your server won't just get destroyed? What's the point of
supporting 1000's of users in say, socket.io if most people's deployment
schemes allow for a max of say, 250 concurrent connections?

Any tips or explanations would be most welcome.

~~~
mcantelon
Be sure to use Node's cluster API
(<http://nodejs.org/docs/v0.6.0/api/cluster.html>) so each core on your server
gets utilized. Doesn't look like this, looking at the source, is doing that so
unless they're manually running an app instance on each core and load
balancing between them then they may be underutilizing their hardware.

Beyond that: using Nginx to serve any static assets
([http://stackoverflow.com/questions/5009324/node-js-nginx-
and...](http://stackoverflow.com/questions/5009324/node-js-nginx-and-now)) and
standard stuff like making sure everything's cached that should be, load
balancing, etc.

------
projectmeshnet
XSS Vulnerable. USE AT YOUR OWN RISK

~~~
tferris
Please explain

~~~
projectmeshnet
<https://github.com/lakkadshah/SImple-Chat-Server/issues/1>

<IMG """><SCRIPT>alert("XSS")</SCRIPT>">

------
Cushman
You're opening yourself up to a serious race condition by using a global
variable ('params') to share state across requests. The delay between the GET
and the socket connect could easily be seconds; under load, it will likely be
next to impossible to join the right room.

You probably want to use cookies (which socket.io helpfully supplies) for this
instead.

~~~
mlakkadshaw
Thanks, I'll look into it and release a update asap

------
lukencode
Similar open source app written in asp.net mvc + signalr: <http://jabbr.net>.
I believe the author has been working on getting it to scale on azure.

------
mappum
Seriously, limit the damn message rates. I can crash the server with one line
in the chrome js console.

~~~
mlakkadshaw
I'll be releasing an update soon, I've exposed sendMessage, I'll change it
into something like form submission and then extract the message from the
response.

------
halayli
The challenge in any chat server is how to scale it. The rest is easy.

------
mossplix
and the site title is still "Bootsrap from twitter"

------
mlakkadshaw
XSS Vulnerability fixed. Thanks guys

------
bcardarella
You should make use of Redis pub/sub

