locked
Is SignalR right for my application? RRS feed

  • Question

  • User1864322503 posted

    Hi All,

    I have just come across SignalR as a candidate for sending progress messages from Server to Client, for my ASP.NET MVC application (it is not ASP.NET Core, it's .NET Framework). I wanted to give a brief overview of what our application does, and see if SignalR would be recommended from you all. I have no prior knowledge of SignalR, so I don't want to commit to it, if it's overkill, or not right for our use case!

    Our application is a simple order processing page, there is only one page.

    1. A user selects a CSV file to upload.
    2. We perform basic validation (file is provided; file is CSV; file matches the expected template, etc.)
    3. We then perform business validation rules.
    4. Then, the records that pass validation will be sent to a processing class which processes each order, one at a time.

    It's very simple, but the size of the CSV file is up to the user, and we expect that at times, this page could take much longer than a typical user would expect, so I'm researching options for providing a user with a "Processing order 3 of 108..." --> "Processing order 4 of 108...", etc. I would most likely calculate expected time remaining, and include that in the Progress Text shown to the user.

    Does SignalR seem like the right tool for us to use? The examples I have seen in my super short research this morning are mostly related to creating an instant messenger chat, which is way more complicated than our situation.

    Thanks for your advice!

    Wednesday, February 27, 2019 4:30 PM

Answers

  • User475983607 posted

    SignalR is a persistent connection between the client (browser) and a web application where the application can send messages to the client.  SignalR is a fit for your requirements as you want real time processing status.

    https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/introduction-to-signalr

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 27, 2019 4:44 PM
  • User61956409 posted

    Hi nvielbig,

    nvielbig

    I'm researching options for providing a user with a "Processing order 3 of 108..." --> "Processing order 4 of 108...", etc. I would most likely calculate expected time remaining, and include that in the Progress Text shown to the user.

    If you'd like to push processing status from server to client(s) in real time, to implement real-time web functionality, you can use WebSockets or SignalR etc.

    Besides, if you'd like to let client(s) itself to request/get processing status, you can set/use a timer on client side to get it on scheduled.

    With Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 28, 2019 1:45 AM

All replies

  • User475983607 posted

    SignalR is a persistent connection between the client (browser) and a web application where the application can send messages to the client.  SignalR is a fit for your requirements as you want real time processing status.

    https://docs.microsoft.com/en-us/aspnet/signalr/overview/getting-started/introduction-to-signalr

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, February 27, 2019 4:44 PM
  • User61956409 posted

    Hi nvielbig,

    nvielbig

    I'm researching options for providing a user with a "Processing order 3 of 108..." --> "Processing order 4 of 108...", etc. I would most likely calculate expected time remaining, and include that in the Progress Text shown to the user.

    If you'd like to push processing status from server to client(s) in real time, to implement real-time web functionality, you can use WebSockets or SignalR etc.

    Besides, if you'd like to let client(s) itself to request/get processing status, you can set/use a timer on client side to get it on scheduled.

    With Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Thursday, February 28, 2019 1:45 AM
  • User753101303 posted

    Hi,

    Yes, and do a search for SignalR progress in your favorite search engine to find samples better matching what you need.

    Thursday, February 28, 2019 12:34 PM
  • User1864322503 posted

    Thank you, everyone!

    Thursday, February 28, 2019 3:07 PM