TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

RESTful Realtime

51 点作者 jconley超过 11 年前

6 条评论

Codhisattva超过 11 年前
Screw long polling. Use websockets.
评论 #7033489 未加载
评论 #7034613 未加载
hcarvalhoalves超过 11 年前
That&#x27;s an interesting approach, but it&#x27;s still pooling, although I wouldn&#x27;t know better.<p>Does anyone know what the alternatives are? Can you avoid pooling and still speak HTTP?
评论 #7032837 未加载
评论 #7032802 未加载
评论 #7033977 未加载
mmerickel超过 11 年前
As far as a REST API supporting etags and if-none-match headers, it&#x27;s pretty unexpected that if I supply an if-none-match to the request, the server may keep the connection open for an arbitrary amount of time. I&#x27;d expect that behavior to be a side-channel of the normal 304 response. For example, it should only keep the connection open if I supply ?timeout=60 resource option or X-Modification-Timeout: 60 header.
ctide超过 11 年前
Your code samples are incredibly hard to read, you should use a different library to generate those. I don&#x27;t know if it&#x27;s just a Chrome thing, but they look like this to me:<p><a href="http://imageshar.es/52cf03f8f629007c1400043e" rel="nofollow">http:&#x2F;&#x2F;imageshar.es&#x2F;52cf03f8f629007c1400043e</a>
评论 #7032999 未加载
tucaz超过 11 年前
I&#x27;m curious if you guys did consider SignalR. Did you? If yes, yeah not use it?
评论 #7032637 未加载
mietek超过 11 年前
Have you looked into accepting Server Sent Events instead of long polling?
评论 #7032763 未加载