|
Page 1 of 2
Peer-to-Peer and Client-Queue-Client Architecture
Client-Server Architecture Compared with Peer-to-Peer and Client-Queue-Client Architecture
Client-Server Architecture
Client-Server Architecture, which is the model for Internet communication, separates client programs/machines from server programs/machines. These endpoints communicate through a network and are also known as called nodes, which are any device connected by a network. The clients send requests to the server every time it is instantiated. Client instances occur when an object or individual unit of runtime data storage is called into action from its abstracted class.
It is the instances that perform the specific work of requests. Requests are messages between objects and are sent to connected servers. Servers accept, process, and return requested information to the client over the same network that the request was sent. This interaction is described using sequence diagrams that are standardized in UML (Unified Model Language), which provides a simple visual for workflow and object modeling.
The most popular types of clients are web browsers. Web browsers work over the World Wide Web, WAN (Wide Area Network), and LANs (Local Area Networks). They allow users to interact with text, images, and other media (video, audio) on a web page and allow for navigation between pages or sites through hyperlinks. HTML (Hypertext Markup Language) formats web pages to customize appearance. The most popular web browsers for personal computers are Internet Explorer, Opera, Safari, Mozilla Firefox, and Netscape.
Servers come in different types as well. Some examples are web servers, database servers, and mail servers. Clients typically interact with users through a GUI (Graphic User Interface). They initiate requests and wait for responses. They are active, as opposed to servers, who are passive. Servers do not usually directly interact with users. There is a level of middleware that translates and manages requests between clients and servers on different platform or written in different languages.
Client-Server models share characteristics that will facilitate our discussion of alternatives.
A Client-Server Architecture that contains only a client and a server is known as a 2-Tier model. However, there are Multi-Tier models that contain more levels. Usually a 3-Tier model has some sort of middleware between the client and the server. 3-Tier models have three nodes: clients, application servers that process data for clients, and database servers that store data for application servers.
Multi-Tier or N-Tier models are more scalable because they distribute processing over multiple nodes. This improves reliability and performance through simultaneous load processing over several server nodes. However, N-Tier Client-Server models contain some disadvantages as well.
For example, the network must manage a greater load in general due to increased traffic. They are also more difficult to program because there are more devices that must communicate smoothly with each other.
Two alternatives to Client-Server Architecture are Client-Queue-Client and Peer-to-Peer Architecture. This article will describe each and then compare them to traditional Client-Server Architecture.
Client-Queue-Client Architecture
In Client-Queue-Client Architecture all endpoints, including servers, are simple clients. The server is located in external software. Client-Queue-client Architecture is also referred to as passive queue Architecture. It was developed to expand on traditional Client-Server Architecture. It developed from trying make one client a server for different clients, thereby multiplying potential usages for clients. Perhaps Client-Queue-Client Architecture is better understood through example, since it essentially follows the same logic as the Client-Server model described above.
For example, two web crawlers instantiated on two different machines can query each other if URLs (Uniform Resource Locaters) are indexed and known to the other machine. Web crawlers are programs or automated scripts that search the web methodically.
Search engines use spidering to make searches faster. Spidering is the technique used by web crawlers to copy pages visited during a search for later processing by a search engine. These downloaded pages are then indexed.
Client-Queue-client Architecture uses a passive queue to allow client instances to communicate directly with each other and refine their request from servers. Servers act as passive queues, which can be, for example, a relational database, also central to traditional Client-Server networks.
A passive queue allows one software instance to pass a query to another software instance. This last instance then communicates the query to the passive queue (database) and retrieves the response data in a scheduled manner. This response is transmitted to the server, which transmits it back to the original client instance and answers the client response. This Architecture developed to simplify repeated software implementations. It evolved into Peer-to-Peer Architecture, but is practically obsolete today.
|