Pagine

sabato 11 gennaio 2025

Strolling through informatics #14 – The etiquette of automata communication

by Enrico Nardelli

(versione italiana qua)

With this post we conclude the section dedicated to discussing the main elements of the processing scenario realized through the participation of multiple agents, now extremely relevant due to the ubiquity of the Internet, and called distributed computing. After the introductory post on this topic, we have addressed the three fundamental concepts of cooperation, synchronization and consensus. This closing post addresses a more technological but equally relevant aspect: communication protocols.

Under this name are included all the rules that define how two executors coordinate to exchange information. Since they are not flesh-and-blood people who, if they speak the same language and belong to the same social community, have learned throughout their life experience the rules for interacting with others, they must be instructed down to the last detail.

In a sense, communication protocols are like the various conversation etiquettes that exist in different social environments. In the world of royal courts, very widespread at the European level in the 18th century, it was expected, for example, that the king or queen would be the first to address those who were presented to them. During conversation one had to use appropriate terms and, when taking leave, one must not turn one's back. When our children are small we teach them to greet when entering an environment where there are other people and not to interrupt adults when they speak (or, at least, to do so in appropriate ways).

The communication protocols of informatics automata conceptually serve the same function and have played a fundamental role since the dawn of this technology.

They are basically made up of two parts. The first is a set of rules that specify the succession of interaction steps. A trivial example from normal life: first you greet, then you ask how things are going, then you make a specific question, then you give thanks, finally you say goodbye. The second is a set of rules that define the structure of the communications exchanged. Continuing the previous example, one can specify that the greeting be abbreviated and consist only of the greeting term ("ciao" or "hello") or structured with "greeting term" (e.g.: good morning) followed by "title" (e.g. doctor) followed by "full name" (e.g.: Paola Rossi).

Among the most famous modern protocols used in informatics, which even many non-computer scientists have heard of, there are:

  • HypertText Transfer Protocol (HTTP) which is the basis for exchanging web pages;
  • Transmission Control Protocol (TCP) which is one of the fundamental protocols for managing communications on the Internet;
  • Internet Protocol (IP) which is the protocol that allows different communication networks to exchange data to create the Internet we know;
  • File Transfer Protocol (FTP) which constitutes the basic protocol for transferring generic files from one machine to another on the network.

For example, the HTTP protocol provides, as rules specifying interaction, that whoever wants to receive a web page sends a request to the machine that owns it (neglecting the details of how this request is sent) and that such machine responds with the page or an error message. Regarding the structure of the communications exchanged, both the request and the response have a textual format, that is, they are represented through ASCII encoding (we talked about this in the post on data representation).

The request must have, simplifying, the following structure:

  • a request method (chosen from a predefined list),
  • a page address (the precise term is "uniform resource identifier" = URI),
  • the protocol version indicator,
  • any additional information (these are the request headers),
  • a message body (which can be empty).

The response must have the following format:

  • a status line, which contains a 3-digit code that characterizes the success of the response or an error condition (the famous "404 code," which almost everyone will have encountered at least once in their Internet browsing experience and which corresponds to the "page not found" situation, describes precisely an error condition) or intermediate situations that we do not address here,
  • additional information related to the type of machine that responds and the type of content returned (these are the response headers),
  • the content of the response (obviously in case of success).

With the next post we will open the treatment of a new theme, that of virtualization, which has always been present in informatics since its beginnings, but which recently has experienced, in the form of cloud technology, an unprecedented explosion.

[[The posts in this series are based on the Author's book (in Italian) La rivoluzione informatica: conoscenza, consapevolezza e potere nella società digitale, (= The Informatics Revolution: Knowledge, Awareness and Power in the Digital Society) to which readers are referred for further reading]].

--
The original version (in italian) has been published by "Osservatorio sullo Stato digitale" (= Observatory on Digital State) of IRPA - Istituto di Ricerche sulla Pubblica Amministrazione (= Research Institute on Public Administration) on 8 January 2025.

Nessun commento:

Posta un commento

Sono pubblicati solo i commenti che rispettano le norme di legge, le regole della buona educazione e sono attinenti agli argomenti trattati: siamo aperti alla discussione, non alla polemica.