dotnet / AspNetCore.Docs

Documentation for ASP.NET Core
https://docs.microsoft.com/aspnet/core
Creative Commons Attribution 4.0 International
12.64k stars 25.29k forks source link

SignalR Client + Server Version Compatibility #17880

Open VishalMadhvani opened 4 years ago

VishalMadhvani commented 4 years ago

I can't seem to find any information on client/server version compatibility for SignalR. Is anyone able to shed some light on this?

For example, can the 3.x Javascript or .NET Core libraries be used against an ASP.NET Core 2.x SignalR Server? This seems to work, but is it a supported use case or is it best to match the client and server versions?

davidfowl commented 4 years ago

@anurse do we have a doc on this somewhere?

Yes, we'll never break older clients versions with newer servers.

cc @BrennanConroy

analogrelay commented 4 years ago

There isn't a doc really no, but we could add it to our docs.

This seems to work, but is it a supported use case or is it best to match the client and server versions?

Yes, it is a fully supported use case assuming you are using a supported version of the client and server (as per the .NET Core support policy). Here I mean a very specific definition of "supported" which is that Microsoft Support will help you with it and we are able

In general, we will do everything we can to avoid breaking even no-longer-supported versions of clients and servers and maintain complete compatibility backwards and forwards. I won't go as far as @davidfowl to say we'll never break older clients, because I'm paranoid and more practical than him 😝, but we'll always use extreme care to avoid it unless absolutely necessary. So far, we've never needed to make breaking changes, even as we added functionality to the protocol (such as streaming and keep-alive) and I don't foresee any reason to do so. But, I try to never say never 🤷‍♀️.

If you find a compatibility issue and at least one of the client or server are still supported, we'll strongly consider patching it to fix the issue. We don't ship patches for out-of-support products, so if both the client and server are no longer supported, we won't be able to ship a patch. Keeping your server up-to-date is probably the easiest way to achieve this since you generally control deployment of it (as opposed to updating things like mobile/IoT/etc. devices)

So the short answers are:


Phew, that was long. I hope it helps @VishalMadhvani. I'm going to keep this open and move it to AspNetCore.Docs. We should synthesize it into something on the docs page that makes things clearer.

VishalMadhvani commented 4 years ago

Thanks @davidfowl @anurse that's great to know. Having something in the docs would be helpful as I wasn't able to find any information suggesting this was a supported use case.