In a distributed system collaborating components may be running on different computers and communicating over a network or internet.
The most common distributed architectures are: pipelines, client-server, and peer-to-peer.
In a client-server architecture there are two types of component roles: clients and servers. Clients send requests to servers. A server satisfies the request and may return a response to the client. (By contrast, peers in a peer-to-peer architecture dynamically switch between the client and server roles.)
The interaction between client and server may be stateless (i.e. consisting of a single request-response interaction) or stateful (consisting of several request-responses in a single session, thus requiring the server to remember the state or stage of the interaction with each client.)
File servers that allowed networked computers to share a single file system were the first client-server applications.
Early famous examples of client-server applications included Telnet and FTP. These ran directly on the Internet.
HTTP is the client-server application that the WWW is based on:
Now multi-level client-server applications are common. Here's a typical web application stack:
Examples include:
· LAMP (Linux/Apache/MySQL/PhP)
· WAMP (Windows/ISS/SQL/ASP.NET)
· J2EE (Linux/Tomcat/MySQL/JSP/EJB)
·
Client/Server/RequestHandler
The Proxy Design Pattern allows programmers to add services to an existing server without modifying it.