comet

How can I call a javascript function on client browser from NodeJS server side?

拟墨画扇 提交于 2019-12-04 11:03:11
I'm programming on the NodeJS server side, I wish to call a javascript function on the client browser side. Hopefully I can call functions every now and then on the client browser side from the server side as if I an just calling the function on the server side. Is there some form or comet or RPC which can do this? I checked out Socket.IO but ended up using Faye instead. Faye is probably a little more functionality than you want, but it's so easy to setup and use. I found it more intuitive than Socket.IO. Not that Socket.IO looks tough, but Faye just looked easier. Here is the website: http:/

GWT and WebSocket / Push data from server to GWT client

寵の児 提交于 2019-12-04 10:51:10
问题 Is there any good library which supports WebSockets and is compatible with GWT? Ideally, the library would support WebSockets as well as a fallback for browsers which don't support WebSocket, e.g. a comet-like approach or polling. I'm currently using GWT-Comet to push data from my server to my GWT web application. However, this library is a bit broken in some aspects and it seems it's not maintained actively anymore. Thus, I'm searching for an alternative. 回答1: I found Atmosphere, which suits

So… ASP.NET MVC and WebSockets?

别等时光非礼了梦想. 提交于 2019-12-04 07:52:53
问题 I have an application in MVC 3 and I'm looking to add WebSockets (with fallback to Comet) to it. I've researched a bit and I found out the Comet part is pretty straightforward and I'd much rather do it myself. Just AsyncControllers and a pretty plain bit of js is all that's required to handle those long-lived ajax requests. Now, in the case of WebSocket, things start to get dirty. I've looked at a few libraries, but they mostly seem to set up a web server (therefore needing another host, or

nginx proxy to comet

泪湿孤枕 提交于 2019-12-04 07:36:51
问题 I need some help from some linux gurus. I am working on a webapp that includes a comet server. The comet server runs on localhost:8080 and exposes the url localhost:8080/long_polling for clients to connect to. My webapp runs on localhost:80. I've used nginx to proxy requests from nginx to the comet server (localhost:80/long_polling proxied to localhost:8080/long_polling), however, I have two gripes with this solution: nginx gives me a 504 Gateway time-out after a minute, even though I changed

Can XMPP be used like Comet's http long wait?

不问归期 提交于 2019-12-04 06:42:08
Can XMPP be applied in a similar way to the reverse Ajax pattern? Can it be used to implement http long wait like Comet ? Is there an example of using such a technique with XMPP? Yes. Take a look at XMPP over BOSH . It's a long-lived non-polling technique. From the BOSH specification : This specification defines a transport protocol that emulates the semantics of a long-lived, bidirectional TCP connection between two entities (such as a client and a server) by efficiently using multiple synchronous HTTP request/response pairs without requiring the use of frequent polling or chunked responses.

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

拈花ヽ惹草 提交于 2019-12-04 06:33:19
问题 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

How websockets can be faster than a simple HTTP request?

无人久伴 提交于 2019-12-04 02:31:47
You still need to send requests from your computer to the website's server and back and forth. How can websockets make it so much faster? Rahul Tripathi WebSocket is a extension for HTTP. For low-latency communication Web Sockets are better. Also check this article How can websockets make it so much faster? To establish a WebSocket connection, the client and server upgrade from the HTTP protocol to the WebSocket protocol during their initial handshake, as shown in the following example:- GET /text HTTP/1.1 Upgrade: WebSocket Connection: Upgrade Host: www.websocket.org HTTP/1.1 101 WebSocket

GWT + GAE python: frameworks for COMET & RPC

戏子无情 提交于 2019-12-04 02:17:53
问题 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? 回答1: 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

Long Polling with Java and JBoss

此生再无相见时 提交于 2019-12-04 01:41:52
问题 I'm looking for an example, how to implement a longpoling mechanism in java. I would love to use a stateless EJB. I know that something like that would work: @WebService(serviceName="mywebservice") @Stateless public class MyWebService { @WebMethod public String longPoll() { short ct = 0; while(someCondition == false && ct < 60) { sleep(1000); // 1 sec ct++; } if (someCondition) return "got value"; else return ""; } } Unfortunately i know that this does'nt scale. Can i return in the webmethod

Twisted and Websockets: Beyond Echo

你说的曾经没有我的故事 提交于 2019-12-04 00:26:24
问题 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