Showing posts with label push. Show all posts
Showing posts with label push. Show all posts

Saturday, March 24, 2012

push data to client/ keep checking the server side for any update to load

hi..

Im developing a web application to be used over the internet (not entranet) that means I have unknown of users accessing my web site.

I need to keep checking the server side every 30sec by creating hidden iframe to keep submiting to the server and check for specific updates( such database table). I think this way will reduce the performance of the server and not accepted!

is it true as I think? there is any other technique to this? is there some AJAX control to use instead?

note: Im fetching a small amount of text from the server

It really depends on your system and the expected number of users. Of course, every time you poll the server it takes some performance but in many cases the rewards outweight the performance hit.There are a lot of sites that do this and its not a huge performance hit if you are just retrieving a small amount of text. I would say go for it if you have the capacity.


Take a look at this: http://encosia.com/index.php/2007/07/25/display-data-updates-in-real-time-with-ajax/

The page method call for polling keeps the traffic level very low, compared to other techniques.

push message to user

Hi, I would like to know how do i push a message to multiple users in asp.net atlas?

I would like to enter a message then click send and it would display on multiple users computers in a box that would appear within a webpage.

This would be used to alert users of network issues.

thanks

Kunal

You could use theTimer control:


thanks, is there any other controls or ways to push the content, i have heard of ajax comet.


I'm afraid that you cann't do this in another way, The Ajax isn't a kind of "Server push" technology.

Push to all user?

Hi all

It's my first visit to this forum and I must say it's a great job you all do for helping each others.

I'm also new to Atlas and want to build something that can push information to the user, and i wounder if atlas can help me.

I want to start a clock that count down from 1 minute to 0. When a user make a post that trigger this function. And I want all user that browsing the site see the exactly same countdown. And if another user hit a button it will restart and countdown from 1 minute again. Is this possible in Atlas, or were should i search for information to find the soulotion for this.

Cheers Johan

Well the problem is that you cannot send a response to the browser unless the browser has issued a request. Hence if you want to get information from the server without a user actually actively requesting something, you will need to use javascript to make repeated calls to the server (via XmlHttpRequest object) and handle the request.

The non-Atlas javascript function to use would be setTimeout() and XmlHttpRequest manually.

However, since you are using Atlas, it would make sense to use:
http://atlas.asp.net/docs/Client/Sys/Timer/default.aspx

You can then bind this to a pagemethod or web service (asmx). In your case i think an asmx would be the best solution.

The rest of the specifics of the server-side logic I'm sure you can work out ;-) The application Cache would probably be the best place to store your 'countdownLastResetAt' variable...

Hope that helps,
Carlos