Service Access and Configuration Patterns

This chapter presents four patterns for designing effective application programming interfaces (APIs) to access and configure services and components in stand-alone and networked systems: Wrapper Facade, Component Configurator, Interceptor, and Extension Interface.

Networked systems are inherently heterogeneous [HV99]. Therefore, a key challenge confronting researchers and developers is how to effectively design and configure application access to the interfaces and implementations of evolving service components. This chapter presents four patterns that address various aspects of service access and configuration:

To minimize redundancy in other patterns in the book, the Implementation section of the Wrapper Facade pattern contains detailed coverage of wrapper facades for threads, mutex locks, condition variables, and Sockets. Subsequent patterns, such as Reactor, Proactor, Acceptor-Connector, Strategized Locking, Active Object, and Monitor Object, use these wrapper facades in their own implementations. Therefore, we recommend you read Wrapper Facade first.

Other patterns in this section, particularly Extension Interface and Interceptor, can use the Component Configurator pattern to (re)configure various service roles into components in application processes without having to shut down and restart running application processes.

The topics of service access and configuration involve more challenges than are addressed by the patterns in this section. These challenges include:

Other patterns in the literature address these issues, such as Activator [Stal00], Evictor [HV99], Half Object plus Protocol [Mes95], Locator [JK00], Object Lifetime Manager [LGS99], and Proxy [POSA1] [GoF95]. These patterns complement those presented in this section and together describe key principles that well-structured distributed systems should apply to configure and provide access to the services they offer.