In my humble opinion, since you are starting, the interesting thing would be you do some more research to be able to offer this type of service to the public, which I believe will be your future. This business of "real-time", "instant messaging", etc .; is a bit more complex. Imagine Whatsapp, how long did it take to offer the call service, the one you call without having to pay, just over the internet. Well, we see that to date have not released video call, because it is basically because it is at least too complex. bla bla bla ...
But then, I would like to introduce you both Quickblox and Q-municate , father and son, united to make life easier for many people from many different places . They are projects of a chat application, file transfer, notifications; with everything already implemented and open source. With them you will find the complete API documentation for the REST API, and the Quickblox SDK for iOS, Android, and the JavaScript SDK. Plus a set of tutorials and code samples.
An enterprise application development and consulting and client-server solution that allows you to build more powerful and engaging applications more easily. QuickBlox has its own Amazon instances where it makes it available to small mobile or web developer developers to facilitate development. >
Q-municate, the child, is a tool that does all the integration for communication between your applications with different platforms.
Q-municate is a project of a chat application with a vast
range of communication features included (such as messaging,
file transfers, push notifications, audio / video calls).
link
Screnshots
Details
Good Luck !!! Good reading! It's worth it, believe me!