locked
Update status in browser from server side RRS feed

  • Question

  • User-707427361 posted

    Hi,

    I have an application that, when a user presses a button, goes off and does somewhere between 30 and 500,000 things from the server side, depending on choices the user has made up to the point when he or she presses the button.  I would like to show the user a status while the application is doing those things; something better than a spinning wheel or something on the browser's status bar.  It is primarily creating a DB, so it needs to do so from the server side and needs lots of control (AD, SMO, ADO, etc.) to do what it needs to do safely.

    All I can seem to get is a blank screen with all the status messages displayed when the entire process is finished.  What I would prefer are updates as they happen.

    Suggestions (besides not needing to do what I need to do)?  We used to do this easily in Silverlight, but, unfortunately, those days are gone...

    Thanks, Rob

    Friday, August 5, 2016 1:52 PM

Answers

  • User753101303 posted

    It seems Telerrik does have some support for SignalR. Try http://demos.telerik.com/aspnet-mvc/grid/signalr and maybe in particular http://www.telerik.com/blogs/signalr-with-radnotifications. In this later case it is not really built in support but rather just populating the control with values transmitted using SignalR as show earlier. Another option would be to use the raw websocket API with no fallback if it seems simpler: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API

    I'll let others to suggest about a possible SignalR control if they know about that but imo it is unlikely from an architectural point of view (you can support that with few lines so adding that in each and every control doesn't seems that usefull especially if this is just a simple string notification rather than something such as refreshing grid data).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 8, 2016 1:37 PM

All replies

  • User753101303 posted

    Hi,

    You could give a try at http://www.asp.net/signalr/overview/getting-started/introduction-to-signalr and maybe in particular to https://www.safaribooksonline.com/blog/2014/02/06/server-side-signalr/

    It allows the server to send back data to the client while processing an http query and so on the browser side, the user will be able to see this progress information immediately withtout having to wait for the end of the HTTP query.

    Friday, August 5, 2016 2:06 PM
  • User-707427361 posted

    Hi,

    Thank you for your quick reply.

    We use Telerik controls in our applications because we need to keep our ratio of problem solving/UI development very high (our logic is very complex and our users demand that the UI look very professional at the same time).

    From reading through the links you provided, it looks like SighalR, although good, is a framework that someone (like Telerik or DevExpress) could use to build controls that we could use.  That's not our expertise - we try to buy that layer (UI controls) from someone who specializes in that sort of thing and concentrate on what we do best.

    Do you know if any of the leading providers have real-time UI components?

    Thanks, Rob

    Friday, August 5, 2016 3:56 PM
  • User-166373564 posted

    Hi,

    We use Telerik controls in our applications because we need to keep our ratio of problem solving/UI development very high

    From your description above, I think you need consult Telerik experts first, they might give more precise solution for you.

    Regards,

    Angie

    Monday, August 8, 2016 8:20 AM
  • User753101303 posted

    No, it's unrelated to the UI. It is a "transport" mechanism (websocket if available, falls back to http if not) that allows the server to decide when to send back data to the client side (rather than having the client requesting data and getting a response as usual).

    AFAIK most UI components are based on Ajax so this is still the client side that triggers the request and wait for a response. So it could likely still be used (for example triggering an Ajax request at particular interval), it seems SignalR might be still a good solution. Of course it requires to play a bit with that...

    Monday, August 8, 2016 12:02 PM
  • User-707427361 posted

    Hi,

    Thanks again for both these replies.  Telerik's position is that "you cannot sent different messages during the process on the server" (this was their response to someone else who asked the exact same question). 

    My response is still the same - I was hoping for something more than a low-level framework whereby I could build my UI controls for doing something as simple as updating the user with information about what is going on.

    We do stuff at the application level (building databases, solving business problems).  We don't want to have to build our own low-level toolkits as well to do fundamentally simple things like "display a status to the user (and have it work correctly)".

    Real time status updates are something that people have come to expect - it's been "normal" for the past 20 years or so.  I find it hard to believe that someone hasn't implemented this in the ASP .NET framework and that I would need to drag in an entirely new subsystem and write the code myself (lots of new stuff to maintain - just for a status update).

    Monday, August 8, 2016 12:34 PM
  • User753101303 posted

    It seems Telerrik does have some support for SignalR. Try http://demos.telerik.com/aspnet-mvc/grid/signalr and maybe in particular http://www.telerik.com/blogs/signalr-with-radnotifications. In this later case it is not really built in support but rather just populating the control with values transmitted using SignalR as show earlier. Another option would be to use the raw websocket API with no fallback if it seems simpler: https://developer.mozilla.org/en-US/docs/Web/API/WebSockets_API

    I'll let others to suggest about a possible SignalR control if they know about that but imo it is unlikely from an architectural point of view (you can support that with few lines so adding that in each and every control doesn't seems that usefull especially if this is just a simple string notification rather than something such as refreshing grid data).

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Monday, August 8, 2016 1:37 PM