+ 3
You have to think about your server architecture beforehand. Messengers are extremely high-load systems with millions of daily requests. Thatâs why your system should be extra reliable and have no downtime.
Try using Extensible Messaging and Presence Protocol (XMPP) as lots of messengers do today.
This protocol is used to organize instantaneous exchange of data between the users and XMPP servers. The protocol is decentralized, secure, and flexible. It can be used to transfer messages both in one-on-one context and in group chats.
XMPP server is called ejabberd. It is optimized for mobile needs, has little downtime, scalable, and friendly to high-load systems. Ejabberd has a great degree of customization and modularity. The server offers high security with SSL/TSL encryption.
To store pictures and other multimedia, checkout Yaws server written in Erlang programming language. The server is created for high-load systems and web applications with dynamic content. It is well-known for its capability to seamlessly handle a large number of concurrent processes.