Simple web chat, multiple fronts
Hey I'm looking for a solution to this problem:
I need to create a simple near real-time web chat for a website with multiple fronts. web chat doesn't need any icons other than just nickname time and message.
the .net site works.
users who want to chat must be logged in. auth for allready processed users. that's the problem and another ppl can only watch conversations.
I thought, since its running on multiple fronts should be used by DB or WS, which makes a request to this WS every second and so on. from here i dont know what i am missing ... i thought ajax should send back the lastmassage id received to the web service and the web service will send all the latest messages to the user since the last message was received. it has to be done every second to make it look like real-time chat and it would be a hell of a load.
what do you guys think? and offers any ideas? and working solutions?
thnx rm
You can look at the XMPP protocol to accomplish such a task. XEP-0124 Bidirectional Streams over Synchronous HTTP (BOSH) defines how to create the illusion of a persistent TCP connection over HTTP, which can be useful even if you go without XMPP.
On the software side, you can use ejabberd as a server and strophe has a Javascript client. This all might be a bit overkill for your need, but it will give you a good idea on how to accomplish such a thing.
a source to share