How do I create own chatting server on shared hosting?
Ofcourse, if you plan on developing an application which is primarily used for Chatting, then you would want notifications support. GCM/Parse can do that trick. They are not only used for simple notifications You can build an entire chat application just by using GCM. You could have a look at this for an idea. It is easy and simple.
If you don't want to use GCM or anything else and want to handle the chat part for yourself, then you should know how Network Sockets work on Android. You could create a socket connection where your server acts as a Gateway. You could have ID for each user and when you have to create a chat, you could send an info to the Gateway that the user of ID (X) wants to connect to user with ID (Y). A dedicated socket could be created and the data could be sent and received on real time. I would say this is more faster and efficient for real time data transfer but a lot of work is required on the Gateway side. You could use your own server for this purpose (be sure that you have high spec server(s) if you are planning to compete with WhatsApp). This is more reliable than the GCM counterpart.
You would need to know some programming language used in the server side. Java, ASP .NET,PHP,Python,RoR or anything for that matter would do the trick. Find out which one is best for you based on your requirements and your comfortability.
WhatsApp has its success because they provide better UI/UX than any other chat applications out there. It easy to use and faster to initiate a chat. You would want to know more about UI/UX for the mobile OS you are developing for. Having Material design on iOS isn't going to look good (my personal opinion)
You could develop the application with a single server for now. But it isn't going to do anything good like WhatsApp. You would need a multiple number of redundant servers if you wish to provide for more users. So, if you are developing a chat application, be sure that you are developing with scalability in mind.