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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Eventual Consistency in Real-time Web Apps

31 点作者 strife25将近 11 年前

5 条评论

dgreensp将近 11 年前
It&#x27;s a lot simpler to just have the socket, with a notification when your PUT has landed. This is what Meteor does.<p>I don&#x27;t see anything I recognize as eventual consistency in the traditional sense. It sounds like the client is just trying to receive a stream of updates, which could have been made by a single writer, and the only consistency issues are caused by the different overlapping mechanisms for getting updates.
评论 #7905325 未加载
评论 #7906868 未加载
评论 #7904955 未加载
dahjelle将近 11 年前
Are there any &quot;standard&quot; models for treating a realtime web app as just another distributed database node (with, of course, extra security precautions and having to do server-side data re-validation)? I&#x27;m aware of CouchDB&#x2F;PouchDB and Meteor&#x27;s use of mini-Mongo client-side. Are there others?
评论 #7906647 未加载
评论 #7909450 未加载
评论 #7904620 未加载
评论 #7904467 未加载
aidos将近 11 年前
I hadn&#x27;t seen the merge &#x2F; fill idea before. Worth reading to get more ideas on this subject.<p>OT but seems like a good time to ask, does anyone have any experience with Operational Transformations for dealing with syncing in web apps? I&#x27;ve started throwing the idea around for a web app I&#x27;m building and it seems like a really interesting pattern. The only real implementation I can find is in sharejs [1]. I work with python on the backend and I can&#x27;t really find an implementation of it (though for my constrained use-case I can generate good enough code to do it myself).<p>It seems like a good approach but there&#x27;s very little in the way of libraries implementing it, so I was wondering if it&#x27;s somehow problematic.<p>[1] <a href="http://sharejs.org/" rel="nofollow">http:&#x2F;&#x2F;sharejs.org&#x2F;</a>
评论 #7904712 未加载
deoxxa将近 11 年前
I&#x27;ve had a lot of success with embedding initial content for a page as JSON in a script tag with a specific ID and a type of &quot;application&#x2F;json&quot;. This way you can rely on the content being there and sidestep the whole timing issue completely. You can potentially speed up your loading time as well, if you have a bunch of things you&#x27;d usually fire additional requests off for.<p>I believe I got this idea from Backbone&#x27;s documentation [1] originally, but I&#x27;ve seen it mentioned in other places as well.<p>[1]: <a href="http://backbonejs.org/#FAQ-bootstrap" rel="nofollow">http:&#x2F;&#x2F;backbonejs.org&#x2F;#FAQ-bootstrap</a>
cromwellian将近 11 年前
The Errai J2EE framework for GWT has an &#x27;Operational Transform Eventually Consistent&quot; Web Socket bus implementation for those curious. (<a href="https://github.com/errai/errai/tree/master/errai-otec" rel="nofollow">https:&#x2F;&#x2F;github.com&#x2F;errai&#x2F;errai&#x2F;tree&#x2F;master&#x2F;errai-otec</a>) Demo video: <a href="https://www.youtube.com/watch?v=ChCasRr0cZc" rel="nofollow">https:&#x2F;&#x2F;www.youtube.com&#x2F;watch?v=ChCasRr0cZc</a>