Published: 28 Jun 2013
By: Simone Busoli

A book review of SignalR by Simone.

About the book


Written by: Einar Ingebrigtsen
Pages: 124
Publisher: Packt Publishing
ISBN: 1782164243
ISBN-13: 9781782164241


SignalR: Real-time Application Development is a short book written as a hands-on guide along the lines of the official SignalR documentation. It represents a good companion to the documentation by complementing it with the introduction of a simple demo application which is enriched and improved throughout the book.

The first few pages introduce the topic of client-server applications and how they have evolved in the recent years, from terminals interacting with mainframes to rich clients keeping state closer to the user, and goes on to explain where SignalR fits in this common architecture to provide real-time interaction features to Web and other kinds of applications.

The next few chapters introduce SignalR by going through its main building blocks: persistent connections and hubs. They explain briefly how the former provide a simple abstraction over the underlying transports to create the uniform view of a live client-server-client connection and how the latter enhance it by providing a richer set of features which enable both parties to communicate with the others using a common RPC style. They also show how seamlessly different clients can interact with a SignalR server by using the official NuGet packages for JavaScript and .NET clients.

The book then goes on to introduce some of the unique features of SignalR.

Grouping is a nice addition as it allows to treat client connections as sets of clients, which can interact with each other without affecting connections outside of the group. This is clearly illustrated by showing how handy this feature is when writing a chat application and dealing with the concept of chat rooms.

Round-tripping state between tiers is another useful addition, as it reduces the need to pass any necessary state explicitly with method arguments.

A few chapters are then dedicated to infrastructure features like security and availability. SignalR has built-in support for the classic security utilities you would normally use in ASP.NET applications, allowing restricted access by specific users or roles to specific resources.

Also, scaling features are provided out of the box and easily configurable to switch from memory-based storage to different providers, which include SQL Server, Redis and Azure Service Bus. This is a necessary feature as soon as the same application requires more than a single logical server to run, because all servers need to be aware of all the connected clients.

The final part of the book is dedicated to op-friendly features, which include monitoring and self hosting.

Monitoring can be somewhat tricky due to the automatic transport fallback implemented by SignalR, but common tools like Fiddler result very handy and can be configured to give an optimal debugging experience. Where debugging tools don't help the use of performance counters, treated next in the book, can be invaluable. SignalR comes with its own set of performance counters which can be easily installed and provide useful metrics like number of connections and message rates. Self hosting is another useful addition as it allows to host the server part of an application running SignalR outside of a Web server. It does so by using the standard OWIN interface which is easily set up in a plain console application by using the official NuGet packages.

The last chapter finally shows how it is possible to use SignalR in a Windows 8 application by reusing most of the code you would normally write in a standard Web application, by simply overcoming the intrinsic limitation of not being able to access JavaScript proxies which are otherwise dynamically generated by the server. The book is an interesting read and mainly a hands-on guide to keep on your desk and consult quickly. It does not go into much detail and doesn't explain any of the internals of SignalR or some of the issues you might incur into while using it, for that you would likely need to resort to other resources.

If you're getting started with SignalR and would like to have an easy guide at hand which shows how you can leverage most of its features in a real, though stripped-down application, then this book is definitely for you.

<<  Previous Article Continue reading and see our next or previous articles

About Simone Busoli

Sorry, no bio is available

This author has published 10 articles on DotNetSlackers. View other articles or the complete profile here.

Other articles in this category


Code First Approach using Entity Framework 4.1, Inversion of Control, Unity Framework, Repository and Unit of Work Patterns, and MVC3 Razor View
A detailed introduction about the code first approach using Entity Framework 4.1, Inversion of Contr...
Exception Handling and .Net (A practical approach)
Error Handling has always been crucial for an application in a number of ways. It may affect the exe...
jQuery Mobile ListView
In this article, we're going to look at what JQuery Mobile uses to represent lists, and how capable ...
JQuery Mobile Widgets Overview
An overview of widgets in jQuery Mobile.
jQuery Mobile Pages
Brian Mains explains how to create pages with the jQuery Mobile framework.

You might also be interested in the following related blog posts


MSDN Guidance on ASP.NET MVC vs WebForms and its Impact on my EF + ASP.NET Work read more
What is Softwaremaker doing now ? read more
StreamInsight read more
Serialising Microsoft StreamInsight QueryTemplates read more
September's Toolbox Column Now Online read more
Generic Types and Inheritance read more
Beginning ASP.NET MVC 1.0 Finally Available read more
August's Toolbox Column Now Online read more
Launch of TimeLive 3.1 an asp.net open source web time tracking software by Livetecs.com read more
Updated SilverTwit Code for MSDN Magazine read more
Top
 
 
 

Please login to rate or to leave a comment.