comet

AJAX Comet - Is there any solution Microsoft is working on or supports to allow it to be scalable?

回眸只為那壹抹淺笑 提交于 2019-12-01 05:50:31
问题 I notice a lot of questions and articles talking about ajax comet. I also found some links to make it "scalable" since some of those posts talk about how it isn't that scalable with ASP.Net. I'm wondering if Microsoft has a solution they're working on or that is out that addresses an AJAX Comet solution for ASP.Net that is free. As a side question, I'm wondering this because Microsoft.NET 4.5 talks about WebSockets, which seems to be a "better" solution than AJAX Comet? Or am I wrong on this

Twisted and Websockets: Beyond Echo

[亡魂溺海] 提交于 2019-12-01 03:02:16
In my ongoing curiosity about websockets, I'm noticing a trend: The "hello world" of the websocket universe, at least at the moment, seems to be "echo" functionality. That is, the demonstrated application is typically, "I send something, I receive something." While aptly demonstrating that the protocol is functional, this example only actually demonstrates the same type of communication that the traditional request / response cycle enables. For example, the only demonstration (on the server side) that I can find of twisted.web.websockets is the following: import sys from twisted.python import

初识Comet技术

最后都变了- 提交于 2019-12-01 02:30:54
初识Comet技术 一、服务器推送技术概述 服务器推送技术(Servers Push)的基础思想是将浏览器主动查询信息改为服务器主动发送信息。服务器发送一批数据,浏览器显示这些数据,同时保证与服务器的连接。当服务器需要再次发送一批数据时,浏览器显示数据并保持连接。以后,服务器仍然可以发送批量数据,浏览器继续显示数据,依次类推 。主要应用于: 监控系统:报警提示; 即时通信系统:其它用户登录、发送信息; 即时报价系统:后台数据库内容发生变化; 实现基于web的实时事件通知 。 实现方式有: 基于客户端套接口 : 采用RMI、CORBA或者自定义TCP/IP信息的applet来实现 Comet: 基于 HTTP 长连接、无须在浏览器端安装插件的技术 1.传统轮询 在Web早期,这一点常使用meta刷新实现。这将自动指示浏览器在指定秒数之后重新装载页面,从而支持简陋的轮询(polling)。例如在HTML文件中加入<META HTTP-RQUIV="Refresh" CONTENT=12>,实际上就是HTTP头标告知浏览器每12秒更新一次文档。 优点:不需要服务器端的配置。 缺点:a) 糟糕的用户体验; b) 对服务器的压力很大,并且造成带宽的极大浪费。 2. Ajax轮询 Ajax隔一段时间(通常使用JavaScript的setTimeout函数)就去服务器查询是否有改变

jsonp comet hanging request causes ugly “loading” status on browsers

亡梦爱人 提交于 2019-11-30 16:36:23
I'm using jsonp to do cross-domain comet requests, and the "loading" status is really annoying. Is there any way to suppress this with javascript? For those who are unfamiliar with jsonp, it basically injects a script tag, except in my case, I'm hanging the request on my server without returning the request until a later time. During this time, browsers see my request as a "loading" state. I am using this: http://code.google.com/p/jquery-jsonp/ Thanks in advance! As far as I know, there is no way to suppress the loading status using Javascript, regardless of why you have it. However, there is

Web Chat Application - ASP.NET/Jabber/Ajax/WCF/Comet/ReverseAjax - Issues Faced - Seeking Insights

给你一囗甜甜゛ 提交于 2019-11-30 15:31:27
I've been trying to build a web based chat application for the past three weeks and i'm facing issues with whatever route (programming technique/technology) i take to build it. I've explained the issues i've experienced with all of'em below. Kindly provide whatever insights you have in this. ASP.NET-AJAX First issue is that it is Not Really Real Time If client hits the chat server every x seconds (constant time stamp) it is not going to be real time unless x is very very less If x is very small like 1 second and if there are 1000 users online at the same time i think it is really going to

NodeJS + socket.io: simple Client/Server example not working

一个人想着一个人 提交于 2019-11-30 12:18:47
问题 I’m using NodeJS v0.4.8 and the latest Version of socket.io from npm install socket.io on Ubuntu: Linux mars 2.6.38-8-generic #42-Ubuntu SMP Mon Apr 11 03:31:50 UTC 2011 i686 i686 i386 GNU/Linux The following code unfortunately doesn't produce any output, wheter on client, nor on server side. Does anybody have a clue? SERVER-SIDE var http = require('http'), io = require('socket.io'), fs = require('fs'), sys = require('sys'); respcont = fs.readFileSync('testclient.js'); server = http

comet 异步请求技术中相关关键字解释 (新手向)

≡放荡痞女 提交于 2019-11-30 12:01:46
最近想在产品中加入即时通讯的功能.BS架构的程序.实现方式不外乎两大标准下的各种奇淫技巧. 这两大标准就是 HTML5 HTML4 为啥这两个呢..因为HTML5里面有websocket.这个彻底颠覆http请求的东西,使得请求不再是无状态的. 当然websocket目前支持不是很好.也没办法.看着好东西没法用.这是一种何种的煎熬....搞得我总是想在产品里面内嵌chromeFrame.然后强制给客户装上.哈哈...当然客户没准会和我拼命呢... 没办法,在现有的需求中基本上,实现思路只有一个了.也就是第一个让我头疼了一阵的关键词 "轮询" 这词看上去很高级的样子,其实就是写个ajax间隔一段时间不断向服务器请求内容.这活谁都干过. 然后我就想啊.如果用轮询实现,那也显得太低级了吧.怎么着.咱得弄个高级点的技巧显摆显摆..于是,查了一番资料,一个更加装逼的词语蹦到了偶的眼前 "长轮询" 看,变长了果然不一样了.这个词还伴随着一个英文 "comet" 其实原理很简单.以往的web请求,服务器处理请求后要立即返回,尽管超时的时间也能到达30秒这么多(并不是说用了comet才可以允许连接在服务器等待,我也可以让连接在服务器端sleep).但是连接只能存在于本次请求中.无法保持住.而comet允许连接请求过来后被保持住(保存起来,如session里面).当我需要的时候

11道浏览器原理面试题

假如想象 提交于 2019-11-30 09:35:20
浏览器与新技术 面试题来源于我的项目 「前端面试与进阶指南」 本章关于浏览器原理部分的内容主要来源于 浏览器工作原理 ,这是一篇很长的文章,可以算上一本小书了,有精力的非常建议阅读。 常见的浏览器内核有哪些? 浏览器/RunTime 内核(渲染引擎) JavaScript 引擎 Chrome Blink(28~)<br />Webkit(Chrome 27) V8 FireFox Gecko SpiderMonkey Safari Webkit JavaScriptCore Edge EdgeHTML Chakra(for JavaScript) IE Trident Chakra(for JScript) PhantomJS Webkit JavaScriptCore Node.js - V8 浏览器的主要组成部分是什么? 用户界面 - 包括地址栏、前进/后退按钮、书签菜单等。除了浏览器主窗口显示的您请求的页面外,其他显示的各个部分都属于用户界面。 浏览器引擎 - 在用户界面和呈现引擎之间传送指令。 呈现引擎 - 负责显示请求的内容。如果请求的内容是 HTML,它就负责解析 HTML 和 CSS 内容,并将解析后的内容显示在屏幕上。 网络 - 用于网络调用,比如 HTTP 请求。其接口与平台无关,并为所有平台提供底层实现。 用户界面后端 - 用于绘制基本的窗口小部件

Options for real-time web notifications and updates using Comet/XMPP vs WebSocket technologies on a Microsoft stack?

假如想象 提交于 2019-11-30 08:58:42
I am scoping out the architectural options for a project that will render live updates (like Facebook) of user activities - logins, photos, etc. Two main UI components of this are an auto-updating scrolling area where new notifications will be listed (photos, etc.), and a toolbar that will update with things like updated message counts, etc. The contenders for this are Jabber/Comet/XMPP-based and WebSocket technologies. Comet camp: Pokein WebSync WebSockets camp: Kaazing LightStreamer SuperWebSocket XSockets SignalR Since this the existing infrastructure is a Microsoft stack, I would rather

深入了解 Dojo 的服务器推送技术

試著忘記壹切 提交于 2019-11-30 08:54:21
本文首发于IBM Developeworks: http://www.ibm.com/developerworks/cn/web/1202_zhouxiang_dojocometd/ ,感谢 JayZ 的投稿。 简介: 服务器推送技术已经出来一段时间了,业界上也有不少基于这种技术(应该说是设计模式)的开源实现,但是要移植或者说应用到自己的项目上都比较麻烦。Dojo 这样一个大型的 Web2.0 开发框架提供了一套封装好的基于服务端推送技术的具体实现(包括服务端 Java 和客户端 Web 和 JavaScript),它基于 Bayeux 协议,提供了一些简单而且强大的接口可以让你快速构建自己的服务端推送功能。客户端实现即 Dojo 的 Cometd 前端组件,它封装了建立连接、消息订阅等等接口。服务端基于 Jetty 和 annotation,组建消息推送机制,同样也封装了比较简单但实用的消息推送接口,与前端 Dojox 的 Cometd 接口协同工作。这篇文章将重点介绍 Dojo 的服务端推送机制是如何运作的,以及我们应该如何基于 Dojo 的 Cometd 工具包构建自己的服务端推送功能。 服务器推送技术和 Bayeux 协议简介 服务器推送技术的基础思想是将浏览器主动查询信息改为服务器主动发送信息。服务器发送一批数据,浏览器显示这些数据,同时保证与服务器的连接