O'Reilly logo

Programming WCF Services, 3rd Edition by Juval Lowy

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Publish-Subscribe with Discovery

You can also use the mechanisms of discovery and announcements (presented in Appendix C) to provide yet another way of implementing a publish-subscribe system.

Unlike all the techniques presented thus far for supporting the publish-subscribe design pattern, a discovery-based solution is the only publish-subscribe case that requires no explicit steps by the subscribers or administrator. When utilizing discovery, there is no need to explicitly subscribe either in code or in the config file. In turn, this significantly simplifies the deployment of the system and it enables great volatility in the presence of both publishers and subscribers. You can easily add or remove subscribers and publishers without any additional administration steps or programming.

When taking advantage of discovery for a publish-subscribe system, the subscribers can provide a discovery endpoint so that the publish-subscribe service can discover them, or they can announce their event-handling endpoints, or they can even do both. However, the likelihood of supporting both is low. Announcing subscribers is very much akin to the transient subscribers presented previously. Announcing subscribers is a straightforward way for a running live service instance to receive events. However, unlike transient subscribers management that relies on a fragile list of duplex proxies, susceptible to timeouts and other communication failures, the framework I will present next constructs the proxies ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required