This is a migrated thread and some comments may be shown as answers.

Looking for server-push to client...

11 Answers 241 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Mark
Top achievements
Rank 1
Mark asked on 02 Oct 2007, 03:20 AM
I'm new to RadControls to please bear with me if this is a simple question. 

I'm looking for a mechanism in which the server (ASP.Net app) can send notifications to the client controls to refresh themselves.  For instance a browser might be display a datagrid.  Rather than polling the server, the datagrid remains static until some event on the server triggers a notification to be sent to the client control to refresh itself. 

Do the telerik controls provide a solution for this situation?  I'm no ajax expert, but I'm wondering if an ajaxified control can listen and respond to server notifications, sort of like a long running callback.

Thanks!
Mark

11 Answers, 1 is accepted

Sort by
0
Bartholomeo Rocca
Top achievements
Rank 1
answered on 03 Oct 2007, 03:11 PM
Hi Mark,

I don't believe communication triggered by the server-side can be achieved in the web world -- you can still achieve the desired effect via an ajaxified timer control (either Telerik's, or the ASP.NET AJAX one for example) but of course the communication would be triggered by the client-side and the server would respond to the requests accordingly.

Greetings,
Bart.
0
Mark
Top achievements
Rank 1
answered on 03 Oct 2007, 03:39 PM

I was thinking about this some more as I read about the Ajaxmanager and the timer controls.   There are definite holes in my ajax knowledge, but what's the possibility of a process like this could work?

  1. A hidden control on the dashboard page initiates a callback to a webservice with userid parameter.  The webservice adds the callback sessionid to a correlation table along with the passed in userid, then leaves the callback session open.   This hidden ajaxified control would block, but shouldn't affect the rest of the page.
  2. Meanwhile some server-side process (db trigger, etc)  recognizes when data has changed requiring the client to be refreshed.  In that case it checks the correlation table to identify the currently open callback sessionid associated with the userid, then returns a refresh notification to the hidden control, still blocking waiting for a response.
  3. The hidden control receives the server's response, then causes the appropriate page controls to refresh.  
  4. Finally the hidden control starts the process again by calling back into the webservice.

I'm making these assumptions:

  1. A callback session can be identified with an id (or some other way)
  2. A webservice in the same domain can come along and randomly communicate with an open callback session if it knows the it's id
  3. A callback session wont timeout after blocking for an indefinite period
  4. The webservice being called into wont itself block.  I could see lots of blocking webservice instances choking the server.
  5. The complexity and any performance hits wont be a greater load than simply polling the the timer.  My goal is to prevent unnecessary polling when nothing has changed server side.

Thanks for your thoughts
Mark

0
LeBear
Top achievements
Rank 1
answered on 17 Jan 2008, 08:55 PM
Mark,

If you just need to keep the session alive, any standard Ajax call should do this since it does a complete postback on the server.  As such, if you have an Ajax call triggered by a timer, the session will stay alive.
0
seriallabs
Top achievements
Rank 1
answered on 10 Apr 2008, 09:26 AM
I believe you might be interested in the "comet" paradigm. "Comet" is another word for "ajax push". I'm new to this too and I'll find it great if Telerik could work in this field.

If you need a push server, you might consider a solution like lightstreamer

Their website explains the technology and provide some white papers ...
0
Patrice Boissonneault
Top achievements
Rank 2
answered on 30 May 2011, 08:18 PM
Hi,

I'm looking for a similar solution.  It's been almost 2 years from the last post in this thread, I'm wondering if Telerik has added such feature or solution to this problem?

Thanks.

P
0
Sebastian
Telerik team
answered on 31 May 2011, 08:29 AM
Hi Patrice,

Have you considered using an asp Timer in combination with our ajax manager or panel for the purpose discussed in this forum thread? We have a couple of live demos which illustrate how this can be done:

http://demos.telerik.com/aspnet-ajax/ajax/examples/common/ajaxifytimer/defaultcs.aspx

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/aspajaxgridapplication/defaultcs.aspx?product=grid

Greetings,
Sebastian
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Patrice Boissonneault
Top achievements
Rank 2
answered on 02 Jun 2011, 02:29 AM
Hi Sebastien,

The samples you mentionned are still "pull" model since the refresh is being trigerred by the client and not the server.

For anyone else following this thread, I've actually found a .Net comet server which seems to be answering this need, it is called WebSync (http://www.frozenmountain.com/websync/)

I'm actually suprised that Telerik is not aware of them as they specifically say on their web page that they integrate with Telerik!

Seems promissing, will give it a try.

P
0
Sebastian
Telerik team
answered on 02 Jun 2011, 08:47 AM
Hi Patrice,

Thank you for letting us know about this solution which uses reversed Ajax technology and initiates refreshes which are triggered on the server. Feel free to use this method and let us know about the result when integrated with our AJAX components.

Best regards,
Sebastian
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
LeBear
Top achievements
Rank 1
answered on 02 Jun 2011, 01:08 PM
Very interesting... worth a check.

I've got a live chat system that relies on frequent "pings" back to the server, which I wish I wish I didn't have to do so often.  They're as light-weight as possible, but they still have to come in very frequently in order for the chat to remain live.

Thanks for posting this.
0
Andy Green
Top achievements
Rank 2
answered on 20 Nov 2012, 03:15 PM
Hi

Has anyone had any success with this approach?

Andy
0
Patrice Boissonneault
Top achievements
Rank 1
answered on 20 Nov 2012, 03:28 PM
Andy, we implemented WebSync pubsub to push not only a 'refresh yourself' message (we did that first, but that was killing our servers), but the full data to be displayed.  Check it out, this is a great piece of software.
Tags
Ajax
Asked by
Mark
Top achievements
Rank 1
Answers by
Bartholomeo Rocca
Top achievements
Rank 1
Mark
Top achievements
Rank 1
LeBear
Top achievements
Rank 1
seriallabs
Top achievements
Rank 1
Patrice Boissonneault
Top achievements
Rank 2
Sebastian
Telerik team
Andy Green
Top achievements
Rank 2
Patrice Boissonneault
Top achievements
Rank 1
Share this question
or