SignalR 0.4 Released!Posted: January 30, 2012 Filed under: Development | Tags: ASP.NET, signalr 22 Comments
I’m happy to announce that the long awaited 0.4 release of SignalR is now available on NuGet! The sample package has also been updated to account for some of the API changes.
This release brings a huge amount of changes including new features, massive performance improvements and some API breaking changes (for the better of course).
Here’s an overview of the changes in this release:
- Increased throughput by almost 100% from 0.3.5
- Substantially reduced memory use
- Decoupled from ASP.NET, can now host on other servers, e.g. OWIN, HttpListener, etc.
- Standardized on JSON.NET for JSON serialization and deserialization
- Removal of non-async APIs
- Removal of statics to allow for better isolation (like testing, multi-host, etc.)
- Support for four transports:
- WebSockets on ASP.NET with Windows 8
- Server Sent Events (EventSource)
- Forever Frame
- Ajax Long Polling
- Improved transport negotiation
- Support for custom querystring values in connection URLs
- Support for dynamic parameters to hub methods
- Improved disconnect logic and notification
- Client support for .NET, Silverlight and Windows Phone 7
- Improved tracing
- Tools and configuration for load testing
- Loads and loads of bug fixes
Plans for future releases
Our upcoming releases will focus on supporting scale out for web farms and cloud hosting scenarios, along with further features and improvements. While the list is still being decided, the following features are being considered:
- Scale out providers for SQL Server and Service Bus
- Cross domain connections
- Hub JS proxy file generation at design/build time for improved JS IntelliSense & bundling support
- .NET client side proxy generation
- Much improved tracing
- Web Forms control for server originated post-back (for use in UpdatePanels)
Giving Feedback & Getting Assistance
Please jump into the SignalR room on JabbR if you want to discuss any feature or issue or just chat with the SignalR team and other SignalR users. If you find a bug or have a feature suggestion, please log an issue on github.
Show Your Support
We love hearing of people having fun with SignalR. To show your support and keep us in the loop of your successes or otherwise, you can follow SignalR on twitter, and watch the SignalR repository on github.
Excellent. Will have to take a look at this later 🙂
I look forward to the Scale Out and the Proxy Generation. Proxy Generation would make life so much easier.
Absolutely awesome! Keep it up guys!!
Where can we see a list of API changes (especially breaking ones)?
There actually aren’t that many, just compile and see what breaks, but from the top of my head:
– Connection.ClientId became Connection.ConnectionId (on Connection, HubContext, clients, etc.)
– Connection.GetConnection and Hubs.GetClients were removed. You now need to resolve an IConnectionManager from the DependencyResolver for your host, e.g. AspNetHost.DependencyResovler.Resolve().GetClients()
– non-Async versions of connection event methods were removed, you need to use the Task returning versions instead, e.g OnConnectedAsync
Thank you. I was worried that you changed client side APIs. If all changes are caught compile time then everything is fine.
there are samples with HUBs ? i cant use AspNetHost.DependencyResovler.Resolve().GetClients()
The SignalR.Sample nuget package uses hubs, and the SignalR.Hosting.AspNet.Samples project in the source on github contains a few more hubs examples.
The Resolve() method is an extension method in the SignalR.Infrastructure namespace, so make sure you’re class file has a using/imports statement for that namespace.
Updated to 0.4 from 0.3.5 and everything works great with just minor changes in code to reflect the new API (mainly ClientID -> ConnectionID 🙂 ). The new transport options are very nice addition!
Noticed something interesting though – when used on http connection everything works great with the minified package, however if I change to https (the server supports both http and https) it starts throwing exceptions “Unknown Transport” without obvious reason.
If the normal, unminified script is used both http and https work perfectly well. 0.3.5 worked great with the min script as well.
Seems like a script minification problem, although I haven’t found what’s exactly wrong yet. Anyway – if having a problem with SignalR 0.4 over SSL try the unminified script just to be sure 🙂
I figured it was time for me to start playing with this now, but I’ve run into a couple of issues. I’m specifically looking into using the Silverlight client.
1. The Silverlight client wants to use System.Threading.Tasks.SL4 even when added to a Silverlight 5 project. I had to downgrade my test project to Silverlight 4 to get it building.
2. When I launch my test site it YSODs with System.InvalidOperationException: Unknown transport.
The test site is added at the same time as I added a new Silverlight project, and then used nuget to add SignalR. If I remove SignalR, then it displays the test Silverlight app just fine.
Any idea what’s wrong here?
That error only happens if the client and server are out of sync. Make sure you have the 0.4 client and server.
One other case that I noticed this happening was (had me puzzled for quite a while :)). It was when I navigated to http://localhost/SignalR.Sample/StockTicker.html (notice the missing underscore).
Any idea as to why?
WOW!! This is some of the coolest stuff that I’ve seen in Years!!! Thank you guys!!
+1 Lee Smith for the versioning request. When I updated the reference to 0.4, NuGet skipped updating my client because it saw that I already had it. And then I got the “Unknown Transport” error when attempting to run the site.
So THAT was it! I thought I messed up the JS files myself when I copied them from a test project I updated with nuget to the real project that does not use nuget.
NuGet will only skip files with the same name if it detects it’s changed. So upgrading SignalR from version to version via NuGet should be fine as long as you’re not editing the jquery.signalr.js file.
Hey if anyone is interested in using SignalR over SharePoint data
We have the same name
to get connection I use “AspNetHost.DependencyResovler.Resolve().GetClients()” but this give an error : The name ‘AspNetHost’ does not exist in the current context
can you help me to fix this pleaaase.
The dependency resolver is now available off of the GlobalHost type.
Thank you for your quick response,I tried GlobalHost and it works but :
IConnectionManager connectonManager = GlobalHost.DependencyResolver.Resolve();
IConnection connection = connectonManager.GetConnection();
gives this error:
(‘SignalR.IConnectionManager’ does not contain a definition for ‘GetConnection’ and no extension method ‘GetConnection’ accepting a first argument of type ‘SignalR.IConnectionManager’ could be found (are you missing a using directive or an assembly reference?))
I am trying to build a site with group and private chat on it. To be more clear, instead of all the users online on this site, we want only the respective city’s users to be on the group and if clicked on a particular name, we could able to chat privately with him/her.
So, in London, we can only see people online from London and everybody can see our chat message until we choose anyone particularly. Similarly, for other cities as well.
So, I need to pick DB values of the username (their cities) to provide for the group chat membership and also limit the visibility of the group to other cities and their messages of that group.
Kindly suggest me.
NOTE: I need to do this on Web form only, since 80% of the site has already been done on Asp.Net Web form.
Thanks in advance and have a nice day ahead.