locked
Using SignalR Core between Servers RRS feed

  • Question

  • User718448626 posted

    I would like to know if the scenario below is possible with SignalR.    If I developed a SignalR service where mobile users connect to my web service via Azure Signal service then when the user base grows and other business entity would want to participate with my communities of users but they want to run their own service and connect and access my group of users.  Is this possible?  Thank you.

    https://ibb.co/Lk2rb25

    Thursday, August 29, 2019 9:00 AM

Answers

  • User61956409 posted

    Hi Albertk89,

    You can try to implement a shared Hub, then you can establish connection(s) from business entity A and business entity B in code behind/code logic to achieving communication between them, like below.

     

    With Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 2, 2019 2:50 AM
  • User61956409 posted

    Hi Albertk89,

    I image that i would be best practice to have the shared hub as another asp.net project/program.  

    Yes, you can do that, and which would make the project architecture more clear and easy manage, that is good.

    With Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 2, 2019 3:14 AM

All replies

  • User61956409 posted

    Hi Albertk89,

    when the user base grows and other business entity would want to participate with my communities of users but they want to run their own service and connect and access my group of users.

    For better understand the scenario and your requirement, I'd like to confirm following information with you:

    • Do you host SignalR application on business entity A and host another application/service on business entity B?
    • And now do you want to implement communication between the application that you hosting on business entity B with your SignalR application that is hosting on business entity A?
    • Or do you just want to scale your SignalR application to make it can serve more client users?

    With Regards,

    Fei Han

    Friday, August 30, 2019 5:37 AM
  • User718448626 posted

    • Do you host SignalR application on business entity A and host another application/service on business entity B?
    • Yes the SignalR application will be hosted by Business Entity A and B on-premise.  Both entities will be have SignalR and ASP.NET core business logic.
    • And now do you want to implement communication between the application that you hosting on business entity B with your SignalR application that is hosting on business entity A?
    • The application will be communicating between entity A and  B via SignalR.
    • Or do you just want to scale your SignalR application to make it can serve more client users?
    • For scaling the business entity will be using Azure SignalR Service.
    Saturday, August 31, 2019 12:28 AM
  • User475983607 posted

    Can you explain the problem you are trying to solve and why SignalR is the solution to this problem?  Usually SignalR is used in a browser based application that requires real-time UI updates.  There's no UI in a server to server configuration so why SignalR?

    However, there is a C# client for Windows applications that is available from NuGet. 

    https://www.nuget.org/packages/Microsoft.AspNet.SignalR.Client/

    Saturday, August 31, 2019 12:14 PM
  • User718448626 posted

    I am look at users sharing data between the two business entities in realtime.  The users can be using web browser or Xamarin on android/ios. These will be implemented via the Signalr Client library.  

    Sunday, September 1, 2019 12:18 AM
  • User475983607 posted
    So your design is not server to server? You just needed the client library?
    Sunday, September 1, 2019 11:07 AM
  • User718448626 posted

    My design has user to server and server to server communication via Signalr.  I don't know why I can't post the image in the first post.

    signalr

    Monday, September 2, 2019 1:13 AM
  • User61956409 posted

    Hi Albertk89,

    You can try to implement a shared Hub, then you can establish connection(s) from business entity A and business entity B in code behind/code logic to achieving communication between them, like below.

     

    With Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 2, 2019 2:50 AM
  • User718448626 posted

    Hi Fei Han,

    Does that mean the shared Hub is also another SignalR Hub?  Is there a reference/sample implementation out there ?  Thank you.

    Monday, September 2, 2019 2:54 AM
  • User61956409 posted

    Hi Albertk89,

    Does that mean the shared Hub is also another SignalR Hub?  Is there a reference/sample implementation out there ?  Thank you.

    Yes, you can create and use another SignalR Hub as shared Hub that help exchange messages between applications hosting on business entity A and business entity B.

    If your code logic is written in c#, you can refer to the following document to connect to the shared hub.

    https://docs.microsoft.com/en-us/aspnet/core/signalr/dotnet-client?view=aspnetcore-2.2#connect-to-a-hub 

    With Regards,

    Fei Han

    Monday, September 2, 2019 3:05 AM
  • User718448626 posted

    Hi Fei Han,

    I image that i would be best practice to have the shared hub as another asp.net project/program.  

    Monday, September 2, 2019 3:07 AM
  • User61956409 posted

    Hi Albertk89,

    I image that i would be best practice to have the shared hub as another asp.net project/program.  

    Yes, you can do that, and which would make the project architecture more clear and easy manage, that is good.

    With Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, September 2, 2019 3:14 AM