Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What technologies are available for a publish/subscribe model using .NET?

I'm currently working on an application where one component of the application needs to interact with multiple other system components based on certain events. These events occur based on many different triggers... some events are caused by a user's action where other users need to be notified, some events are time-based, and other events are based on a change in the state of the object.

Based on what I've looked at so far, it sounds like the cleanest way to decouple the application components is to set up a publish/subscribe model where my objects in the component publish events that other interested application components can subscribe to.

I've seen nServiceBus, and for "vendor-lock-in" reasons I cannot use .NET Services in Azure. Are there other technologies available? Is there a different approach that I should be considering?

Edit - to be clear, this is a web-based high volume application. The application is ASP.NET MVC and the MVC application is communicating with multiple WCF services for its data.

like image 432
mkedobbs Avatar asked Dec 09 '09 20:12

mkedobbs


1 Answers

WCF definitely is capable of handling pub/sub scenarios - and will be much more once .NET 4 with the new WCF Azure relay bindings is out.

For now, check out these articles on the topic:

  • What You Need To Know About One-Way Calls, Callbacks, And Events
  • Design Patterns: List-Based Publish-Subscribe

For the future Azure-based pub/sub messaging using the .NET Service Bus, see these articles here:

  • Service Bus in Azure
  • Microsoft Azure .NET Services
  • Clemens Vasters: Azure: Microsoft .NET Service Bus
like image 61
marc_s Avatar answered Sep 24 '22 02:09

marc_s