Frage

I have been tasked to develop a mobile chat app that will run both on Android and iPhone devices. I will be developing the respective clients in their native languages. Where I am a bit confused is in the development of the server.

My intended approach is to use 'long polling' to retrieve messages from the server and a separate connection to send messages to the server using GET/POST (obviously, there is no need for this to be long polled). My initial intention was to use Apache & PHP?MySQL for the server, but after a bit of reading, I learnt Apache won't be able to survive when there are lots of concurrent connections. I also learnt Node.js can survive where Apache failed by its capabilities to handle a lot of concurrent connections. Though, I don't have any knowledge about Node.js but if it will work, I am willing to do a crash course on it.

I know 'long polling' isn't the best method, but I can't seem to understand how XMPP can work for me on this project.

Thanks a lot in advance.

War es hilfreich?

Lösung

XMPP is the best way. You can install openfire on server side and for android you can use asmack. For Ios you can use xmpp lib.These are best combination. Communication with server is done through ssl connection.

Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow
scroll top