Is layer 4 sufficient, or do we need something else?
With TCP or UDP we can do our data transfers between applications
In your opinion is it all good then or do we need something else?
→ a concrete example¶
the folder python/tcp-awkward-api
or
https://
or
http://
or

A lock 🔒¶
Nothing standard in my data exchanges 😵💫
I created my own logic
but it’s maybe certainly not in the eyes of others.
A bit of standardization wouldn’t hurt ...
By the way: data transfer ...¶
The big question that can arise is
in what format is it relevant to exchange data ❓
The OSI model does not really specify a data format other than saying it is binary 🤨
Layer 6 specifies things a bit in reality but it gives a fairly broad spectrum actually
😩 How do we do if we want to transmit
a packet of structured but heterogeneous data?
For example, a person’s information:
Name, First name, Date of birth, number of children, ...
JSON Serialization¶
Via Python 🐍 it’s easy!¶
import json
data = dict(name="jean", age=1)
serialized = json.dumps(data)
# serialized is now a stringimport json
serialized = '{"name": "jean", "age": 1}'
data = json.loads(serialized)
# data is now a dictionaryHigh level: layer 7 of the OSI model¶
This is where concrete things begin 🥳
Layer 7 = Application layer
Each "category" of application then specifies:
How communications are made between the client and the application
message format, expected content, ...
We talk about protocol, for example:
File transfer 📂: (S)FTP, rsync
Messaging ✉️: SMTP, POP, IMAP
Remote sessions: telnet, SSH
and...
