Chapter 5. Hubs

Indubitably, persistent connections provide all that we might need to create real-time multiuser applications through a really simple and intuitive API. Nevertheless, the creators of SignalR have taken it one step further, offering a much higher level of abstraction above Internet protocols, transports, and persistent connections: hubs. (See Figure 5-1.) Hubs use an imperative development model based on the flexibility of JavaScript and the dynamic features of C#, which creates an illusion of continuity between the client and the server, two physically separated environments.

A diagram showing the abstraction levels used by SignalR to communicate between the client and the server. Starting at the bottom (at the lowest level of abstraction) are the Internet protocols. These support the transports used to maintain the virtual connection (WebSockets, server-sent events, forever frame, and long polling). Above them are persistent connections and, finally, at the highest level of abstraction, hubs.

Figure 5-1. Abstraction levels used by SignalR.

Hubs are ...

Get SignalR Programming in Microsoft ASP.NET now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.