long-polling

long polling vs streaming for about 1 update/second

is streaming a viable option? will there be a performance difference on the server end depending on which i choose? is one better than the other for this case? I am working on a GWT application with Tomcat running on the server end. To understand my needs, imagine updating the stock prices of several stocks concurrently. ...

Are WCF polling duplex services usable by other clients?

I'm writing a server app with a silverlight client. At some point I'd like non-silverlight clients to be able to use my services. Right now I've written some WCF services which get polled, but I'm not happy with the responsiveness. I'm thinking of switching the code over to using Silverlight/WCF duplex polling, but if I do that, will I b...

Maintaining simultaneous connections in HTTP?

I need to maintain multiple active long-pooling AJAX connections to the Webserver. I know that most browsers don't allow more then 2 simultaneous connections to the same server. This is what the HTTP 1.1 protocol states: Clients that use persistent connections SHOULD limit the number of simultaneous connections that they maint...

Comet, responseText and memory usage

Is there a way to clear out the responseText of an XHR object without destroying the XHR object? I need to keep a persistent connection open to a web server to feed live data to a browser. The problem is, there is a relatively large amount of data coming through (several hundred K per second constantly), so memory usage is a big problem...

A message queue model in Erlang(Comet chat)?

I am doing Comet chat with Erlang. I only use one connection (long-polling) for the message transportation. But, as you know, the long-polling connection can not be stay connected all the time. Every time a new message comes or reaches the timeout, it will break and then connect to the server again. If a message is sent before the connec...

What is a safe amount of time that I can wait before responding to a browser, without getting a Timeout?

I'm making a chat application that works with long-polling to emulate a "push" from server to client. Basically, the browser asks for updates, and I reply if there's something new. Otherwise, I keep the connection open without responding until there is something to send back. Now, if 30 seconds have passed and I haven't sent anything, ...

How to do long-polling AJAX requests in ASP.NET MVC?

Does anyone know how to code up long-polling AJAX requests (for server PUSH notifications) in ASP.NET MVC? Whenever I do it, it seems that only the last browser to open up a window gets the notifications. As if IIS/ASP.NET were canceling the last request because it was hung or something. ...

help with python forking child server for doing ajax push, long polling

Alright, I only know some basic python but if I can get help with this then I am considering making it open source. What I am trying to do: - (Done) Ajax send for init content - Python server recv command "init" to send most recent content - (Done) Ajax recv content and then immediately calls back to python server - Python server recv c...

Long polling issue with high traffic website

Say I have script, that does long polling on server to check if user has any new mesages. Server side would be something like this while counter < 5 if something_changed push_changes_to_client break else counter++ sleep 5 Which checks database 5 times and every time if there is no change, it wai...

close long poll connection, jQuery-ajax

Background I use a Tornado-like server with support for long-polls. Each web pages a user clicks around to sets up a long poll to the server like this: $.ajax({ type: 'GET', url: "/mylongpollurl/", dataType: 'application/json', success: function(json) { // I do stuff here }, error: function(xhr, errText, ...

How to do a long polling client in C# ?

Hello, I have a C# desktop application, and I consume a web service without problems (wsdl added by "add Service References", so I create an object and call its functions). Now, I want to use long polling techniques but I can't figure how to do this from the client's perspective. How to configure the timeout ? Should I use a thread d...

Flex: Long polling (ie, server push) without BlazeDS?

Apart from using BlazeDS, are there any pre-existing libraries that implement long polling (or server push) in Flex? Note: I've read I like to implement Flex to Server comet / long polling for games, but he's only asking if it's possible to implement… Not if implementations exist. ...

Polling duplex does not scale... what's the alternative?

Our tests showed that the polling duplex binding simply does not scale and can not be used on a service within a web-farm or even a web garden. We have looked at TCP/IP sockets for a client push method, but the firewall issue is does allow us to use sockets. I was wondering what is the alternative "free" solution to this problem? allowi...

How does a WCF server inform a WCF client about changes? (Better solution then simple polling, e.g. Comet or long polling)

see also "WCF push to client through firewall" I need to have a WCF client that connect to a WCF server, then when some of the data changes on the server the clients need to update its display. As there is likely to be a firewall between the clients and the server. All communications must be over HTTP The server can not make an...

Driving events across custom TCP Long-Polling server

I’m trying to write a custom TCP based long polling server that will serve as a go-between for other TCP connections that require more persistence than a mobile phone can provide. The way I’m trying to do it is writing an asynchronous TCP server in C# and a matching TCP Client also written in C#. The way that long polling works (as far...

Ajax long polling (comet) + php on lighttpd v1.4.22 multiple instances problem.

Hi, I am new to this site, so I really hope I will provide all the necessary information regarding my question. I've been trying to create a "new message arrived notification" using long polling. Currently I am initiating the polling request by window.onLoad event of each page in my site. On the server side I have an infinite loop: w...

ASP.NET C# Sending Information Back to Client While Processing Web Page

Hi, Not sure if I'll explain this properly but here goes. I having written an asp.net app using C# for the code behind. After the user makes some selection and hits the "run" button I pass off the processing to a dll written in C# but what I want is a way to periodically send information back to the client so they can see what's going o...

long polling - what are methods for determining when you have new data?

Lets say I have a chat program that every time someone sends a message, a globalfile is locked and written to. The receiving client has a pending xmlhttp request that is waiting to return with the newly updated file using this construct: while (!hasNewdata()) { sleep 3; } print "$thenewdata"; sub hasNewData() { # determine if...

Sending messages to server with Comet long-polling

What's the best way to send data from client to server? The example code I'm using is from http://stackoverflow.com/questions/333664/simple-long-polling-example-code ...

Asp.Net Chat server-side polling

Helo, I have implemented a chat application using Comet. the request is "hang" on the server until new messages arive. It, then, returns to the client with the new messages, and goes to the server again. My problem is: In order to check for new messages, I poll the database every 600 ms. I perform a simple query "select...from messa...