TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

RESTful Realtime

51 pointsby jconleyover 11 years ago

6 comments

Codhisattvaover 11 years ago
Screw long polling. Use websockets.
评论 #7033489 未加载
评论 #7034613 未加载
hcarvalhoalvesover 11 years ago
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 未加载
mmerickelover 11 years ago
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.
ctideover 11 years ago
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 未加载
tucazover 11 years ago
I&#x27;m curious if you guys did consider SignalR. Did you? If yes, yeah not use it?
评论 #7032637 未加载
mietekover 11 years ago
Have you looked into accepting Server Sent Events instead of long polling?
评论 #7032763 未加载