long-polling

How should I implement the C# server side portion of long-polling for ajax requests?

I've got an architecture that involves browsers polling via ajax every 3 seconds for updates and I'd like to change that to long-polling. I'd like to have 1, 2.. {n} clients long-polling, waiting for updates and have something happen on the server to signal the waiting clients to return. My first thought was to use an EventWaitHandle, ...

Why does setting document.domain require me to set it in all popups and iframes too?

I'm using a long-polling iframe solution for a chat script. Unfortunately, this requires me to set document.domain='yourdomain.com' in the iframe and main document, because the iframe is a subdomain call. The huge problem is...now all my other scripts that use popups and iframes are broken. They now require me to put document.domain i...

How do I stop a jQuery long-polling request?

I'm using... $.getJSON(url + "&callback=?", function (b) { ....... }); for a long-polling request. Sometimes it is necessary that I stop the current request being made. Is this possible? ...

Recommendation for integrating nodejs with php application

I have an existing app written in PHP (using Kohana framework) and I want to do long polling. From some things I read it seems that doing long polling with PHP is not advisable and using something like nodejs is a better choice. My question is what's the best way to integrate nodejs (or some other well suited tool for long polling) with ...

How do I keep FireFox from "spinning" with a long-polling request?

I'm using the following for a long-polling request... $.getJSON(url, function(data) { ... }); The request won't finish until either 30 seconds have passed or there is information to send (long-polling). The problem is that Firefox is the only browser that will display "Waiting for URL..." at the bottom. Is there any way to prev...

'Loading' web page for async call

I have a simple web page in ASP.NET / C#. Currently to fully render the data I require calling a block of code that runs on background threads and can take multiple minutes to complete. I've got it to the point (using the async attribute on the page declaration) to execute and return fine with the html once it's done. What I'd like it...

How to send data many times to web browser in response to one request?

I have a form on my web page, it allows to submit many queries to my website, every query is on a separate line in TextArea. Because waiting for all queries to complete is too long I would like to update the web page after every query completes - send result of one query to a web browser, new result should be appended to old results tha...

What is the best BlazeDS polling method for an low bandwidth network?

I am wondering BlazeDS polling configuration, simple or long polling, is the best for a low bandwidth network. ...

Comet and long polling requests on DreamHost?

Is there any solution for running these kind of operations on DreamHost or other shared hosting environments where I don't have access to tweak apache? ...

Need help implementing an Android service that does http long polling

I've seen persistent TCP connections implemented (http://devtcg.blogspot.com/2009/01/push-services-implementing-persistent.html), but my needs are a little different. I need an Android service that always runs in the background and keeps a long polling connection to an HTTP server and communicates with it using JSON over POST method. D...

using thin for long-polling connection

since it's threadless, would the ruby-based thin be okay? ...

why do you need an event-loop for asynchronous requests (e.g., AJAX long polling)

I understand that it's considered bad design to use a normal, threaded webserver (e.g., Apache) for AJAX long polling…but I don't really understand why. Is it because each longpolling request takes significantly more time than a normal one would (thus tying up the processor)? And if that's the case, do threads really take that much ove...

Long polling with URLStream in ActionScript - how to know when to do something with the data?

I'm trying to open a connection to a URL that will periodically send over a JSON object. I know that I need to use URLStream and some event callbacks, but I'm in the dark when it comes to knowing how streams of data "work," or the general flow of operations. Assume I know how to open the connection and send the correct request headers. F...

How does a (full featured) long polling server work abstractly

Since you're using an event loop as opposed to threads, how does the actual server look? I know it uses an event loop, but how do you separate out the requests? And how do you prevent your server from running extremely slowly (since it, I assume, can only push one thing at a time since it's threadless?) Some sort of pseudo-code would b...

How would I implement COMET for my (Flash) browser-based game?

Hi eveyrone, I am currently trying to write a browser-based game that allows multiple users to navigate in a 2D map. It's RPG based and requires COMET as a technique for two users appearing and interacting on one screen, should they happen to appear in the same frame. Also, in the game, I am embedding the maps within the SWF file, but ...

Best choice for Long-polling / Comet in Java or C#?

Which native server is best, in your opinion, to implement long-polling / Comet? The first target application is chat, but there will be other implementations - we basically need push-to-client capabilities. I'm limiting the answers to C# or Java because these two technologies are dominant at my workplace. The requirements are as usual:...

how to unblock browser when using while loop?

i make an ajax request to a php file that runs a while loop that looks for new data in the database, but i cant give it new data because the browser is blocked while waiting for the new data. does anyone know how to not block the browser? ...

Capturing event of client disconnecting! - Gevent/Python

Hi folks, I'm using long polling for a chat with gevent. I'm using Event.wait() when waiting for new messages to be posted on the chat. I would like to handle the occasion a client disconnects with some functionality: e.g. Return "client has disconnected" as a message for other chat users Is this possible? =) ...

How to use Servlet 3 @WebServlet & async with Spring MVC 3?

I wanna integrate the servlet 3.0 async support with spring MVC. Something like: @RequestMapping("/chat") @WebServlet(name="myServlet", asyncSupported=true) public String getMessage(String userName) { ...... } is it possible? ...

WebSockets verus Long-Polling versus TCP Scalability/Ease of Use

I'm writing a backend for a mobile web-app based in Java and I was wondering as far as scalability and ease of use go what are the pros and cons associated with using WebSockets versus Long-Polling solutions like comet. Another option would also be implementing my own solution using TCP. From what I've read it seems that you need to run ...