Best way to create web instant messaging?

Want to create a web-based instant messaging system similar to www.chatzy.com The question is, what is the best way to do this?

Follow the Ajax path where I write a script that constantly pings and updates the database for u-talk?

Or play with XMPP?

If the answer is XMPP? I would appreciate any pointer to any online resource that describes in detail how XMPP can be used to create such services ... (Several searches were done through Google, but the results came into fashion)

I would use PHP, but I can also use Python if it offers the best solution for this.

thanks

+4
source share
3 answers

XMPP / BOSH

  • Now I will use XMPP / BOSH to write web IM. I found Prosody the simplest server that supports BOSH . Then you do not need to write any server code at all.
  • Then for javascript I would use strophe.js

Future

  • As Pablo said, you can look at the websites. But Pablo is misinformed about gmail. It does not use websites. The main drawback of web maps is browser support. This is the future, but not yet.

Wrong

  • the survey does not scale. I would not recommend it.
+4
source

Using AJAX for ping and updating the database is not a good option.

I suggest you read about WebSockets . This is a way to communicate with GMAIL (among other things).

+2
source

If you are looking for development using PHP and a little javascript, check out the Jaxl Framework for building web applications. http://github.com/abhinavsingh/JAXL

Use ejabberd / prosody as a jabber server, they are stable and scalable to provide sufficient bandwidth.

Websockets are recommended, but alas, not all browsers support them up to date.

+1
source

Source: https://habr.com/ru/post/1316031/


All Articles