Lecturer: In this lecture, we will explore
the relationship between a client and a server.
Now, in this course, there will be a lot
of lectures in which we will be using two Linux machines,
and one will be acting like a client
and the other one will be acting like a server.
So I want to explain the relationship
through a real life example
that provides a clear understanding of the relationship
between a client and a server.
So let's look at example of McDonald's.
You place an order for a sandwich at McDonald's,
so your request will be something like,
"I would like to order a chicken sandwich, please."
Okay, so in this scenario, you are the client
because you are making the request, right?
Then McDonald's, who is serving in this context, responds,
"Here is your sandwich, sir."
So McDonald's is acting as a server
because it is serving the food at your request.
Beautiful.
Therefore, in simple terms, the entity making the request,
like you or the customer, is the client,
and the entity fulfilling the request,
like McDonald's, is the server.
Moreover, a server can serve multiple requests
for multiple things.
As you know, McDonald's doesn't only serve burgers, right?
It also serves fries, shakes, cookies, and so on.
If we see it in the context of computer science now.
Now we wanted to put that example
in a real computer science example.
A client could be a web browser, a mobile app,
or any software application that requests services
or resources from a server.
On the other hand, a server could be a physical machine
or a software program running on a machine
that provides services or resources to clients.
These services could include web hosting,
database management, file sharing, et cetera.
Please note both, client and the server are computers
running any kind of operating system.
Okay, now let's go to Wikipedia.
According to Wikipedia, a client is a computer
or a program that as part of its operation,
relies on sending a request to another program
or a computer hardware or software that accesses
a service made available by a server.
While a server is a piece of computer hardware
or software that provides functionality of other program
or devices called clients.
The client server relationship is basically how two parts
of a computer network talk to each other.
The client asks for things like data or services,
and the server provides them.
They use specific rules known as protocols like HTTP
or TCP/IP to communicate over different types of network,
such as the internet or a local network.
This setup is a key part of how distributor computing works,
allowing for efficient data exchange
and resources access across the network.
Let's look at the real life example
of a web browsing scenario where a user
accesses a website.
Okay, on the client side, the user opens a browser,
any choice of browser like Firefox or Google Chrome,
where the browser acts as a client,
and enters the URL of a website they want to visit.
The web browser sends an HTTP request to the server
hosting the website, requesting the webpage content.
Then the server, which is basically a web server,
receives the request, processes it,
and retrieves their requested webpage
along with any associated resources, images,
videos, et cetera.
Then the server sends back an HTTP response
containing their requested webpage and resources
to the client.
Then the web browser receives the response,
renders the webpage, and displays it to the user.
So the user interacts with the webpage like clicking links,
submitting forms, initiating for the request to the server,
and the process repeats.
Okay, I hope you have understood this simple explanation
of client and server relationship,
and I will see you in the next one.