kids encyclopedia robot

Client–server model facts for kids

Kids Encyclopedia Facts
Client-server-model
A computer network diagram of clients communicating with a server via the Internet

The client–server model is a way that computer programs work together. It's like a team where some programs, called servers, offer services or resources. Other programs, called clients, ask for these services.

Think of it like a restaurant:

  • The server is the kitchen that prepares the food.
  • The client is you, the customer, who orders the food.

Often, clients and servers are on different computers connected through a computer network, like the internet. But sometimes, they can even be on the same computer. A server computer runs special programs that share their resources, like files or web pages. A client computer usually just asks for these resources; it doesn't share its own. Clients always start the conversation, asking the server for something.

Many common computer programs use this model. For example, when you send an email, print something over a network, or browse the World Wide Web, you're using the client–server model.

What Clients and Servers Do

The terms "client" and "server" describe how programs work together in an application. The server program offers a function or service to one or many clients. The clients then ask for these services.

Servers are named based on what they provide. For instance, a web server delivers web pages. A file server lets you access computer files. The "shared resources" can be anything from computer programs and data to processors and storage devices. When a server shares these resources, it's called a service.

A single computer can be both a client and a server at the same time. For example, your computer might be a client when you browse the web. But it could also be a server if you're sharing files with friends. Communication between different servers, like when they share information, is sometimes called inter-server communication.

How Clients and Servers Talk

When a client asks for a service, it doesn't need to know exactly how the server does its job. The client just needs to understand the server's answer. They use a common "language" and set of rules called a communications protocol. This protocol defines how they exchange messages.

Clients and servers talk by sending messages back and forth. The client sends a "request," and the server sends back a "response." This is like a conversation where you ask a question, and someone gives you an answer. This message exchange is a way for different computer programs to communicate.

Servers can get many requests from different clients very quickly. A computer can only do so many things at once. So, servers have systems to decide which requests to handle first. To prevent problems, server software might limit how many requests it accepts. Sometimes, bad actors try to overload a server with too many requests. This is called a Denial of service attack.

If you're sending private information, like your password, between a client and a server, it's very important to use encryption. This scrambles the information so only the right people can read it.

A Real-World Example

Let's look at how online banking works:

  • When you use your web browser (the client) to access your bank's website, your browser sends a request to the bank's web server.
  • The web server might need to check your login details. It then acts as a client itself, sending a request to the bank's database server.
  • The database server finds your information and sends it back.
  • Another program, an application server, takes this data. It applies the bank's rules (like calculating your balance) and sends the result back to the web server.
  • Finally, the web server sends the finished information back to your web browser. Your browser then shows you your account details.

In every step of this process, one computer sends a request, and another sends back data. This shows how the request-response pattern works. When all the requests are completed, you see your banking information. This example also shows how different parts of a system can work separately but together.

Early Days of Client-Server

The idea of client-server communication isn't new. One of the earliest forms was in the 1960s. Back then, people would send a "job" (a task for the computer) from one place, and the computer would send the results back.

In the 1960s and 1970s, computer scientists working on the ARPANET (which was a very early version of the internet) used terms like server-host and user-host. A "host" is just any computer connected to a network. They used these terms to describe how one computer (the user-host) would send commands to another computer (the server-host) to get data back. This was an early example of a client-server transaction.

Client-Host vs. Server-Host

The terms client-host and server-host are a bit different from just client and server. A host is always a computer on a network. But "client" and "server" can refer to either a computer or just a computer program. So, a server-host is the computer that runs the server program, and a client-host is the computer that runs the client program. In the client-server model, the server computer is often dedicated to just serving.

The word "client" was first used in this computer sense in a 1978 paper by scientists at Xerox PARC. By 1992, the word "server" was commonly used by everyone.

Centralized vs. Distributed Computing

The client-server model doesn't mean the server computer has to be more powerful than the client computer. Instead, it lets any computer use the shared resources of other computers.

In the past, with centralized computing, a few very powerful computers (like mainframes) did most of the work. Simpler computers, sometimes called computer terminals, would just connect to these powerful central computers to do tasks. These simple computers relied heavily on the central server for everything.

However, as personal computers became cheaper and more powerful in the 1980s and 1990s, many organizations moved away from central servers. They started doing more work on individual "rich clients" (personal computers). This gave people more control over their own computer resources.

In the 2000s, web applications became much better. This, along with cheaper storage and new ways of building software, led to the rise of cloud computing in the 2010s. Cloud computing often uses the client-server model, where you access powerful services over the internet.

Client-Server vs. Peer-to-Peer

Besides the client-server model, another common way for computer programs to work together is called peer-to-peer (P2P).

In the client-server model, the server is usually a central system that serves many clients. The server needs enough power, memory, and storage to handle all the requests. Big systems often use load balancing to spread requests across many servers. This makes sure the system can handle a lot of traffic and stays available. Load balancing means smartly sending incoming requests to different servers so no single server gets overloaded.

In a peer-to-peer network, two or more computers, called peers, share their resources directly with each other. There isn't one central server. All peers are generally equal. Unlike clients in a client-server system, peers talk directly. In P2P, a special computer program helps balance the workload among all the peers. Even less powerful peers can help share the load. If one peer goes offline, its shared resources can still be available if other peers offer them. This means P2P systems can be very strong because they have many backup options.

Both client-server and peer-to-peer are ways that computers in a network can work together.

Images for kids

See also

Kids robot.svg In Spanish: Cliente-servidor para niños

  • Front and back ends
  • Modular programming
  • Observer pattern
  • Publish–subscribe pattern
  • Pull technology
  • Push technology
  • Remote procedure call
  • Server change number
kids search engine
Client–server model Facts for Kids. Kiddle Encyclopedia.