server-push

SockJS or Socket.IO? Worth to recode ajax-based page? [closed]

邮差的信 提交于 2019-11-30 02:53:36
Which one's better: Socket.IO or SockJS and what are the biggest differences? How difficult is it to rebuild a completely ajax based page into a node.JS / socket.io based page? Do I have to recode absolutely everything? Are there any good tutorials on how to do this? Is it worth to do it (in your opinion)? SockJS has more server-side options available. If you don't want to be tied to Node.js, then it may be an option. The scaling seems to work best, from some benchmarks using PyPy to host the server-side portion. socket.io has more transport options, which include Flash. Even if you don't like

Pushing data from SQL Server to Web Application with SignalR

∥☆過路亽.° 提交于 2019-11-30 00:49:17
My ASP.NET MVC 4 Web application is displaying frequently updated data to the client. Data originate from an external source (an application installed on the server) and processed by SQL Server 2008 R2. Currently the data flow is quite traditional: clients polls from ASP.NET, ASP.NET polls in its turn from SQL Server. To avoid polling (and now that I require a real-time interaction between the users of the Web Application), I am changing the approach to push, using signalR to broadcast data to clients. This increases the smoothness of the user experience and also reduces the overhead of

Apache with Comet Support

我与影子孤独终老i 提交于 2019-11-29 17:04:37
I'd like to build a multiplayer web game application in which it supports chat. I presume the application will have to handle hundreds of simultaneous connections. I'm planning to host my application in a shared web hosting, which has these limitations (most likely similar to PHP + Comet (long-polling) scaling / hosts ): It does not seem I can change the web server. Most likely it's using Apache. Supports MySQL 5, PHP 5.3.x, Perl, Python, Ruby on Rails, CGI (To be more precise, I'll be using HawkHost's shared web hosting.) And here are my result of research, followed by my questions: Some

Implementing Server Push

|▌冷眼眸甩不掉的悲伤 提交于 2019-11-29 03:51:22
问题 Read about Server push here. I want to push data to client from my web application in real time. I was looking at TCP sockets as one of the options. For HTTP I found a variety of frameworks for Java, PHP, Python and others over here. However I don't know whether any of these support Push. What options and frameworks would you suggest for implementing Server push? What language would you advocate for implementing the same and why? 回答1: I'm using Orbited right now, it's great! If you are doing

Does the browser cancel server push when a resource is in cache?

不想你离开。 提交于 2019-11-29 01:43:03
问题 The HTTP/2 specification indicates that any resource identified in a PUSH_PROMISE frame won't be pushed if the client cancels it. When a browser detects a resource already in the cache, it should cancel the push for this resource. However, I don't see how the browser can detect it. Do the frames provide additional informations like etag or last modified to allow the browser to detect if any cache entry must be evicted or if the push could be canceled? If it's possible, some bandwidth could be

SockJS or Socket.IO? Worth to recode ajax-based page? [closed]

你说的曾经没有我的故事 提交于 2019-11-28 23:46:09
问题 Which one's better: Socket.IO or SockJS and what are the biggest differences? How difficult is it to rebuild a completely ajax based page into a node.JS / socket.io based page? Do I have to recode absolutely everything? Are there any good tutorials on how to do this? Is it worth to do it (in your opinion)? 回答1: SockJS has more server-side options available. If you don't want to be tied to Node.js, then it may be an option. The scaling seems to work best, from some benchmarks using PyPy to

Loadbalancing web sockets

半腔热情 提交于 2019-11-28 15:07:30
I have a question about how to load balance web sockets. I have a server which supports web sockets. Browsers connect to my site and each one opens a web socket to www.mydomain.com . That way, my social network app can push messages to the clients. Traditionally, using just HTTP requests, I would scale up by adding a second server and a load balancer in front of the two web servers. With web sockets, the connection has to be directly with the web server, not the load balancers, because if a machine has a physical limit of say 64k open ports, and the clients were connecting to the load balancer

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.

asp.net http server push to client [closed]

こ雲淡風輕ζ 提交于 2019-11-27 20:10:06
What's the best way to push info from a server to a web client? I know it's possible to setup sockets with Silverlight and Flash but I want to stay way from those two technologies. Gmail seems to do a great job of polling the servers for updated emails and even their chat programs work great (all working in my web browser). Any ideas on the best way to do something like this but using asp.net? Edit: If I have to poll, i'd like to poll the server every 2 or 3 seconds. So I'm not sure how to do this without bringing the web server to it's knees under heavy usage. Christoph Since you mention ASP

text/event-stream recognised as a download

℡╲_俬逩灬. 提交于 2019-11-27 18:25:30
I'm trying to implement server push in my Flask project following this tutorial . I've set it all up with no errors, however when I go to the /stream page, Firefox recognizes it as a file and tries to download it. In Safari it just prints out the data sent. I tried adapting the code to a simpler implementation, where a thread just yields some data each second, however it produced the same results. My goal is for each time a python script reaches a point in a loop, it will update a progress bar on the web interface. Any help with this would be great. Thanks. Edit: app.py from flask import Flask