Reputation: 75
I'm trying to build a mobile messaging app like Whatsapp and don't know where to start. In the first place, I don't know how messaging apps send messages between users. What type of protocol do they use? Do they use websockets? Do they use some sort of long polling?
I mean what I really want to know is how the server works and is there a name to this sort of communication?
FYI, I was looking to try and build a messaging app with a Django
(something like django channels) server and React native
for the mobile app.
Thanks for reading.
Upvotes: 2
Views: 1387
Reputation: 691
Yes to create a chat application like messenger or WhatsApp you will need to use websocket, also a cache like redis If you want to create a chat backend with django and django channels you can follow this repository, this is pretty basic. You can use this repo to build a chat api, which you can use with a mobile app/desktop app as well as a web app
https://github.com/khan-asfi-reza/ChatAPI
This is a minimalistic Chat Api built with django, django rest framework, django channels.
And if you want something more extra like read/seen feature, this following repo will be best
https://github.com/Bearle/django_private_chat2
And for react native app, you can see the following repo, this codebase might be a bit complex for beginners
https://github.com/cometchat-pro/react-native-chat-app.git
Upvotes: 3