Got a question for you … I’m currently working on a simple groupchat functionality for a webpage. It will only be available for groups so there’s no need for the users to specify a nickname or anything like that … the nicknames will already be known to the system since the users have to be already logged in.
Anyways it should just be a simple chat room for the whole group – no 1on1 private chats!
Question is: Would you consider it a good idea to have a look into Ajax Push (like here for example) or is this overkill for a simple group chat … don’t expect toooo many people to use it that much so maybe push is overkill and longpulling via jquery would be better (in that case – do you know of any really good tutorial for a longpulling chat-functionality?)?
Any tipps or other input is greatly appreciated! 🙂
best regards
P
Pull would be easier, but would be a bigger load on the server and obviously not quite as real-time. For a good chat experience, push is definitely better. You may be limited on your ability to implement it, though, depending on what technologies you have on your server and how much control you have over it. I’ve implemented a push (Comet) system a few times, and it’s definitely doable. It’s really up to you. It sounds like you’ve got an okay handle on the things you should be considering (number of users, difficulty in implementing, etc). The more users you have, the better it’s going to be to be using push because it’ll take a lot of strain off the server, and it’ll improve the interaction in the room.
Another thing to consider is what browsers you want to support. Supporting IE with push can be more difficult than supporting other browsers, but it’s definitely doable (I’ve supported as far back as IE6 before).
Finally, if you only care about supporting modern browsers, you may want to consider using web sockets instead, as that would be both easier than push and better performing.