3 ms·
The author focuses on document stores, but the same argument can be made to key/value stores. It is time for NoSQL community to come up with a standard key/val
by lecha 17y ago
The author focuses on document stores, but the same argument can be made to key/value stores.
It is time for NoSQL community to come up with a standard key/value API. Is anyone working on it?
As one commented said "JDBC came out ~25 years after SQL was created.". By today's standards 2.5 years should be about right time to expect a standard :)
- cperciva 17y agoIt is time for NoSQL community to come up with a standard key/value API. Is anyone working on it? I think if people want a standard API, it's going to be the memcached API.
- antirez 17y agoCan't talk for the other NoSQL players, but for Redis this is more or less impossible since the key-value business is something like 10% of the current API. How to cover the other 90%? Maybe in the future Redis may be able to listen in another port to talk the memcached protocol, but this is not an high priority feature for now. What I think people should do is to abstract the interaction with the DB in their code. So that it's just a matter of writing adapters to support new KV stores, and this adapters can take advantage of peculiarities in specific stores. For instance if using Redis one can use Redis Sets to take the list of friends. When using something different will serialize data as JSON, and so forth.
- gthank 17y agoSince 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).