Messengers, it's time to take the next step


    In the last couple of years, messengers have changed the usual course of content consumption, whatsapp, telegram, viber , sorry. Now all the content is concentrated in them, the audience is growing at a wild pace, they have changed a lot, but most importantly - they still have a way to deliver the content, or rather P2P CDN.

    Why is P2P CDN a necessary step and how everything can work (and what is it all ?!) - we will consider all this in a post.


    Since the launch of the telegram, messengers began to incorporate the functionality of social networks and it is already very difficult to say where the social network is and where the messenger is, only one thing can hint that we have a messenger: the content can be viewed only in the application or the web version very limited. (The statement is valid for most instant messengers, including telegrams because the web version does not have all the functions).

    Thus, in the messengers, heavy content began to appear - if you look at the telegram channels - they abound in photos, and more recently, video content. And all this content somehow needs to be delivered to the end user.


    The severity of the content is the main problem that will need to be solved by messengers, everyone solves it as best as possible, whatsapp (Facebook) - pays for the server at the expense of your data, telegram - tries to make an ICO and go towards blockchain. But the main problem - the high cost of infrastructure - does not go anywhere, just the source of money for support is changing.

    But there is a second problem - countries with slow Internet and expensive Internet in any country: people can and would be willing to consume more content, but either access is physically limited - (bad signal) or very expensive.


    The solution to these problems is very simple and I would say “native” - P2P CDN.

    Not for nothing that in the latest versions of iOS, Apple always keeps Bluetooth and Wi-Fi turned on by default, it is not for nothing that Telegram stores gigabytes of cached media - all this can be used, and spending a minimum of development time by connecting all users of a particular messenger into a huge Mesh network.

    Mesh network is an association of each type, when all users of the application (for example, on the bus) form a single network in which information can be transmitted in isolation from the big Internet

    But how? what for?

    To create a Mesh network on iOS / Android now, you need to write a couple of lines of code - for this, there are ready-made frameworks from the platform developers, in the play market / app store there is a bunch of useless “offline messanger” for communication in the forest or on the plane.

    What can be transmitted through the Mesh network?

    1. Channel Content
    2. User-to-User Messages
    3. Any heavy content from channel / chat / private messages

    How should this work?

    Suppose the situation is a standard big city - you take the subway in the morning and look at the news meme feed, most likely on your list is not one channel but several. All the content that you consume is downloaded via the Internet connection (which in the subway can still be of very poor quality) . Moreover, you are not the only one in this train (but most likely the car) who watch the same channels or chats, it turns out that the same traffic passes through the same connection (wi-fi access point in the car) .

    Doesn't sound optimal, right?

    But this can be improved - suppose you enter a carriage not at the end station, but at the next one, and there are already people in the carriage and they have already read the same channels that you usually watch. As soon as you enter the carriage, the application will connect to a similar application and begin to update content through it.

    In other words - almost instantly you synchronize your news feed with the person who has already downloaded it. And in the future, the application can optimize the work by downloading content to only 1 device via the Internet, transferring via Mesh network to the neighboring device.

    But this is not all - if you are in a place with poor communication, and you need to transfer a document to your friend who is next to you - the messenger can find it and transfer the document to it via a P2P network. Which ultimately saves Internet traffic for both you and your friend, and even the messenger!

    Whitepaper how do I see the work of the P2P messenger
    The messenger keeps a list of all channels / chats with ID + keys, in the tree mode all content that has been downloaded is stored, similarly with ID and signature keys.

    Periodically, there is a survey of the air for the availability of the nodes of your own network - the messenger network, if you successfully find a comparison of the content between you and the neighbor.

    In fact, each node will provide a list of what it is subscribed to (preferably with the ability to disable such a function for a specific channel / chat) . If the neighbor found - from the contact list - you can perform full synchronization and send him messages locally. If unknown, just sync heavy content.

    As soon as the interaction between the nodes is established, the available content is synchronized if subscriber A has something missing and B has A - A receives it from B.

    When new content arrives, the one who received it first, for example A, can send it to all participants Networks (like multicast).

    Moreover, this scheme will work in a more classical form for Mesh networks - when there is also X between A and B - which is not subscribed to the same channel as A and B - it will simply be an intermediary, transferring traffic between them.

    Naturally - for unknown nodes, you can’t transfer phone number data, only an ID, but rather a temporary ID, indirectly associated with the ID inside the messenger.

    What about security?

    Despite the fact that you will receive content from strangers to you - it can be accurately verified - it is enough for the main messenger server to sign all the content with its key when downloading, updating it periodically. Thus, you can trust the content from your conditional neighbor based on the fact that the content that he sends to you has an appropriate signature similar to the content received from the main messenger server.

    With conversations and chats in exactly the same way - you need to have an Internet connection only to start communication (checking encryption keys) - further interaction can be P2P - you are guaranteed to be sure that it is your friend who receives the traffic.

    A specific example of the safe receipt of content that you have and is needed by a user who wants to de-anonymize you is described in this comment

    And where will this “Mesh P2P network” be ??

    If you are a resident of a big city - everywhere.

    In public transport, at work, and even at home in the apartment - your phone can see neighboring devices. Now think that if all devices that have a popular messenger installed will automatically create the same network, without any configuration ...


    Let’s summarize - above I described how to use it with a minor refinement of the messenger:

    • Cheaper for the owner
    • Increase the speed of his work
    • Make attractive in countries with expensive / slow internet
    • Strengthen lock protection
    • The new generation of P2P-oriented services
    • To enable partial work without the Internet

    But, these are just thoughts, I really hope that Telegram / Whatsapp / any other major messenger will decide on such an adventure and we will finally turn the page of history, opening the chapter of the distributed Internet. And something tells me that I'm right and it’s the messengers that will start this chapter, not the browsers or operating systems ...

    Only registered users can participate in the survey. Please come in.

    Do you support the idea of ​​a mesh network from your messenger?

    • 65.8% Yes 345
    • 34.1% No 179

    Also popular now: