An important understanding in the world of the “world wide web” is “client-server relation“. But what does it mean ? I would say it depends on the context it’s used in.
Short terms…. The “client” requests data, whereas the “server” acts on the requests made by the client.
In the next article i will do my best to explain this as simple as possible, but with some concrete examples.
Client – Server: surfing the internet (simple static website)
When you are online, using a web-browser to search the internet for information or entertainment or whatever the purpose may be, you are taking care of the role as client (formally, the web-browser). Every click on some link or image will send a request to the server (the webserver). The webserver responds to the request from the client by send back the requested page or file.
This scenario will formally, only work if the server contains all the software/hardware for the website or web based application. In the next example we’ll look at the multi-tier set-up, where things work differently.
Client – Server: visiting a dynamic website
A dynamic website commonly consists out of templates and files containing server-side languages like PHP, Java or ASP for instance. Let’s assume you visit a dynamic website, which consists out of an server (including file system) and database server.
In this scenario your web-browser will take care of the role client again. The client will send a request to the server (web-server), requesting a page because the title “HTML 5 will provide new elements” yelled for your attention and you decided to click on the hyperlink. After the server received the client’s request, it grabs the template and send a request to the database server to retrieve the desired content from the database. The server (web-server) now becomes a client. The database server retrieves the content from the database and send back a response to the client (web server). The server (web-server) send back a response to the client (web browser), containing the template including the database result.
In this example it’s clear your web-browser takes the role as client. The role as server has been assigned to the server (web server), as long as it send a response back immediately. But in this case, the server (web server) needs to send a request to the database server, which make’s the web server the client now, and the database server the server. After the data has been retrieved from the database it will be send back to the client (web server), and the server will send the merged data back to the client (web-browser).
Client – Server: Sharing files over IP (Internet Protocol)
There are lot’s of different ways and protocols which can be used for sharing files online in some sort of network. Often specific programs are used by the user (client) to anticipate with the concerned network.
In the scenario you are downloading some files from one or maybe more servers (other participants) at the same time, connected to the same network, you are the client again as you request the files and receive them as requested from the other participants (server(s)). However, lots of these networks rely on people who share the same files again (or in the meanwhile) after they received them from a server (client).
If you decide to share the received files with other participants, you play the role as server. In the meanwhile you can still download other files, but in that case, you take care of the role as server and client, as you request and respond at the same time.
Mail this!
- Comments (0)
- PingBacks (0)
- TrackBacks (0)




» Latest comments