简体   繁体   English

是什么原因导致甚至没有看到一些“有用的”和公开的基于websocket的服务?

[英]What's the reason for not seeing even a handful of “useful” and publicly available websocket based services out there?

What's the reason for not seeing even a handful of "useful" and publicly available websocket based services out there? 是什么原因导致甚至没有看到一些“有用的”和公开的基于websocket的服务?

RESTful services are plenty like the one below which is weather forecast related. RESTful服务很像下面的天气预报相关的服务。

http://api.openweathermap.org/data/2.5/forecast?q=chicago,us&mode=json

However, why aren't there services like 但是,为什么没有这样的服务

ws://api.openweathermap.org/...

with some documentation about what messages a websocket client can expect to send and receive bi-directionally over a single connection? 有一些文档可以说明websocket客户端可以通过单个连接双向发送和接收哪些消息?

What's the reason for not seeing even a handful of "useful" and publicly available websocket based services out there? 是什么原因导致甚至没有看到一些“有用的”和公开的基于websocket的服务?

Maybe because websockets were not created for that? 也许是因为没有为它创建websockets? They came from the HTML5 initiative and were created to replace Ajax interaction between a browser and a web site for real time web applications. 它们来自HTML5计划,旨在取代浏览器和网站之间的Ajax交互,以实现实时Web应用程序。 No more polling, long-polling, streaming, flash sockets, or any other HTTP hack to make a server push data to the browser. 不再需要轮询,长轮询,流式传输,闪存套接字或任何其他HTTP攻击来使服务器将数据推送到浏览器。 Webocket is the real thing. Webocket是真实的东西。

Most web services now follow a request/reply pattern while the websocket is still a maturing technology. 大多数Web服务现在都遵循请求/回复模式,而websocket仍然是一种成熟的技术。 Give it time and services will appear, services that actually need the capabilities of websockets and not use them just because "there is a new kid in town". 给它时间和服务将出现,服务实际上需要websockets的功能,而不是仅仅因为“城里有一个新的孩子”。

As a final note, here is something for websockets emerging from Microsoft. 最后需要注意的是, 是针对微软新出现的websockets的东西。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM