开发者

Implementing chat system with in Web browser

We want to have web based application to track the issues, knowledge management and chat system. Once the user logged in, user can chat with the service engineers.

We will be using Ajax for Chat within the browser. But the server-side we are not sure how to implement chat? The chat history must be saved for lateral viewing. When someone start chatting, the system must find the available service engineer and he will begin interfacing with customer.

any better approach to handle the chat system with in the web? We are OK to use Python, PHP, Ruby/Rails, Grails or .NET

We can use available systems, we need better interface/api to the available system so that it can be integrated withi开发者_如何学Gon our application.


Oh. If I have to implement something like this, I would take a XMPP (Jabber) server. Why to reinvent?

There are two servers that are pretty stable and feature rich: ejabberd (implemented in Erlang) and OpenFire (implemented in Java). Personally I prefer OpenFire since it easier to configure and Java developers are easier to find in case you want to extend its functionality... But it is a matter of taste.

For the web client there is a technology called BOSH. It allows you not to poll your server with requests every X seconds, but receive messages as soon as they are available. BOSH is a part of XMPP standard. There is a JavaScript library called Strophe JS that allows you to utilize BOSH on your web-page easily. There is an example implementation.

Furthermore, your stuff could be more happy with desktop IM clients rather than web-based. If you use XMPP you automatically get an ability to connect to the service using any existing IM client with Jabber support.

To get mentioned functionality to select available service engineer you could implement little server plugin and not the server as a whole. History is configurable in both servers.

So finally, my opinion: take already written and proven XMPP server, its BOSH using Strophe JS and a little plugin to select free service engineer.


We run an XMPP (jabber) server called OpenFire, which has a web-chat extension called FastPath. The one downside is that it forces us all to use the same client (Spark) or risk chat requests that reach non-Spark clients to vanish. But it is very customizable and you can capture just about any activity and stats.


Have you considered using Erlang? It would probably require very little work to get going.

I don't know of any complete systems for what you want, but Erlang is very easy to learn and there is an example of a chat server which you can probably modify to fit your needs.

Obviously clear it with the author first.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜