locked
Suitability, a design detail and OS requirement RRS feed

  • Question

  • User1604699451 posted

    (newbie alert)

    1) The application is a multi-tenant SaaS application, the primary function of which is to deliver thousands completely separate real-time online discussions (high specialized), each of which will have an average of about seven participants.

    ==> Seems like Signalr would be very suitable for this application.  Any reason to question that?

    2) One thing I can't see immediately is how to make the client/browser "poll" the server frequently, looking for discussion refresh/updates from other participants, particularly in this case: if the client were busy, as in "wait, don't refresh me, I'm typing" then the client would have to be able to go "ok, I'm done now, let's see if there are any updates from other people?"  The simplistic answer is have a JS polling timer on the client, but it seems like there should be a better way more organic to Signalr.

    ==> Or, is that a common scenario for which there are obvious answers that I can find during development?

    3) My local development machine is a Dell XPS 8500. It's on Win7 Pro, because I don't want to rock the boat right now, and I have to buy a new machine next year anyway.  I've got VS2013.  The development team will be elsewhere.  If I want to run the app locally, do I need to upgrade to Win10 in order to use Signalr?  I've heard there's a workaround for using Signalr on Win7, however, I'm not that technical.  

    ==>Recommendations?

    Thanks!

    Tuesday, May 24, 2016 2:18 AM

Answers

  • User541108374 posted

    Hi,

    how to make the client/browser "poll" the server frequently, looking for discussion refresh/updates from other participants, particularly in this case: if the client were busy, as in "wait, don't refresh me, I'm typing" then the client would have to be able to go "ok, I'm done now, let's see if there are any updates from other people?"  The simplistic answer is have a JS polling timer on the client

    That's how you would do it with ajax. SignalR builds on top of websockets (with fallback scenarios) that enables duplex communication so you don't need to poll anymore. When on the server a message is spread it's sent to the clients/browsers that are subscribed to it. The de facto code sample for SignalR is a chat client without the need for polling.

    On the supported Windows versions, 7 is included: http://www.asp.net/signalr/overview/getting-started/supported-platforms.

    If you want to use the full websockets feature of SignalR, so no fallback scenarios, you'll need IIS 8 or IIS 8 Express.

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 24, 2016 6:39 AM
  • User61956409 posted

    Hi codequest,

    SignalR could be used to add "real-time" web functionality to our ASP.NET application, "real-time" web functionality is the ability to have server code push content to connected clients and update clients UI instantly as it becomes available without refreshing the web page.

    Besides, both Windows 7 and Windows 10 support SignalR, as XIII said, you could check “Supported Platforms” to get more information.

    http://www.asp.net/signalr/overview/getting-started/supported-platforms

    Best Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 25, 2016 5:43 AM

All replies

  • User541108374 posted

    Hi,

    how to make the client/browser "poll" the server frequently, looking for discussion refresh/updates from other participants, particularly in this case: if the client were busy, as in "wait, don't refresh me, I'm typing" then the client would have to be able to go "ok, I'm done now, let's see if there are any updates from other people?"  The simplistic answer is have a JS polling timer on the client

    That's how you would do it with ajax. SignalR builds on top of websockets (with fallback scenarios) that enables duplex communication so you don't need to poll anymore. When on the server a message is spread it's sent to the clients/browsers that are subscribed to it. The de facto code sample for SignalR is a chat client without the need for polling.

    On the supported Windows versions, 7 is included: http://www.asp.net/signalr/overview/getting-started/supported-platforms.

    If you want to use the full websockets feature of SignalR, so no fallback scenarios, you'll need IIS 8 or IIS 8 Express.

    Grz, Kris.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, May 24, 2016 6:39 AM
  • User61956409 posted

    Hi codequest,

    SignalR could be used to add "real-time" web functionality to our ASP.NET application, "real-time" web functionality is the ability to have server code push content to connected clients and update clients UI instantly as it becomes available without refreshing the web page.

    Besides, both Windows 7 and Windows 10 support SignalR, as XIII said, you could check “Supported Platforms” to get more information.

    http://www.asp.net/signalr/overview/getting-started/supported-platforms

    Best Regards,

    Fei Han

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, May 25, 2016 5:43 AM
  • User1604699451 posted

    Thanks for the input.   On the the question of "client polling" versus "server push", I still am not clear on what happens if the client is "busy" (like processing an input) or "paused" (like "please don't update me right now, the user is looking at something that they don't want changed").

    Perhaps I'm not understanding how Signalr works with Javascript.

    I'm definitely light on Javascript knowledge, however, I believe that I understand that Javascript is single threaded with an event queue.   So if an event fires (like a timer event), JS puts that in the queue.  And when JS is done processing one thread it goes back to the queue.  

    If that's the case, then if the Signalr client hub was always "listening" and it put received messages in the Javascript queue, then it would be a matter of the next item in the queue executing if when the "busy" operation completed.

    ==> Is that approximately how the technology works?

    Then there could perhaps also be a "business logic" queue where Signalr messages could be left, to be processed with the "paused" state ended.

    However, I'm having a hard time getting away from the idea that the client needs a little timer to keep checking if it should do something.  

    ==> Does anyone know of any sources for design patterns that  might provide insights around this?

    Thanks!

    Tuesday, June 21, 2016 9:22 PM
  • User541108374 posted

    Hi,

    the timer principle was indeed needed with ajax to check every now and then. SignalR is an implementation on top of websockets which makes that the communication channel stays open and is bidirectional. It adds a lot of others stuff like making it easy to code in C# and have stuff generated for you in JavaScript and has fallback scenarios but bottom line is biderectional communication.

    It's up to your code to process incoming signals from the server side when they get pushed (like showing a popup or updating data). It's been a while since I opened this sample but I found it a nice one: https://github.com/SignalR/SignalR-StockTicker.

    Grz, Kris.

    Wednesday, June 22, 2016 5:26 AM