How should CouchDB revisions be treated from a design perspective?

北城余情 提交于 2019-12-04 04:24:36

问题


Near as I can tell, CouchDB revisions are not to be treated like revisions in the document versioning sense of the word. From glancing at other posts, they seem to be regarded as transient data that exists until a coarse-grained compact operation is called.

My question is, if I am interested in using CouchDB to maintain documents, as well as a version-history of those documents, should I allow that to be handled natively by CouchDB revisions, or should I build a layer on-top that will survive a compact operation?

I am thinking the latter, simply because Couch does not replicate revisions of documents, only the latest update. This makes me think revision is a mis-leading name, as it's more of a data structure for stabilizing replication.


回答1:


You must build that layer because couchdb revisions are not a versioning system for your data.

'revision' is misleading, and so is 'version' and so is every name that has been suggested so far. Suggestions welcome, if only to confirm how tricky naming this is.



来源:https://stackoverflow.com/questions/8263043/how-should-couchdb-revisions-be-treated-from-a-design-perspective

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!