Reputation: 937
I have a social network that is wanting to implement a chat room for a specific group of users. I am looking for a very simple non third party chat where preferably the user's name is automatically used in the chat based off of their authorized id that is used when they log into the site ( so auto sync logins ) If anyone knows of a VERY simple one where you just type in your name and chat, that would work as well.
Here is a visual example of what I am looking for. This is a screen shot used from a third party chat I used - functionality and visual wise its perfect, except that you have to sign in to their site to use it.
Upvotes: 2
Views: 682
Reputation: 42158
I know its a crappy answer, but I would build it myself. The hard part is the push from the server, I would check out http://socket.io/ for the client side, and some sort of non blocking server on the back end (node is by far the most hyped right now, but there are loads of options.), since long running persistent connections will bring most classic servers to their knees pretty quick. But once you have that down, the rest of it is pretty simple, and you have the benefit of tight integration with your app.
RESPONSE TO THE QUESTION IN THE COMMENTS: depends on what your platform is. For example, I know ASP.net will do 4 workers per core. So on a quad you get 16 workers that are serving all of your non static requests. So if you were on a 4 core server, 16 users with persistent connections would completely block anyone else from being able to hit the server. Ruby and python get a bit more complicated, but usually the number would be even lower. I honestly don't know enough about how php works at that level, but I would imagine the story would be similar.
Now, newer servers have a feature called asynchronous request processing, where instead of each worker blocking when in use, each working blocks only when they are actively sending or receiving. Because of that, persistent connections don't matter anywhere near as much, because it doesn't really matter how long the connection stays open, it only matters when you are actually doing something.
All that being said, from what it sounds like, Ians answer is probably more appropriate for your situation. But again, that is because jabber was designed specifically for persistent connections.
Upvotes: 1
Reputation: 2098
I've done this in the past by setting up a local Jabber server. There are at least a couple pre-built JavaScript clients that will get you started.
Upvotes: 1