tags:

views:

71

answers:

3

Want to build an web based Instant Messaging system similar to www.chatzy.com The question is what is the best way to go about it?

Go soley the Ajax way, where i write a script that continually pings and updates a database for u conversation?

Or play around with XMPP?

If the answer is XMPP? i would appreciate any pointer to any online resource that details how XMPP can be used in building such services...(Done some couple of searches via google but results came in vogue)

I would be using PHP, but can use Python too, if it offers a better solution to getting this done.

Thanks

+1  A: 

Using AJAX to ping and update a database is not a very good option.

I would suggest you reading about WebSockets. It's the way GMAIL's chat (among other) work.

Pablo Santa Cruz
Keep in mind that the WebSockets protocol is still subject to change. And not many browsers support it yet (only bleeding edge), so you'll need to use some kind of fallback: http://github.com/gimite/web-socket-js Generally that would be the way to go, though.
igorw
+3  A: 

XMPP/BOSH

  • Right now I would use XMPP/BOSH to write web-based IM. I found Prosody the easiest server that supports BOSH. Then you don't need to write any server-side code at all.
  • Then for the javascript I would use strophe.js

The future

  • Like Pablo pointed out you could look at websockets. But Pablo is misinformed about gmail. It does not use websockets. The major drawback of websockets is browser support. It is the future, but not yet.

Wrong

  • polling does not scale. I would not recommend it.
Alfred
We use ejabberd as our server, it also supports BOSH out of the box. We also wrote our own javascript client based on Strophe but http://www.ijab.im/ looks to be a good alternative if you want an off the shelf client.
Ollie Edwards
A: 

If you are looking to develop using PHP and little javascript, checkout Jaxl Framework for building web applications. http://github.com/abhinavsingh/JAXL

Use ejabberd/prosody as jabber server, they are stable and scalable enough to give you enough throughput.

Using websockets is surely recommended, but alas not all browsers support them till date.

Abhinav Singh