I would like to display real time updates on a web page (based on a status field in a database table that is altered by an external process). Based on my research, there are several ways of doing this.
Long Polling (Comet) - This seems to be complex to implement
Regular Polling - I can have an AJAX method trigger a database hit every 5...
I'm writing a webapp (Firefox-compatible only) which uses long polling (via jQuery's ajax abilities) to send more-or-less constant updates from the server to the client. I'm concerned about the effects of leaving this running for long periods of time, say, all day or overnight. The basic code skeleton is this:
function processResults(xm...
The scenario is as follows: a device (not a PC) makes an HTTP request to a server and passes in identifying information in the http headers. The http handler on the server receives the request and keeps it open (implementing a long poll type mechanism). At some point, a user running a desktop app invokes some UI that causes information t...
What are the benefits of using iframes for Comet long polling? Why not just keep an asynchronous ajax request in a script file pulled into the main page? Thanks.
...
Hi,
I am trying to create real-time and collaborative application like - google wave for example.
When user1 writes something at the same time it shows on user2 screens.
I started a little research,and found some ways to this with Ajax -
1.every X seconds send request to the server and to check what is "happening"
2.timeout - long re...
Hi,
How can I do long-polling using netty framework? Say for example I fetch http://localhost/waitforx
but waitforx is asynchronous because it has to wait for an event? Say for example it fetches something from a blocking queue(can only fetch when data in queue). When getting item from queue I would like to sent data back to client. Ho...
I want to mess around with realtime information, and there is a pretty standard functionality that I want to duplicate:
It occurs here on SO when you're on a single-question view, typing your answer, and an alert pops up top saying "there are 3 news answers, click to show"
It also occurs on Twitter "There are 5 new tweets in this searc...
Hello everyone.
I'm trying to write simple web application using Tornado and JS Prototype library. So, the client can execute long running job on server. I wish, that this job runs Asynchronously - so that others clients could view page and do some stuff there.
Here what i've got:
#!/usr/bin/env/ pytthon
import tornado.httpserver
impo...
I have a complicated page being rendered by PHP and would like to keep all elements of the page up to date via AJAX long polling. Is there some kind of general / clever way to design an infrastructure to support this without having to specify manually each element to update? Just looking for ideas. Thanks!
...
On Safari and Chrome, I won't be able to see flush() updates updating live on my page until after a certain number of flushes, or sometimes it hangs altogether on Safari. Flush updates work immediately on firefox though.
I'd like to know a couple things:
1) Why does Safari and Chrome lag out at the beginning with the flush updates, an...
I have developed a Flash based chat client that displays messages posted by users belonging to a group along with their username and time of writing. The data is stored in a mysql database with the group id, user id and message so that it persists beyond chat sessions and allows users logging in at a later time to see the discussions, le...
I want to create an application like this:
http://typewith.me/2wicOjuefI
What is the most efficient way to create this real time application ?
Flash ? Long polling ? Http Streaming ? or anything else ?
Thanks ;)
...
Are this chat using "long polling" or "http streaming" ?
http://go-mono.com/moonlight/chat.aspx
...
I'm doing long-polling with JSONP and firefox continually pops up the "Loading" spinner making the page seem like it hasn't finished loading. Is there a way to suppress this?
I've been told that the Orbited team has hacks for suppressing this, but looking through the Orbited.js code I cannot figure out what they are. Any help would ...
I am implementing a system where I need real-time updates. I have been looking at certain scenarios and among all was Comet. Implementing this I do not see any way this is different from traditional long-polling.
In both cases you have to send a request, and then the server send a response back. In the browser you interpret the response...
I'm trying to serve long polling requests for 60 secs using node.js. The problem I'm facing is, the browser is getting timed out. The same setup is working for 30 secs. Can anybody suggest how to achieve this? Using JQuery as JS framework.
Thanks...
...
This might seem ridiculously simple, but I've been getting all kinds of error depending on how I handle a query that returns nothing.
$query = "SELECT * FROM messages WHERE id > ".$messageId;
$result =mysql_query($query);
$time = time();
while(time()-$time<60 && $result==false)
{
$result = mysql_query($query);
}
if(result != false)...
I'm playing around a little bit with raw XmlHttpRequestObjects + Comet Long Polling. (Usually, I'd let GWT or another framework handle of this for me, but I want to learn more about it.)
I wrote the following code:
function longPoll() {
var xhr = createXHR(); // Creates an XmlHttpRequestObject
xhr.open('GET', 'LongPollServlet', tru...
My host is Joyent. My host says I have 15 process limit and prstat -J shows those processes but that doesn't tell me how many long polling requests are currently being served. I could record it myself but that would add alot of performance overhead. I need to know when the server is at its long polling limits. I know this limit occur...
I'm writing an AJAX web app that uses Comet/Long Polling to keep the web page up to date, and I noticed in Chrome, it treats the page as if it's always loading (icon for the tab keeps spinning).
I thought this was normal for Google Chrome + Ajax because even Google Wave had this behaviour.
Well today I noticed that Google Wave no longe...