Hello everyone, once agin! Today, we'll take a look at internet protocols. Why? No idea to be absolutely honest, so lets get to it! First, on the low level, there are only 2 internet protocols, UDP and TCP. Both of them are certainly useful, so what is the difference between each of them? UDP is very, very basic protocol, which came out at similiar time as TCP did, and it only consists of few things. You create a socket on your system, and you connect to another computer, atleast thats the client side. The server side also has to bind the port, which can however be done by both parties, if you choose to do so. Then you simply close the socket agin, and done! So UDP is very simple to implement protocol, it preety much only consists of sending and recieving data. TCP on the other hand.. TCP is a little more complex protocol, mainly for realibility. It contains such things as connecting to the server, and making sure the message is successfully delivered. This is useful for example for knowing if the server exists, of if the request has been lost in transit. This all is kindof like trying to transport stuff over lets say, an airplane. UDP is like sending the thing by itself, with maybe a sticker for who does it belong to. TCP however would be more like a baggage, with a GPS tracker to make sure it has arrived, and with label for the airport to know some of its properties, etc. So with the UDP you don't even know if the package arrived until the server decides to send a response(this is called dropping packets). So, if TCP is advanced like this, why is UDP still even in use? Well, for various reasons. For example, if you only have 1sided connection(and those sometimes do exist), you cannot use something like TCP, but have to stick to UDP. UDP is also simplier to implement, and consumes more bandwidth(for the one sided connections can be crucial). But even trough these advantages, TCP is still used for majority of things because the reliability. Now, lets talk about more high level protocols. Lets say you are reading this post from a website, and propably my ftp server to be exact. The server uses HTTP(hyper text transfer protocol), however that isn't what you are seeing. If you check the protocol with something like wireshark, it will propably return HTTPS(hyper text transfer protocol SECURED). Thats because I am tunneling this trough cloudflare to my domain so not that many people know the address of the server itself. If you are reading this from the IP address directly, you will propably see the HTTP there. And what does the HTTP protocol consist of? It consists of the data lenght, status code, status string, headers and the payload. Little bit of terminology here, the payload is the actual thing you are trying to transfer over the network, not including the things protocol adds to it. Status code refers to a number, indicating if the request was done successfully, or what error(and on which's side) happened. You can find a nice list of these codes on MDN(mozzila developer network). The status string is the same, just a string version of it if more detail is required etc. Headers are also crucial part of the http protocol, and should be used to transfer small strings of data on top of the payload. This has been used alot for example for transfering passwords or security tokens to the server, etc. The lenght part is actuall often contained in one of the headers, and just contains the lenght of the payload(in bytes). Now, what is the HTTPS? Only different between HTTP and HTTPS is that HTTPS is an encrypted version of normal HTTP. That means as long as someone isn't infected with malware, they should be fine on public wifi(or even having just a hacker spoofing wifi from outside), or from any similiar attack. Its good to know that the HTTP request only contains the request data on the start, and nothing at the end after the payload finishes. Another similiar network protcol is FTP. FTP is a bit more complex, and thats why I will only cover the basics here. FTP is protocol for mainly transfering files, but not normal files like you would with HTTP, but more like for binaries, large files overall(over 2GB, which normal HTTP doesn't allow unless chunked). Its also good to say that in HTTP, you're the one whos downloading the data, and the website is propably using FTP too for managing the files from somewhere else. For my setup, I am using HTTP for distributing my blogs to everyone of y'all, and FTP to upload, and manage the files. And what does FTP stand for? File Transfer Protocol. Thats why instad of something like operations GET, POST etc. like in HTTP, FTP has operations such as DELETE, RENAME, UPLOAD, etc. FTP also supports infinite file sizes(as long as both parties can handle it, of course). Also good to note, that the HTTP connection for the HTTP is imidietly terminated after successfull file transfer, but for FTP the connection stays online until you close the FTP client or something similiar. Last protocol I will cover here, is SSH(SSHP). Secure SHell Protocol is protocol use for interacting with computers remotely, and to be exact with their terminal. SSH protocol doesn't have much to be interesting in, but like FTP, the connection stays on as long as you're connected to the server, or while your SSH client is running. For graphics you can also use VNC(S)(P) which is used to connect and control computers graphically. So, there are many protocols for preety much everything, but why? Why can't there just be one good protocol for everything? Well, because everything is specialized at something. HTTP is for lightweight packets from locations with any kinds of latency etc. and ssh on the other hand must maintain stable connection to the terminal on the remote host or else it might become unusable. So there cannot be best protocol. It also allows you to reuse existing protocols for anything you want preety much, because creating your own protocol can be pain to get working with all the infrastructure, etc. I am working on some review system for these blogs, so you might be able to give me feedback on these soon, lmk if you would be interested. Salute!