I'm writing a little app in node. I have posts that I want wiki-like revisions for. I'm also saving the post very frequently as they're being edited, so I do not want to save full revisions on each edit.
Is anyone aware of any existing开发者_如何学编程 schemes for storing patches rather than revisions? This will be json/plaintext, no need to diff binaries or anything.
Unless you settle for simple last-edit-wins logic, this is quite complicated (actually, it will still be if you do :). You might be interested in the wave protocol, open-sourced.
You could start by reading the blog post Time and Space Tradeoffs in Version Control Storage by Eric Sink (SourceGear founder) where he discusses the very question you ask:
Storage is one of the most difficult challenges for a version control system. For every file, we must store every version that has ever existed. The logical size of a version control repository never shrinks. It just keeps growing and growing, and every old version needs to remain available.
So, what is the best way to store every version of everything?
精彩评论