Computer Networks, OSI Model, Cookies
Introduction
Computer networks consist of interconnected computers, forming a system that enables communication, data sharing, and resource access among these devices.
How did it started?
The cold war was going on between the united states and Russia. They compete to launch the first satellite and Russia launched the first one and the united states wanted to be first in invention and research. It was an initiative by USAs ARPA, a research program. That began utilizing computers to address the issues they faced, particularly in networking, this initiative led to the development of computer networks. The ARPA Net has four places University of California(UCLA), the Stanford Research Institute (SRI), the University of California-Santa Barbara (UCSB), and the University of Utah.
Client Server Architecture
Client is usually a frontend or software that initiates requests to the server. Client can be computers or any device capable of connecting to a network and sending requests. A great example of the client-side is when you ask questions to ChatGPT. In this scenario, the web browser serves as the client. When you request data from ChatGPT, you're sending an HTTPS request to the server. The server then processes or searches based on the question you've asked, subsequently sending back an HTTPS response.
What are protocols?
Protocols are set of rules established by the Internet Society for us to abide by. One such protocol is the Transmission Control Protocol (TCP), ensuring that data reaches its destination intact without corruption. Notably the USA's ARPA employs TCP.
The User Datagram Protocol (UDP), on the other hand is utilized when not all data needs to reach its destination entirely such as with images or video calls.
Additionally, the Hypertext Transfer Protocol (HTTP) serves as a client-server protocol. It dictates the process of requesting data from a server and outlines how the server sends data back to the client. When the client initiates a request to the server it constitutes an HTTP request similarly when the server responds, it forms an HTTP response. HTTP operates as an application layer protocol.
Among the transport layer protocols, TCP (Transmission Control Protocol) and UDP (User Datagram Protocol) play key roles in managing data transmission.
How are computers/internet connected worldwide?
The worldwide network of interconnected computers is made possible through a vast system of undersea cables, often referred to as submarine communications cables or undersea cables. These cables are crucial for global communication, facilitating the transfer of data, internet traffic, phone calls, and more between different continents and regions.
These undersea cables play an integral role in the functioning of the modern internet and global communication enabling the interconnected world we live in today. If you're eager to dive deeper into the cables lying beneath the ocean's surface, take a moment to watch this informative video .
Internet is collection of Local area network (LAN), Metropolitan Area Network (MAN) and Wide area network (WAN).
A Local Area Network (LAN) is a network that typically spans a small geographical area, such as an office building, school or home. It connects computers, devices and resources within a limited area allowing them to share files, printers, and internet access.
A Metropolitan Area Network (MAN) covers a larger geographical area than a LAN but is smaller than a Wide Area Network (WAN). It spans a city or metropolitan area connecting multiple LANs or other MANs together. MANs are used to interconnect various local networks within a city, enabling communication between different offices or campuses of an organization.
A Wide Area Network (WAN) is a network that covers a broad geographical area potentially spanning across cities, countries or even continents. WANs connect multiple LANs, MANs or other networks together allowing communication and data exchange over long distances.
What is the OSI Model?
The OSI model (Open system interconnection model) consists of 7 layers of networking.
OSI has 7 layers
Physical layer deals with the physical connection between devices and the transmission of raw data over a physical medium such as copper wires, fiber optics, or wireless signals.
Data link layer handles the reliable transmission of data across a physical link. It ensures data integrity, manages access to the physical medium and provides error detection and correction.
Network layer is responsible for routing and forwarding data packets between different networks. It determines the optimal path for data transfer, handles logical addressing (like IP addresses) and controls congestion within the network.
Transport layer ensures end-to-end communication between devices. It manages data flow, provides error checking and controls data delivery reliability. It includes protocols like TCP (Transmission Control Protocol) and UDP (User Datagram Protocol).
Session layer establishes, manages and terminates communication sessions between applications. It handles session setup, maintenance and teardown allowing data exchange between devices.
Presentation layer is responsible for data translation, encryption and compression. It ensures that data exchanged between systems is in a readable format by translating between different data formats and handling data encryption/decryption.
The topmost layer of the OSI model is the application layer. On computer systems applications display information to the user via the UI. HTTP is one of many common application layer protocols.
Web protocols
Internet Protocols are of different types having different uses. These are mentioned below:
Sockets
Think of sockets as the communication doors or connectors that allow different programs or computers to talk to each other over a network. Just like a telephone has a receiver and a caller, sockets help applications send and receive information—kind of like opening a line for a chat between them.
When programs on different devices want to share data, they create a socket. It's like plugging in a phone—it lets them connect and start passing messages back and forth. These messages can be anything from a simple "Hello" to sharing files or even streaming videos.
HTTP
HTTP (Hypertext Transfer Protocol) is a client-server protocol that governs how information is requested and exchanged between a web browser (client) and a web server. Its the backbone of communication on the World Wide Web dictating how data is formatted and transmitted.
In the context of HTTP, the client is typically a web browser like Chrome, Firefox or Safari while the server is a specialized computer designed to store and deliver web pages, files or other content upon request.
Cookies
Cookies are unique strings stored on a client's browser. For example, when we visit a web application for the first time it sends a cookie. After that initial visit whenever we make subsequent requests to that application, the cookie is sent in the request's header. This allows the server to recognize that the request is coming from me as it checks its database to find the corresponding cookie information.
Cookies are stored on the browser and certain data related to the cookies is stored on the server. This way the server can identify the sender of the request. By leveraging cookies web applications maintain a sort of memory of past interactions with users enabling personalized experiences and authentication.
Following is a great free resource for learning about computer networks in detail:
the Computer Networking course
Feel free to connect with me through:
Subscribe to my newsletter
Read articles from Aayush kokate directly inside your inbox. Subscribe to the newsletter, and don't miss out.
Written by
Aayush kokate
Aayush kokate
Hello! I'm Aayush and I am a software developer and technical writer.