3 ms·
Since a lot of these different data stores have fairly different semantics, I'm not sure how much value there is in trying to create a common set of abstraction
by gthank 17y ago
Since a lot of these different data stores have fairly different semantics, I'm not sure how much value there is in trying to create a common set of abstractions in your code.
- antirez 17y agoThere is a lot of value if the DB API is abstract enough, like: (id) addBookmark(title,url,taglist) (bookmark) getBookmark(id) (array) searchBookmarksByTag(taglist) And so forth. You can switch from SQL to a NOSQL solution and so forth without to touch the app but just a single file with all the DB API. If it's at very low level like Db.get(), DB.set(), ... is still useful if the application just using a strict common subset of features (get/set/exists/expire/incr).