top of page
Search

The Client-Server Model and the Internet Architecture Stack

  • Josh Donais
  • Sep 17, 2020
  • 2 min read

Client-Server model

A stateless server does not need to remember connections or other information about the clients. An example of this is an HTTP server. The server delivers the web page contents to the client (browser) when the user is finished viewing the page and closes it, the browser disconnects from the HTTP server. The HTTP server has no need (normally) to retain any information about the user.


An example of a stateful server (one that retains some information about connecting clients) is an FTP server. This server will log the IP address and/or user that connected to the server and all the files that they have downloaded. The stateful server would retain this information in a table who's key would be associated with that client.


There are some issues with retaining information indefinitely about clients. Out of memory errors, clients that don't disconnect, and other issues can be a problem that server administrators and program developers must resolve.


Network Protocols

The Internet Architecture Stack

A PDU(protocol data unit) is a generic term that refers to the grouping of data at each layer in the protocol architecture. Below is a table representing the stack. Each layer is separate from each other.

Physical layer - The PDU at the physical layer depends on the system. It can be bits, LEDs, lasers, etc.

Link layer - it is responsible for getting data to the next node in the network. The PDU are frames. Each frame consists of of a link layer header followed by a packet.

Network layer - It is responsible for routing packets from their source to a destination. The PDU are Datagrams.

Transport layer - It is responsible for ensuring reliability. After the packet has already reached the right host, it makes sure that the packets get to their right process. The PDU are segments

Application layer - It is responsible for the user interface


Static vs Dynamic Libraries

Object files created when compiling a C program can be used to create two types of libraries. A library is just a collection of related objects.

A program compiled with a static library is fast because the code from the program becomes part of the executable code. The program does not need to search for the library. The caveat is the program code becomes larger. The code for a static library is loaded even if it won't be used. I imagine if a program uses several libraries, these can become an issue.


Reflection

I was surprised to learn that an HTTP server is stateless and that cookies are used to keep track of some of the client data. I wonder if the HTTP-cookie combination is just a remedy to a need and that future web-content servers will be stateful and adopt a protocol that reflects the change. It could also be that by saving the client information on that client, servers don't have to worry about running out of memory, client connections, etc. It could be that the stateless server is the ideal way to handle web browsing.


To improve on the learning experience, I think it would have helped to visualize the whole process by breaking down one program I'm familiar with to see how it operates on each layer of the internet architecture stack

 
 
 

Comments


©2019 by Joshua A. Donais. Proudly created with Wix.com

bottom of page