Getting Acquainted with Proxy Variants

Proxies are all around us; they're involved in most communication exchanges with web pages and throughout other non-Internet applications. Proxies come in many flavors, as I discuss in this section.

Remote

A remote proxy hides the physical location of the server. It implements the needed interprocess communication (IPC) to allow the client to interact with the server. You can further encapsulate the IPC by providing Forwarder-Receiver elements to the client and server, as I explain in Chapter 21.

Protection

You use a protection proxy to protect the server from the client. The proxy checks the access rights of every client that attempts to talk to the server. A common implementation of this kind of proxy is an access-control list.

Cache

In a cache proxy, the proxy is given a data area where it can hold results to speed repetitive accesses to the server. The cache proxy requires a strategy for various aspects of its work, such as what results from the server to cache, how often to refresh the cache, and what to do when the cache is full. The strategy must also account for cache invalidation when the server results have changed from what is stored in the cache. Web browsers are almost always cache proxies.

Synchronization

When it's important for only one client (or some finite number of clients) to access the server simultaneously, you should use a synchronization proxy. A synchronization proxy provides mutually exclusive access to the server. ...

Get Pattern-Oriented Software Architecture For Dummies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.