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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

The Realtime Engine

52 点作者 js4all将近 13 年前

2 条评论

lalc将近 13 年前
Nice that they're going to write the connection part properly. I had to switch from socket.io to sockjs a long time ago because socket.io was just too flaky. The code was pretty ad-hoc with its state (mishmash of .reconnecting, .reconnected, .disconnected, etc. predicates), and clients would randomly get stuck in in-between states if they were on 3G etc.
评论 #4211305 未加载
评论 #4211216 未加载
评论 #4212026 未加载
rdudekul将近 13 年前
Wise decision to extract out browsers and environmental dependencies into Engine.IO. Apart from decoupling concerns, both these libraries become simpler and can attract more contributors with relevant experience. Socket.IO can now focus on important features like JSON encoding / decoding, custom events, automatic reconnection with exponential backoff and multiplexing etc. It would have been nice to show some before and after code examples and stats on performance under websockets, long polling etc. scenarios.