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.

The Web After Tomorrow

31 pointsby frankiesardoalmost 10 years ago

5 comments

rakooalmost 10 years ago
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 未加载
pduditsalmost 10 years ago
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.
tdukalmost 10 years ago
I read this and thought &quot;Lotus Notes, the early days&quot;
realillalmost 10 years ago
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 未加载
BerislavLopacalmost 10 years ago
&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 未加载