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 the most important thing is that they have yet to - the way content is delivered, or, more precisely, P2P CDN.
Why P2P CDN is a necessary step and how can everything work
(and what is it all about ?!) - we will look at all this in a post.
Introduction
Since the launch of the telegram, messengers have begun 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 hints that there is an instant messenger in front of us: the content can only be viewed 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, heavy content began to appear in the messengers - if you look at the telegraph channels - they are replete with photos, and recently video content. And all this content must somehow be delivered to the end user.
')
Problem
The severity of the content is the main problem that the messengers will have to solve, everyone decides it as it can, whatsapp (Facebook) pays for the server with your data, telegram tries to make ICO and go in the direction of the blockchain. But the main problem - the high cost of infrastructure - does not go anywhere, just a 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 are ready to consume more content, but either access is physically limited - (bad signal) or very expensive.
Decision
The solution to these problems is very simple and I would say “native” - P2P CDN.
Not for nothing, in the latest versions of iOS, Apple always keeps Bluetooth and Wi-Fi turned on by default, it’s not for nothing that Telegram stores gigabytes of cached media - all this can be used, having spent a minimum of development time - by uniting all users of a particular messenger into a huge Mesh network.
Mesh network is a type of association each with each, when all users of an application (for example, on a bus) form a single network in which information can be transmitted in isolation from a large Internet.
But how? what for?
In order to create a Mesh network on iOS / Android, you need to write a couple of lines of code - for this, there are ready-made frameworks from platform developers, there is a lot of useless offline messanger for communication in the forest or on an airplane in the play market / app store.
What can be transmitted through the Mesh network?
- Content in channels
- Messages User-User
- Any heavy content from the channel / chat / personal messages
How should this work?
Suppose the situation of a standard large city - you are on the metro in the morning and you are viewing a tape of news
memes , most likely on your list - not one channel but several. All the content you consume is downloaded via an Internet connection
(which can still be of very poor quality on the subway) . Moreover, you are not the only one on this train
(and 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) .
It doesn't sound optimal, right?
But this can be improved - suppose you enter the car not at the final station, but at the next one, but there are already people in the car and they have already read the same channels that you usually watch. As soon as you enter the car, the application will connect to the same application and start updating the 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 performance by downloading content only to 1 device via the Internet, transmitting networks to neighboring devices via Mesh.
But even this is not all - if you are in a place with a poor connection, and you need to give the document to your friend who is next to you, the instant messenger can find it and send the document via P2P network. What ultimately saves Internet traffic as you and a friend, and even the instant messenger!
Whitepaper as I see myself work messenger for P2PThe messenger keeps a list of all channels / chats with ID + keys, in a tree-like mode all the content that has been downloaded is stored, similarly with ID and signature keys.
Periodically, there is a poll of the broadcast on the presence of the nodes of your own network - the messenger network, with a successful finding, a comparison of the content between you and the neighbor takes place.
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 particular channel / chat) . If the found neighbor - from the list of contacts - you can make a full synchronization and send messages to it locally. If unknown, only synchronize heavy content.
As soon as the interaction between the nodes has been established, the available content is synchronized, if something is absent for subscriber A, B has A, B receives A from B.
When a new content arrives, the one who first received it, for example A, can send it to all network members (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, passing traffic between them.
Naturally, for unknown nodes, you cannot transfer these phone numbers, only the ID, and preferably 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 your key when downloading, updating it periodically. Thus - you can trust the content from your conditional neighbor on the basis that the content that he sends you has a corresponding signature, similar to the content received from the main server of the messenger.
With conversations and chat rooms exactly the same way - you need to have an Internet connection only to start communication (verification of encryption keys) - further interaction can be P2P - you will surely be assured that it’s your friend who receives the traffic.
A specific example of securely receiving content that you have and is needed by a user who wants to deannonimize 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 an apartment - your phone can see nearby devices. And now think that if all the devices that have the popular instant messenger installed, they will automatically create the same network, without any settings ...
Total
Let's summarize - above, I described how to do it with the help of a minor refinement of the messenger:
- Cheaper for the owner
- Increase its speed
- Make it attractive in countries with expensive / slow Internet
- Strengthen the blocking protection
- A new generation of P2P-oriented services.
- Make it possible to work partly without the Internet
But these are just thoughts, I really hope that Telegram / Whatsapp / any other large instant messenger will decide on such an adventure and we will finally turn the page of history, opening the head of the distributed Internet.
And something tells me that I am right and that this chapter will be started by instant messengers, not browsers or operating systems ...