long-polling

How to make a realtime notification like facebook? [closed]

你离开我真会死。 提交于 2019-12-20 10:56:16
问题 Closed . This question needs details or clarity. It is not currently accepting answers. Want to improve this question? Add details and clarify the problem by editing this post. Closed 5 years ago . I am trying to make a realtime notification just like facebook.After learning and searching alot i m very confuse please explain me what is right and what is wrong.. Please make sure that the site may would have same number of users as Facebook We can make Realtime notification with long polling or

PubNub long polling vs sockets - mobile battery life

旧街凉风 提交于 2019-12-20 10:33:50
问题 I recently began using PubNub in my iOS app, and am very happy with it. However, I have been looking at the other options available, such as Pusher and Realtime.co, which use Websockets. PubNub, on the other hand, uses long polling. I have done my own little speed comparisons and for my purposes, I find that they are all fast enough. PubNub offers some nice features like message history and a list of everyone in the channel , so barring everything else I am leaning toward them. My question is

Long polling - Message system

旧城冷巷雨未停 提交于 2019-12-20 09:39:41
问题 I'm looking into doing some long polling with jQuery and PHP for a message system. I'm curious to know the best/most efficient way to achieve this. I'm basing is off this Simple Long Polling Example. If a user is sitting on the inbox page, I want to pull in any new messages. One idea that I've seen is adding a last_checked column to the message table. The PHP script would look something like this: query to check for all null `last_checked` messages if there are any... while(...) { add data to

What technology does Google Drive use to get real-time updates?

若如初见. 提交于 2019-12-20 08:38:49
问题 What technology does Google Drive use to do real-time? When I type in a Google Drive document that is being accessed by multiple users, the Chrome Developer Tools Network tab shows that there are no WebSockets. I see that the two most frequent types of AJAX call have either "bind?" or "save?" in the URL. "save?" POST requests are made every time I type, which makes sense- normal AJAX for sending updates to the server. When another user types, the most recent "bind?" GET call stays open, and

What technology does Google Drive use to get real-time updates?

Deadly 提交于 2019-12-20 08:38:49
问题 What technology does Google Drive use to do real-time? When I type in a Google Drive document that is being accessed by multiple users, the Chrome Developer Tools Network tab shows that there are no WebSockets. I see that the two most frequent types of AJAX call have either "bind?" or "save?" in the URL. "save?" POST requests are made every time I type, which makes sense- normal AJAX for sending updates to the server. When another user types, the most recent "bind?" GET call stays open, and

long-polling info from mysql not working

假如想象 提交于 2019-12-20 03:16:46
问题 I'm trying to make long-polling based chat with ajax, jquery, php and mysql, but something seems wrong (also i'm new to long-polling). index.php: <?php include 'db.php'; $result = mysql_query("SELECT id FROM chatpoll ORDER BY id DESC LIMIT 1"); while($row = mysql_fetch_array($result)) { $old_msg_id = $row['id']; } ?> <html> <head> <script src="http://jqueryjs.googlecode.com/files/jquery-1.3.2.min.js" type="text/javascript" charset="utf-8"></script> <script type="text/javascript" charset="utf

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

百般思念 提交于 2019-12-20 02:51:34
问题 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 be great. Forgive my ignorance; of course, if there's somewhere that explains it in a non-basic "this is good enough until you get 1000 visitors way", I'd be

CAUTION: provisional header are shown [duplicate]

假如想象 提交于 2019-12-20 02:40:45
问题 This question already has answers here : “CAUTION: provisional headers are shown” in Chrome debugger (32 answers) Closed 5 years ago . I cant debug this message which appeared like a week ago. I tried restoring to old files but this is odd, nothing solves my problem. So: I have two long polling requests. (turning one of them off does not help). for example this is one of them: public function update_private_messages_ajax_handler(){ global $wpdb; global $bp; $chat_table = $wpdb->prefix . 'bp

Can't have several threads per session

随声附和 提交于 2019-12-20 02:06:36
问题 I am buidling some webapp and have implemented long-polling (and a command queue in my db) so my server can send commands to my cleint asynchronously, etc. The commands are encoded into json and sent over ajax calls for the client to server, and via long-polling for the server to client way. Everything was working just fine, until I included my "Authentication module" in the ajax.php file. This module wraps the session stuff and calls session_start(). The problem is that, my long polling

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

折月煮酒 提交于 2019-12-19 03:58:53
问题 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: performance, ease of deployment/programming, customization, ... 回答1: IIS + WebSync is a very straight-forward, scalable and extensible solution for server