comet

Node.js vs Java for Comet application [closed]

旧巷老猫 提交于 2019-12-02 16:00:49
We look to build a high-performance, scalable Comet server, and thought first about using Java Grizzly with GlassFish. But after some research, we see that Node.JS is taking rapidly as the preferred choice due to extreme simplicity, and claimed performance: http://news.ycombinator.com/item?id=1088699 http://amix.dk/blog/post/19484 I will be happy to hear some real-life experience of using both, and what ultimately can be the best choice down the road. Thanks! If you would further read the blog posts by the same author, namely the post, Is node.js best for Comet , he explains why he again went

PHP/MYSQL AJAX Chat

a 夏天 提交于 2019-12-02 09:48:28
Looking for an open source php/mysql ajax chat room (not 1-to-1 private chat). What would you guys recommend? I am going to need to make hundreds of instances of the chat room (eg. each user group has their own exclusive chat room) Take a look at phpFreeChat. It's an active project which is easy to implement. http://www.phpfreechat.net/ I think Ajax Chat is great. https://blueimp.net/ajax/ Very customizable appearance and integration into your site. I was hunting for a solution that fit in well with my existing layout... I thought phpfreechat was difficult... you may have more luck. I think

Any way to push Javascript from NodeJS server to client for updates?

时光总嘲笑我的痴心妄想 提交于 2019-12-02 09:02:36
In Scala's Liftweb there are some classes which allow for Javascript to be pushed to the browser via comet/ajax after the page has loaded. Some documentation here . The usage could be for example when someone submits a form to the server, the form would submit via AJAX and then some Javascript can be sent from the server to the client to show some error message. Well this is just for example, there are better ways to do form validation. Is there any way to push Javascript from the NodeJS server to the client to do updates? Any standard way to do this? Why I want to do this is that its nicer to

Check connection is active in ASP.NET

北战南征 提交于 2019-12-02 07:28:41
I work on a Comet application written in ASP.NET. There is an array of active connection contexts ( HttpContext ). And there is a thread that should periodically iterate through the collection and check theirs state. So application architecture is not thread-per-request. What is the best way to check that a connection is active (not closed by the remote host)? I found this: context.Response.Write(' '); context.Response.Flush(); if (!context.Response.IsClientConnected) { // ... } But it's not a good solution because it takes a thread time to process (Flush() is blocking operation). I need

How to load APR Connector (Native) in JBoss 7

丶灬走出姿态 提交于 2019-12-02 07:18:57
问题 I want to use Atmosphere XMPP but i need to load native connector APR. I am not very familiar as of yet with JBoss 7 so i was wondering if anyone knows how to do this? WIndows x64 or Linux x64 environment. Doesn't matter. Thanks 回答1: Assuming Linux x64 here. I am using Ubuntu 11.04 x64. Download JBoss7 distribution and unzip it to a suitable directory ( from here I am assuming that you have it in your '/home/myname/tools/jboss701/' folder. Start it using /jboss701/bin/standalone.sh and verify

How to load APR Connector (Native) in JBoss 7

ⅰ亾dé卋堺 提交于 2019-12-02 01:30:17
I want to use Atmosphere XMPP but i need to load native connector APR. I am not very familiar as of yet with JBoss 7 so i was wondering if anyone knows how to do this? WIndows x64 or Linux x64 environment. Doesn't matter. Thanks Assuming Linux x64 here. I am using Ubuntu 11.04 x64. Download JBoss7 distribution and unzip it to a suitable directory ( from here I am assuming that you have it in your '/home/myname/tools/jboss701/' folder. Start it using /jboss701/bin/standalone.sh and verify that it started properly ( check localhost:8080 url). Close the jboss for now. Download the native

Servlet 3.0 实战:异步 Servlet 与 Comet 风格应用程序

会有一股神秘感。 提交于 2019-12-01 17:18:33
概述 作为 Java EE 6 体系中重要成员的 JSR 315 规范,将 Servlet API 最新的版本从 2.5 提升到了 3.0,这是近 10 年来 Servlet 版本号最大的一次升级,此次升级中引入了若干项令开发人员兴奋的特性,如: 可插拔的 Web 架构(Web framework pluggability)。 通过 Annotations 代替传统 web.xml 配置文件的 EOD 易于开发特性(ease of development)。 Serlvet 异步处理支持。 安全性提升,如 Http Only Cookies、login/logout 机制。 其它改进,如文件上传的直接支持等。 其中,在开源社区中讨论得最多的就是 Servlet 异步处理的支持,所谓 Servlet 异步处理,包括了非阻塞的输入/输出、异步事件通知、延迟 request 处理以及延迟 response 输出等几种特性。这些特性大多并非 JSR 315 规范首次提出,譬如非阻塞输入/输出,在 Tomcat 6.0 中就提供了 Advanced NIO 技术以便一个 Servlet 线程能处理多个 Http Request,Jetty、GlassFish 也曾经有过类似的支持。但是使用这些 Web 容器提供的高级特性时,因为现有的 Servlet API 没有对这类应用的支持

comet学习(一)异步Servlet 与Comet 风格应用程序(转)

牧云@^-^@ 提交于 2019-12-01 17:18:17
简介 : 自 JSR 315 规范(即Servlet 3.0)的草案公开发布以来,最新一代Servlet 规范的各种新特性被越来越多的 开发人员所关注。规范中提到的一系列高级目标:如可插拔的Web 框架、便捷开发特性、增强安全性支持等都令人期 待。但其中关注程度最高的,毫无疑问是异步Servlet。本文将详细介绍Comet 风格应用的实现方式,以及Servlet 3.0 中的异步处理特性在Comet 风格程序中的实际应用。 概述 作为 Java EE 6 体系中重要成员的JSR 315 规范,将Servlet API 最新的版本从2.5 提升到了3.0,这是近10 年来 Servlet 版本号最大的一次升级,此次升级中引入了若干项令开发人员兴奋的特性,如: 1. 可插拔的Web 架构(Web framework pluggability)。 2. 通过Annotations 代替传统web.xml 配置文件的EOD 易于开发特性(ease of development)。 3. Serlvet 异步处理支持。 4. 安全性提升,如Http Only Cookies、login/logout 机制。 5. 其它改进,如文件上传的直接支持等。 其中,在开源社区中讨论得最多的就是Servlet 异步处理的支持,所谓Servlet 异步处理,包括了非阻塞的输入/输 出、异步事件通知

Can JavaScript detect when the user stops loading the document?

早过忘川 提交于 2019-12-01 15:27:55
问题 I'm implementing Comet using the script tag long polling technique, based on this page. One issue (that I don't think there's a solution for) is the "throbber of doom" - the browser continues to show the document as "loading" forever and leaves the Stop button on the toolbar enabled. This kind of makes sense, because the document is still loading and while it's not ideal, I think I can live with it. The second issue, though, is that if the user actually clicks Stop then the browser stops

GWT + GAE python: frameworks for COMET & RPC

拟墨画扇 提交于 2019-12-01 13:18:58
Let's say I want to use Google GWT on the client side and Google AppEngine Python on the server side. Furthermore, I want to be able to use RPC calls to the server as well as performing COMET based exchanges. What are my options in term of existing frameworks? I found this by googling "gwt python": http://code.google.com/p/python-gwt-rpc/ -- it appears to be unsupported, since App Engine supports Java now. And this, by googling "gwt comet": http://code.google.com/p/rocket-gwt -- which should work on your client-side to make hanging GETs to the server, which conceivably could be written in