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.

Eventual Consistency in Real-time Web Apps

31 pointsby strife25almost 11 years ago

5 comments

dgreenspalmost 11 years ago
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 未加载
dahjellealmost 11 years ago
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 未加载
aidosalmost 11 years ago
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 未加载
deoxxaalmost 11 years ago
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>
cromwellianalmost 11 years ago
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>