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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

The Web After Tomorrow

31 点作者 frankiesardo将近 10 年前

5 条评论

rakoo将近 10 年前
I&#x27;m always sad to see that CouchDB and its PouchDB counterpart in the browser (or even on the server) are always forgotten, even though they&#x27;ve been solving that problem for years now:<p>* easy replication (protocol is documented (<a href="http:&#x2F;&#x2F;docs.couchdb.org&#x2F;en&#x2F;latest&#x2F;replication&#x2F;protocol.html" rel="nofollow">http:&#x2F;&#x2F;docs.couchdb.org&#x2F;en&#x2F;latest&#x2F;replication&#x2F;protocol.html</a>), and it&#x27;s only HTTP+JSON)<p>* The replication is reactive, ie you only get the changes since last time you synced<p>* The replication is realtime, it can use longpolling or server-sent events.<p>* The replication is two-way; the browser doesn&#x27;t have a special status in the replication protocol. It is effectively the same database. The application speaks only with the local database, which is sync&#x27;ed in the background.<p>* CouchDB effectively acts as a log of all transformations. If you modify a document, there will be a trace that there is a &quot;marker&quot; that tells you that the document changed since last time you saw it.<p>* There is filtering, although it can be inefficient and is completely controlled by the client (so no security filtering from the server)<p>* CouchDB does lack granularity, it is only at the database level meaning that each user must have a different database. Couchbase is going another way with channels in the Sync gateway (<a href="http:&#x2F;&#x2F;developer.couchbase.com&#x2F;mobile&#x2F;develop&#x2F;guides&#x2F;sync-gateway&#x2F;channels&#x2F;intro&#x2F;index.html" rel="nofollow">http:&#x2F;&#x2F;developer.couchbase.com&#x2F;mobile&#x2F;develop&#x2F;guides&#x2F;sync-ga...</a>) but it&#x27;s non standard<p>We need to iterate on the CouchDB ecosystem, because it already provides a lot of what we need.
评论 #9769126 未加载
评论 #9767216 未加载
pdudits将近 10 年前
Provocative article indeed. But some of the visions seem but naive to me:<p>Running exactly the same validation twice wouldn’t make data more valid.<p>What in a Web app scenario guarantees, that the validations are the same, that a potential attacker haven&#x27;t removed the validation from client code? By embedding the rules inside database you just made it a proxy to the raw data - making it the same old, wrong architecture.<p>Network failures... should not undermine our consistency guarantees.<p>Offline... I should be able to do local modifications, then merge changes when I get back online.<p>So far it is proven, that to get any consistency guarantees in such case, you are severely limited in kinds of data you can process. No library can magically solve the conflicts for you as long as the data is not CRDT. There are not many applications consisting exclusively of sets and counters.
tduk将近 10 年前
I read this and thought &quot;Lotus Notes, the early days&quot;
realill将近 10 年前
Now consider following: - There are mobile apps, which do not talk directly to database. - There are online games, that do not talk directly to database. - There are Cloud based apps on your computer, that do not talk directly to database.<p>So why Web apps should talk directly to database?
评论 #9800417 未加载
BerislavLopac将近 10 年前
&quot;No, eventually DB will talk directly to the browser.&quot;<p>Essentially, this is what REST is -- a (&quot;NoSQL&quot;) database over the HTTP protocol.
评论 #9770409 未加载