Client–server model: Difference between revisions

Content deleted Content added
m Reverted edits by 157.38.247.136 (talk) (AV)
No edit summary
Tag: Reverted
Line 1:
<code>
{{Short description|Distributed application structure in computing}}{{More citations needed|article (some sections)|date=March 2024}}[[File:Client-server-model.svg|thumb|250px|A computer network diagram of clients communicating with a server via the Internet]]
==== Computer code ====
</code>{{Short description|Distributed application structure in computing}}{{More citations needed|article (some sections)|date=March 2024}}{{IPAc-en|}}[[File:Client-server-model.svg|thumb|250px|A computer network diagram of clients communicating with a server via the Internet]]
 
The '''client–server model''' is a [[distributed application]] structure that partitions tasks or workloads between the providers of a resource or service, called [[Server (computing)|servers]], and service requesters, called [[client (computing)|client]]s.<ref>{{cite web|url=http://java.sun.com/developer/Books/jdbc/ch07.pdf|publisher=Sun Microsystem|title=Distributed Application Architecture|archive-url=https://web.archive.org/web/20110406121920/http://java.sun.com/developer/Books/jdbc/ch07.pdf|access-date=2009-06-16|archive-date=6 April 2011}}</ref> Often clients and servers communicate over a [[Computer networking device|computer network]] on separate hardware, but both client and server may be on the same device. A server [[Host (network)|host]] runs one or more server programs, which share their resources with clients. A client usually does not share any of its resources, but it requests content or service from a server. Clients, therefore, initiate communication sessions with servers, which await incoming requests.
Line 13 ⟶ 15:
Generally, a service is an [[Abstraction (computer science)|abstraction]] of computer resources and a client does not have to be [[Concern (computer science)|concerned]] with how the server performs while fulfilling the request and delivering the response. The client only has to understand the response based on the relevant [[application protocol]], i.e. the content and the formatting of the data for the requested service.
 
Clients and servers exchange messages in a [[request–response]] [[messaging pattern]]. The client sends a request, and the server returns a response. This exchange of messages is an example of [[inter-process communication]]. To communicate, the computers must have a common language, and they must follow rules so that both the client and the server know what to expect. The language and rules of communication are defined in a [[communications protocol]]. All protocols operate in the [[application layer]{{frac||}}]. The application layer protocol defines the basic patterns of the dialogue. To formalize the data exchange even further, the server may implement an [[application programming interface]] (API).<ref>{{Cite journal | last1 = Benatallah | first1 = B. | last2 = Casati | first2 = F. | last3 = Toumani | first3 = F. | title = Web service conversation modeling: A cornerstone for e-business automation | doi = 10.1109/MIC.2004.1260703 | journal = IEEE Internet Computing | volume = 8 | pages = 46–54 | year = 2004 | s2cid = 8121624 }}</ref> The API is an [[abstraction layer]] for accessing a service. By restricting communication to a specific [[content format]], it facilitates [[parsing]]. By abstracting access, it facilitates cross-platform data exchange.<ref>{{Cite journal | last1 = Dustdar | first1 = S. | last2 = Schreiner | first2 = W. | doi = 10.1504/IJWGS.2005.007545 | title = A survey on web services composition | journal = International Journal of Web and Grid Services | volume = 1 | pages = 1 | year = 2005 | url = http://www.infosys.tuwien.ac.at/Staff/sd/papers/A%20survey%20on%20web%20services%20composition_Dustdar_Schreiner_inPress.pdf | citeseerx = 10.1.1.139.4827 }}</ref>
 
A server may receive requests from many distinct clients in a short period. A computer can only perform a limited number of [[Task (computing)|tasks]] at any moment, and relies on a [[Scheduling (computing)|scheduling]] system to prioritize incoming requests from clients to accommodate them. To prevent abuse and maximize [[uptime|availability]], the server software may limit the availability to clients. [[Denial of service attack]]s are designed to exploit a server's obligation to process requests by overloading it with excessive request rates.