Related Patterns

The Observer pattern relates to the other two event patterns documented within this book: the Event Monitor pattern and the Publish/Subscribe pattern. There are also mechanisms to ease some of the problems identified in this chapter, such as the need for a client to deploy a full Web Service environment. The following patterns relate to the Observer pattern:

Event Monitor: Clients use the Event Monitor pattern when there is no discernable event notification mechanism available on a target Web Service or when the available mechanism does not adequately fit the needs of the client.

Publish/Subscribe: The Publish/Subscribe pattern is an evolution of the Observer pattern. Whereas the Observer pattern relies on registration directly with a particular Web Service, the Publish/Subscribe pattern decouples the service that delivers notifications from the service that receives notification. This allows multiple services to send the same notification; it also abstracts the responsibility for event delivery and subscriber registration to a common class.

Faux Implementation: The Observer and Publish/Subscribe patterns are predicated on having a Web Service implemented by the client set up to receive event notifications. This is a heavy burden to place on potentially resource-constrained application environments. Fortunately, there are other lightweight mechanisms for registering and receiving event notifications that make it appear as if you have deployed a full Web Service environment.

Physical Tiers: The Observer pattern and the Publish/Subscribe pattern, as presented, do not plug into a stand-alone application. This is obviously a problem because the usefulness of the pattern implementations is limited. The Faux Implementation pattern indirectly addresses the problem because the listener becomes a part of the primary program. On the other hand, there are environments where self-encapsulated Web Services are best for observing event notifications. For these environments, physical tiers show how to connect the Web Service to one or more outside applications.

Web Service Patterns
Web Services Patterns: Java Edition
ISBN: 1590590848
EAN: 2147483647
Year: 2003
Pages: 190

Similar book on Amazon © 2008-2017.
If you may any questions please contact us: