If there's no restriction or constraints on the tools, and you're free to choose, then I would suggest to use chat protocols like XMPP or SIP. This is what major chat app comply to. If you've to make Web Service based chat, which is not suggestible, as it'll be laggy, not quick, resource hungry and will take a lot of your time, you've to start from simple p-t-p chat. Its up to you.