“CouchDB has a changes API that can send notifications to a client of what has changed - you can restrict this to changes you are interested in by using filter functions, which are a bit like views. See: CouchDB”
CouchDB: The Definitive Guide
从 HTTP 接口、视图到复制与变更通知,讲透 CouchDB
O'Reilly 出版的 CouchDB 官方风格指南,作者免费放出在线版,采用 CC-BY-3.0 许可。书从 CouchDB 的 RESTful HTTP 接口讲起,用 curl 一步步演示文档、视图、map/reduce、验证函数、变更通知和复制等核心概念,并涉及内部的 B-tree 存储设计。和泛泛介绍 NoSQL 的书相比,它紧扣一个具体系统,动手例子多。出版时间较早,示例里的版本号已经偏旧。
HN 上的人常把它当作 CouchDB 的标准参考:解释 changes API、过滤函数、验证函数、append-only B-tree 和复制时都会引它,也有人称它是入门 CouchDB 和 NoSQL 的好书;批评只有一条,在线版里示例的版本号太旧。
想了解文档型数据库和 CouchDB 的开发者
怎么读
由 Claude 根据这本书和 HN 上的说法整理,可能有错- 1先读开头的介绍和上手部分,用 curl 把文档的增删改查跑一遍
- 2接着读设计文档、视图和 map/reduce,这是 CouchDB 与其他数据库最不同的地方
- 3复制、变更通知和验证函数按需读,做离线同步类应用时最有用
- 4示例版本较旧,对照当前官方文档,遇到命令对不上时以官方文档为准
HN 书评
推荐在前,同类按时间 · 每本最多保留 20 条,统计用全部提及 · 作者本人贴的不算“I started working through the examples using curl in the CouchDB - The Definitive Guide and then moved on to building code to interface with it:”
“I found the book CouchDB: The Definitive Guide to be a good introduction when I first read it some years ago.”
“the CouchDB book[1] was an early inspiration in my exploration of next-gen storage and collab models.”
“persistent (for both senses of the word) b-trees are used extensively in couchdb. You can read about their design here:”
“Looking at the online draft version of the book, the tour chapter [0] still has version 0.10.1 in the example.”
看全部 20 条 →
“CouchDB is a breakdown of the source tree and explains things.”
“it's possible to write a write-controlled app using validation functions[1].”
“There is a server-side JavaScript validation function which can reject updates for being malformed or if the user isn't allowed to proceed:”
“Its another database engine that you can use to locally persist data, the main upside is that the data you locally persist can be synced online with CouchDB's replication.”
“CouchDB has an append-only BTRee so it doesn't need journalling:”
“like the way it handles push notifications (see CouchDB), design documents, couch apps, map/reduce and so on.”
“- CouchDB: CouchDB”
“It took me 15 minutes to learn and understand what they are and how they work.”
“CouchDB supports undo as part of their core storage model. CouchDB”
“CouchDB B-Trees: CouchDB”
“Couchdb lets you listen to changes[1], if you want to do anything in addition to the basic CRUD you can do it there.”
“Here's an example that explains how to get transaction-like guarantees from this kind of NoSQL data-store:”
“Now if you could only get your database to speak HTTP and serve HTML directly... oh, wait: CouchDB:)”
“Having now looked at it out of curiousity... CouchDB”