2

I'm working on getting Microsoft Orleans "Grains" to put events onto a SignalR bus. There's an example project that does this, and I've linked to SignalR integration below.

It looks to me that this sample is using meta-data from the Azure Web and Worker roles to enumerate all the web roles, and explicitly publish messages to each one. It seems to me that if SignalR's backplane is configured properly on the azure web roles that this shouldn't be necessary -- one HubConnection/HubProxy should do it. Is that right?

In fact, when I look closely at the file linked to below, and see some of the odd logic in the Hub itself, I wonder if the sample functions as a rudimentary backplane.

I'm hoping someone with deeper SignalR experience can clarify this for me.

SignalR integration example: https://orleans.codeplex.com/SourceControl/latest#src/samples/GPSTracker/GPSTracker.GrainImplementation/PushNotifierGrain.cs

pettys
  • 2,293
  • 26
  • 38

1 Answers1

3

The sample is a rudimentary backplane, in that it sends the message to all web roles instances present in the deployment, and therefore doesn't require a complete backplane (such as Redis). However, it won't propgate client originated messages to the other servers.

A more complete Orleans backplane for SignalR is available here: https://github.com/OrleansContrib/OrleansR

Richard Astbury
  • 2,323
  • 18
  • 28
  • If you were going to use a standard Redis backplane, would the code to send a SignalR message from an Orleans Grain be the more straight-forward/intuitive approach? (Ie, just send the message to the public endpoint and let SignalR handle the distribution over the cluster.) (PS - watched your Pluralsite vids on Orleans - thanks for the content!) – pettys Feb 18 '15 at 21:08
  • 1
    yes, if you used a proper backplane (like Redis) then this should be handled for you. I hope the videos didn't send you to sleep! – Richard Astbury Feb 20 '15 at 10:28