Is there such a thing as a dektop application event aggregator, similar to that used in Prism?
The event aggregator in Prism is great, and allows loose开发者_开发知识库ly coupled communication between modules within a composite application. Does such a thing exist that allows the same thing to happen between standalone applications running on a user's desktop?
I could imagine developing a solution that uses WCF with TCP binding and running inside Windows Process Activation Service. Client applications could subscribe or publish events to this service as required and it would ensure all other listeners get notified of events as appropriate. Using TCP would enable event messages to be pushed out to clients without the need for polling, ensuring messages are delivered very quickly.
I can't help but think though that such a thing would already exist... Is anyone aware of something like this, or have any advice on how it may be best implemented?
At a fundamental level, MSMQ, provides this kind of service, though without the neat programming model that Event Aggregator has. Moving up the stack, WCF is able to use MSMQ as the transport for its messages, and provides an easier to use API.
Also take a look at the various Message Bus frameworks that exist in .Net:
- MassTransit
- NServiceBus
- Rhino Service Bus
From a brief glance, Rhino Service Bus looks the most likely to provide an experience similar to Event Aggregator.
精彩评论