I suggest you ...

Deeper SignalR Integration

I'd like to see a deeper integration between ServiceStack and SignalR. Here are a few ideas that I've so far ran into...

1. A Hub Authorization Attribute which implements IAuthorizeHubConnection and/or IAuthorizeHubMethodInvocation.

2. Some sort of JsonServiceClient integration with HubConnections. Maybe automatically associating Cookies with a new HubConnection. Plus exception handling wrappers (i.e. Like an Unauthorized exception is thrown within a SignalR exception).

3. Centralized documentation outlining what needs to be changed in the web.config for SignalR to co-exist with ServiceStack. Also why the UseBufferedStream property should be enabled for SignalR.

4. This might require a separate feature request but an updated example app showing SignalR 2.0 integrated with ServiceStack 4.x. Only Examples I've seen have been with SignalR 1.x

135 votes
Vote
Sign in
Check!
(thinking…)
Reset
or sign in with
  • facebook
  • google
    Password icon
    I agree to the terms of service
    Signed in as (Sign out)
    You have left! (?) (thinking…)
    Stephen Brannan shared this idea  ·   ·  Admin →
    started  ·  AdminDemis J Bellot (Developer, ServiceStack) responded  · 

    The way ServiceStack and SignalR will be able to integrate in future will be through .NET Core’s IApplicationBuilder pipeline which by design supports running multiple frameworks within the same App that can now share the same default route namespace.

    From the v4.5.2, ServiceStack now supports running on .NET Core, please see the guide in the full release notes which shows how to register ServiceStack’s AppHost in .NET Core: http://docs.servicestack.net/releases/v4.5.2.html

    SignalR for .NET Core has yet to be released but it’s expected you’ll be able to access SignalR via its dependencies registered in .NET Core’s Startup which will also be injected in your Services like normal IOC dependencies.

    We’ll update this feature request again with an example showing a demo of ServiceStack + SignalR together in the same App once SignalR is available on .NET Core in 2017.

    7 comments

    Sign in
    Check!
    (thinking…)
    Reset
    or sign in with
    • facebook
    • google
      Password icon
      I agree to the terms of service
      Signed in as (Sign out)
      Submitting...
      • Johan Mulder commented  · 

        This is awesome news ! Luv the idea that Rest api , signalr and server sent events can be fully integrated in SS. What will be absolutely awesome is Rest , SignalR , SSE and Akka.net
        That will put SS on a different planet ;)

      • Anonymous commented  · 

        Note that authenticated SSE isn't supported in IE9 and earlier browsers. In other browsers that don't support XmlHttpRequest to send http cookies and/or custom headers it cannot be implemented either.
        Sadly to say, for this reason we are forced to leave SSE toward SignalR.

      • Jonas Bohlin commented  · 

        We're using SignalR and we're seriously considering moving to ServiceStack for our api v2. But we'd like to keep using signalr for some operations, and here's why:
        Server Sent Events are virtually unusable if you're serving content to iOS-devices. iOS only allows a small number of concurrent connections to any server, and an SSE endpoint blocks one of those connections, resulting in other requests not being allowed through. WebSockets doesn't cause this, on the other hand.

      • Ryan Britton commented  · 

        you mention in your comment that the SSE integration extends to the client libraries - how is this accessible, Demis? I can only see info for javascript clients....

      • Johann Klemmack commented  · 

        Any plans on a JsonServiceClient-based C# EventSource client?

      Feedback and Knowledge Base