4 ms·
Twice I've fallen into the trap of using a VCS for the "data" layer of an app, because the data needed versioned and hey you can just store it in XML/Json. Fir
by daxfohl 10y ago
Twice I've fallen into the trap of using a VCS for the "data" layer of an app, because the data needed versioned and hey you can just store it in XML/Json.
First time a senior dev overrided my choice, and to my dismay we did a pure DB solution that took longer and was far inferior in its version control capabilities than if we had done it in VCS/XML.
Second time I was in charge and pushed this "great idea" through. We ended up with awesome branching, cherry-picking, diffing, etc capabilities (which were not in the requirements and nobody really used), but ran into big problems later when we needed more thorough data consistency checks, incremental non-GUID id's, speedier centralized inserts/updates, etc. Second step was rube goldberg, and third step was rewrite given the actual requirements using a normal db store (probably half the code, better performance, easier to use, no "extra" VCS functionality that nobody needed).
Lesson learned: don't use VCS as a data store unless it's kicking you in the face. Or, maybe there's a market for a VCS with some DB-like properties.
- smoyer 10y agoCouchDB is s versioned JSON NoSQL ... but the choice between a database and a NoSQL isn't always easy to make either.
- daxfohl 10y agoIndeed. Looked at that, even went so far as to give Datomic a tryout. Everything with built-in versioning turned out to be a leaky abstraction wrt our needs. Turns out there are lots of ways people can think about versioning, that don't always correspond to how programmers think about it.
- harperlee 10y agoFor joining vcs (git) plus db (datomic), there's an interesting library called codeq: http://blog.datomic.com/2012/10/codeq.html?m=1 http://blog.datomic.com/2012/10/codeq.html?m=1