📜 ⬆️ ⬇️

What IM architecture do you consider acceptable?

Hello everybody.
I seriously thought about the lack of a reasonable, safe alternative to Skype. Not even alternatives to the messenger itself, but the lack of protocols that would combine text messaging, multi-user chats, and guaranteed (with NAT punching and / or relay) voice, video and file transfer. It is quite difficult to develop such a protocol so that it satisfies everyone, so I would like to hear, firstly, the opinion of the community on this subject, and secondly, foreign users with Reddit.

I will briefly describe the advantages and disadvantages of some current architectures, if you have forgotten or did not know some moments. All architecture descriptions imply their safe implementation.

P2P
This model was built by Skype, now Tox, and many other less well-known instant messengers are doing. The advantage is that no servers are required (or close to it) to maintain the network, only initial nodes are required, as a rule, and (depending on the architecture) an authorization server. All communications occur directly from the user to the user, which, firstly, reveals the IP addresses of the participants, and secondly, it is completely unacceptable for mobile devices and mobile networks, due to high battery consumption and traffic. Among the shortcomings, it is also possible to note the lack of offline messages and synchronization of the message history without another node running under this login. Also, fortunately, not so often, P2P messengers fail to break through NAT, and communication directly becomes impossible. In this case, either the connection is not established at all, or the relay servers are used.
')
Server decentralization
This model is used in Email and XMPP. The most successful, in my opinion, architecture, which allows not to spend a large amount of energy on mobile devices because of just one long connection to the server; it lacks a single point of failure, there is the ability to synchronize history and send offline messages. Depending on the architecture, it can hide the sender's IP address. However, such a model requires your own / another server. If a large public server dies, then all its users lose the ability to communicate.
In server decentralization, P2P can be used to transfer files, for example.

Single server
Perhaps the most popular architecture, which is used by the overwhelming majority of mobile and desktop instant messengers. In the presence of a single point of failure, anonymity can be provided, the ability to use convenient identifiers, such as a mobile phone number, however, there is no way to check whether your data is stored properly, and there is no access to the source code of the server. The same Telegram, which is presented as protected, uses this model. One of the advantages should be noted always correct operation on mobile devices (push-notifications).

Source: https://habr.com/ru/post/231337/


All Articles