comet

C#/ASP Based Reverse AJAX

岁酱吖の 提交于 2019-11-28 10:34:07
I have a current project running using APE that needs to work on C#/.NET... I was wondering if anyone had any suggestions for either a method of approaching Reverse AJAX/Comet on C#/.NET or any packages such as APE that are available. EDIT For clarification, APE doesn't work on Windows. Which is a restriction I have with the project. I think that you asking for something like http://www.frozenmountain.com/websync/ or http://www.aaronlerch.com/blog/2007/07/08/creating-comet-applications-with-aspnet/ This is called comet technique and is a web application model in which a long-held HTTP request

Writing a chat application [closed]

人走茶凉 提交于 2019-11-28 07:37:05
I'm wondering what's the right way to code a chat application for thousands of users. I'm just confused how will I be able to ping the server using AJAX every second or maybe less and check if there are new records in MySQL, etc with an acceptable amount of server(s) load. I'm currently thinking about coding this using jQuery, PHP and MySQL. Please advice. Your help would be greatly appreciated. Client Side For any program that needs to poll the server I would recommend WebSockets . I wrote an extremely basic WebSocket tutorial . I also used the web-socket-js code to implement a FlashSocket

Comet VS Ajax polling

∥☆過路亽.° 提交于 2019-11-28 07:03:12
I need to create a chat like facebook chat. With Comet I need more memory to keep the connection. With Ajax polling there is a latency problem if I send request every 3-4 seconds. So... If the latency ( 3-4 seconds ) doesn't matter, Is Ajax Polling better for my case ? Latency is not the only problem. COMET (long-polling) "saves" your traffic - when you use polling, you cannot know, if there were changes on the server, so some of the calls may be just a waste of traffic and resources (e.g., even if no one's chatting, you're making calls every 3-4 seconds). In case of COMET, you generally need

Comet & PHP: How to use Comet with a PHP Chat System?

佐手、 提交于 2019-11-28 06:34:36
I have to build a simple chat system in PHP using Comet. I don't know what would be the best approach to this project. What is the best technique (cross-browser would be nice) to use, and how to implement it ? What libraries can I use that already have comet support. ( I don't want to use the Bayeux Protocol ) I already have a PHP backend running for the chat system, but I need some ideas for the interaction between client and server. Thank you all in advance. My regards. You may want to look at WebChat2 This project uses comet, AJAX, and a custom HTTP server to communicate with IRC via

How to implement event listening in PHP

放肆的年华 提交于 2019-11-28 06:06:30
here is my problem: I have a script (let's call it comet.php) whic is requsted by an AJAX client script and wait for a change to happen like this: while(no_changes){ usleep(100000); //check for changes } I don't like this too much, it's not very scalable and it's (imho) "bad practice" I would like to improve this behaviour with a semaphore(?) or anyway concurrent programming technique. Can you please give me some tips on how to handle this? (I know, it's not a short answer, but a starting point would be enough.) Edit : what about LibEvent ? You can solve this problem using ZeroMQ . ZeroMQ is a

Choosing and deploying a comet server

╄→尐↘猪︶ㄣ 提交于 2019-11-28 05:06:39
I want to push data to the browser over HTTP without killing my django/python application. I decided to use a comet server, to proxy requests between my application and the client (though I still haven't really figured it out properly). I've looked into the following engines: orbited cometd ejabberd jetty Has anyone had any experience working with these servers and deploying them? Any insight and links regarding the topics would be great. Thank you. I would recommend looking into Twisted, their twisted.web server, and the comet work done on top of it at Divmod. They can handle far more

Need help understanding Comet in Python (with Django)

天涯浪子 提交于 2019-11-28 04:57:05
After spending two entire days on this I'm still finding it impossible to understand all the choices and configurations for Comet in Python. I've read all the answers here as well as every blog post I could find. It feels like I'm about to hemorrhage at this point, so my utmost apologies for anything wrong with this question. I'm entirely new to all of this, all I've done before were simple non-real-time sites with a PHP/Django backend on Apache. My goal is to create a real-time chat application; hopefully tied to Django for users, auth, templates, etc. Every time I read about a tool it says I

How to make all connected browsers reload initiated by a server-side event

我只是一个虾纸丫 提交于 2019-11-28 04:37:05
问题 Suppose there is a webpage with dynamically generated content -- say a div containing the current number of connected browsers. When the count changes on the server I want all connected browsers to reload the count so that everyone sees the increment/decrement. What's the best way to accomplish this? Keywords: ajax, broadcast, browser, div, jquery 回答1: I think COMET might be what you're looking for. Web Sockets would be ideal but lack of browser adoption wouldn't make it practical right now.

Server Scalability - HTML 5 websockets vs Comet

穿精又带淫゛_ 提交于 2019-11-28 03:12:40
Many Comet implementations like Caplin provide server scalable solutions. Following is one of the statistics from Caplin site: A single instance of Caplin liberator can support up to 100,000 clients each receiving 1 message per second with an average latency of less than 7ms. How does this to compare to HTML5 websockets on any webserver? Can anyone point me to any HTML 5 websockets statistics? Martin Tyler Disclosure - I work for Caplin. There is a bit of misinformation on this page so I'd like to try and make it clearer.. I think we could split up the methods we are talking about into three

Servlet-3 Async Context, how to do asynchronous writes?

好久不见. 提交于 2019-11-28 02:45:38
Problem Description Servlet-3.0 API allows to detach a request/response context and answer to it later. However if I try to write a big amount of data, something like: AsyncContext ac = getWaitingContext() ; ServletOutputStream out = ac.getResponse().getOutputStream(); out.print(some_big_data); out.flush() It may actually block - and it does block in trivial test cases - for both Tomcat 7 and Jetty 8. The tutorials recommend to create a thread pool that would handle such a setup - witch is generally the counter-positive to a traditional 10K architecture. However if I have 10,000 open