Click here to Skip to main content
15,892,298 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Greetings!
I've a couple questions regarding extending notification system, like a "Loading, please wait...":
If initiation of this action should come from the server side? or it must depends of time elapsed since request was sent (On client side), if so, how can i calculate it. Just set default average execution time, and if actual execution time is more then predefined average, show message? I need just a theory of this, how it should be done.


Thank you.
Posted
Updated 29-Aug-14 8:49am
v6
Comments
ZurdoDev 29-Aug-14 14:45pm    
Need a lot more info. Is this ASP.Net then?
Member 10966414 29-Aug-14 14:47pm    
Nope, Winforms client and Sockets server
Sergey Alexandrovich Kryukov 29-Aug-14 14:54pm    
Then server-side notifications is not a problem. It just should not be that dreadful "pure" client-server model. Please see my answer, especially two last links. Please ask if you have some follow-up questions.
—SA

1 solution

Strictly speaking, "pure" client-server model assumes that the server cannot send notification; it's a model where the server play purely passive role: everything is initialized by one or another client, and the server only responds to requests. Elapsed time is totally irrelevant here. This model is extremely weak, limiting and inefficient for many applications; I never appreciated it, but it it became almost dominating.
For some background, please read:
http://en.wikipedia.org/wiki/Pull_technology[^],
http://en.wikipedia.org/wiki/Push_technology[^],
http://en.wikipedia.org/wiki/Client%E2%80%93server_model[^].

At the same time, there are way more advanced and useful models, such as publisher-subscriber and other.

How about the Web? Unfortunately, it is primarily pull technology (and for some basic functionality, like the one needed for decent Web chat applications, this is a big obstacle), but the doors are not completely closed, for those who can invest in more complexity. Please read on "server push" in the second article referenced above. These days, one popular framework called SignalR can help to work around the problem:
http://en.wikipedia.org/wiki/SignalR[^],
http://www.asp.net/signalr[^].

See also my past answers on related topics:
Application 'dashboard' for website accounts[^],
an amateur question in socket programming[^],
Multple clients from same port Number[^].

—SA
 
Share this answer
 
v3
Comments
Member 10966414 29-Aug-14 14:56pm    
thank you, very helpful.
Sergey Alexandrovich Kryukov 29-Aug-14 15:00pm    
You are very welcome.
Good luck, come again.
—SA

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900