Related Patterns


The two other patterns presented in this text that relate to events are the Observer and the Publish/Subscribe patterns. You can apply all of the event patterns on top of the existing Business Object, Business Object Collection, Business Process, or Asynchronous Business Process patterns:

Observer: Observers are a more natural representation of a notification model than the reliance on a client to mine your interfaces for state changes. Further, implementing the Observer pattern helps you regulate usage of your objects. In the case where you do not have many state changes, clients could poll your service too much. In the event that you change state quickly, a direct notification mechanism serves clients well so that they do not miss state changes. Whenever you can predict client interest in a particular state change, the Observer pattern is a worthwhile extension to your Web Service.

Publish/Subscribe: The Publish/Subscribe pattern is another event pattern variation that centralizes event publication and subscription responsibilities. The Publish/Subscribe pattern can facilitate observer- like event notifications, but it can also go beyond the observer to allow publication of events that do not correlate to a specific Web Service. The Publish/Subscribe pattern is common in applications that have dynamic aspects to them, such as the ability to add and remove services at runtime. Finally, the Publish/Subscribe pattern is valuable in scalable applications where registration with all of the objects that publish events becomes prohibitive.




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

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net