Last post Apr 27, 2015 07:46 AM by Anders Borum
Apr 27, 2015 07:46 AM|Anders Borum|LINK
I am thinking of using SignalR to transmit streams of time series data from on-premises to Azure cloud services. I've used SignalR previously and have good working knowledge of the available APIs. This question revolves around whether I should use groups
in SignalR to identity streams (e.g. using a shared hub) or establish specific persistent connections / channels.
The number of messages is estimated to reach about 2500 messages/s per server (100 devices / units each having 25 sensors on average). A server receives all sensor data from each device - so there's no need for shared server state (back planes).
On the server, streams are mapped to observables using Reactive Extensions. A range of observers compose over / subscribe to the observables to provide real time analysis services - e.g. standard deviations over time and other statistical requirements (if
anomalies are detected, events are emitted and so on). Also, streams are queued for storage in parallel. Some of the streams are joined
I'm thinking that it's more efficient to compose a specific endpoint for each sensor, rather than having a filter / "where clause" on a generic endpoint (i.e. method in a SignalR hub) that uses a sensor ID on the message to route to a specific group (or
observable). Or, in other words, a design that reduces the requirement of SignalR having to look up a group for each incoming sensor value.
It might be pre-emptive optimization - regardless, I think it's a quite interesting question.
Thanks in advance,