SignalHub

A hub-and-spoke architecture for realtime communication based on SignalR.

"SignalHub" was once a single application that managed realtime communications for all projects on juniuslabs. The term has since graduated to be loosely described as "a hub-and-spoke communication architecture based on SignalR, routing messages between digital signage, IoT, and user-interface clients"

Trainspotting, Train Automation, and the Digital Signage projects all utilize some variation of this architecture.

Built with ASP.NET and SignalR , the stack communicates directly with native C# digital signage clients and user-interface clients. It communicates indirectly to hardware controllers via a relay program.

A "relay" program running on a local windows computer can listen for, and issue local http REST calls to hardware controllers within a local network. The program then relays the messages to and from a hub, which can also be running locally or in the cloud. This effectively "connects" http-only clients to the SignalR pipeline. Train Automation and PowerTail AC currently use this technique to communicate with the Arduino Yún.

Artigo Relay Computer
A low-power computer can function as a local relay.
Relay Monitor
The relay maintains a connection to a hub and routes messages.
UI Example
A user interface is much like any web view and is a hub client. The UI can initiate a signal which then gets routed to a digital sign or piece of hardware.
Signage Clocks
Digital signage controllers are one type of client. The clock displays respond to a broadcast pulse from a single server.
Switch Controller
Hardware controllers communicate to a hub instance via a relay.
Switch
Controllers can influence and respond to the physical world. In this case, a servo is used to control the position of a switch.