问题
I found this little gem about how to get SignalR and Rx to play nicely:
Rx and Reactive Tutorial
However as you might have noticed this only works when going from server -> client. Does anyone know how to go the other way around? I want my framework to be a bit more "message" based like NServiceBus and less RPC (which signalr standard examples tend to be).
The reason for this is the weakly typed world doesn't lend itself very well to RPC. On the server side I'd love to be able to put interfaces around the client calls, but I can't because the client may not even be OO and has no concept of contracts and interfaces.
So I'm hoping to turn everything into message based, with brokers in the middle via reactive, SOA services. Hopefully Reactive and DTOs will be the only dependencies in my code.
So does anyone know how this can be achieved?
回答1:
I'm glad you found the article valuable. It was just an example of how to push to browser clients, but SignalR will work with any number of end-points, including windows services using OWIN. In fact, the scale out solution for SignalR already integrates with the Azure service bus, so you're idea isn't that far off. You might want to check out Clemens Vasters post talking about the Azure service bus implementation for more information.
来源:https://stackoverflow.com/questions/17050086/signalr-and-reactive-combo