📜 ⬆️ ⬇️

Distributed Network Messaging Protocol - Well Forgotten FTN

Once upon a time there was FTN technology aka FidoNet. She still lives somewhere on dusty system builders, but when the Internet in Russia was small, it was a very popular messaging technology.

In short, I decided to cross FTN and IRC technologies, but at the same time automate all possible settings, reducing the participation of an ordinary user to specifying the starting node for connection, and the node operator to confirming reception of the connected person. Everything else makes the computer. In this case, no passwords, no routing tables, lists of nodes and other Gimor. Rather, you can manually configure, but not necessarily.

Network layout
')


For this, we had to come up with a new messaging protocol in a distributed network - DNMP, which allows us to build distributed information exchange networks with the following features:

- There are two types of participants in the network: clients and nodes. Nodes form a network between themselves and provide various services. Clients connect to nodes.

- The network is decentralized, there is no single central node. Each node is fully autonomous and independent.

- Automatic routing of messages between nodes of one segment based on data on the availability of other nodes.

- Messages contain a list of nodes through which they passed.

- Some types of messages should be stored on the end node and can be requested by the client of this node.

- The protocol is not tied to any hardware or software implementation of the communication channel. Any method of data transmission in packets from 80 bytes to 4 GB can be used.

The format of a network message (data packet) was developed, allowing to transmit information of any type and complexity, and at the same time be simple and convenient. A network message consists of a header, a parameter section, and a data section. The header contains the message type, sender and recipient addresses, time stamp. The parameters section contains arbitrary text parameters in the form name = value. The data section stores arbitrary data. When passing through several nodes, Shinbai are added to the end of the message — identifiers of the passed nodes.

Network package schema

When connecting, no logins and passwords are used. Authorization is carried out with an encrypted key, the key is generated automatically upon manual confirmation of the participant’s acceptance into the network. In this case, the participant’s passport marks the node that accepted it into the network. Automatic registration of participants is also possible, it depends on the network policy and the specific site.

There are services in the network - programs that implement various user functions, such as:
- short text messaging
- messaging and files
- archives, forums, blogs
- data exchange in real time (sound, video)
Services work online (request-response), or by subscription, when information is sent to all subscribers of the service, without the need for a request. Services use a common message format, without the need for encapsulation

All this today is well documented and implemented in the form of a “test bench”. In fact, the implemented functionality is similar to the Jabber protocol, but at the same time it is an order of magnitude more economical in traffic and effective in routing and parsing. And the functionality of the network subsystem is close to Skype.

The abbreviation DNMP is difficult to memorize and pronounce, so the technology is called Talaria - these are winged sandals from ancient Greek gods.

Prior to this was the working name Grouper (Gruper, Stone Bass). Grouper - it symbolizes. In addition, stone perch can be hermaphroditic, which is similar to the ideology of the combined client and server. And in general, cool fish. But it turned out that this name is already used by other network projects. Therefore, the technology was renamed to Talaria, and I did not rename the test stand.

But that is not all! There are documented but not yet implemented features:

Inside the network, the client has a passport - a set of client information that migrates between nodes if the client connects to another node. The passport contains both basic information about the client (address, GUID, name) and additional information (arbitrary information, a list of contacts, subscriptions to services, and undelivered messages.

To regulate the network is a system of objective and subjective ratings. Objective ratings are compiled automatically and reflect the speed of data transmission and processing, the level of communication errors, violations of standards. Subjective rating is set manually. Participants with a low rating are limited in opportunities, up to a complete exclusion from the network. The priority of network messages is determined by the type of message and the routing rules of the site.

The commercial version of the protocol with improved protection includes:
- Protected version of a network packet - with an extended time stamp, checksum, digital signature, compression and encryption of content, delivery confirmation.
- More stringent validation of nodes and points, separate sets of keys for each pair of nodes, centralized network management.

Project documentation (CHM):
irchat.ru/page.php?id=105&a=dl

Sources on the project tracker:
svn.irchat.ru/browser/trunk/Grouper

The project is being developed on Delphi 7 using multiplatform libraries and components, and can be easily transferred to Lasarus / FreePascal. It is possible to rewrite in C / C ++ too, but I will be very bored without VCL.

Curious can download a working test version from the source folder and experiment. Here are the files you need:

 * .exe - point (client), node (server), monitor
 * .bat - to run with different settings
 /data/*.* - settings folder

Grouper small instructions for use:
irchat.ru/forums.php?m=posts&q=77

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


All Articles