Is there a NoSQL / key-value store abstraction lib

2019-04-08 11:56发布

问题:

I have used many SQL abstraction libraries, such as ODBC, JDBC, and ActiveRecord. What are the abstraction options in the NoSQL / key-value store world?

I am mostly asking this so that if I choose a key-value store then I can use an abstraction library and not be locked in, which I think is important given the number of key value stores around.

回答1:

Even if the NOSQL databases are very different from each other, they can be divided into meaningful groups, see this blog post. A new project aiming at defining abstractions on top of different NOSQL databases is Gremlin, see InfoQ: Gremlin, a Language for Working with Graphs. Starting out from the graph database end of the NOSQL spectrum, the project has since moved on to document stores, creating an Object Document Model with implementations planned for MongoDB and CouchDB, see here and here.



回答2:

No. Right now, NoSql databases are very disparate, therefore they cannot be wrapped under a standard interface while remaining non trivial.



回答3:

We have such an abstraction in InfoGrid called the Store interface. It is very simplistic, but was created exactly for that purpose: a common API that allows InfoGrid to talk to different key-value store implementations without requiring changes on the higher levels.

Some links:

  • Store summary
  • Store interface
  • IterableStore interface -- same, but iterable: some key-value stores can be iterated over easily, some can't


回答4:

Gremlin runs on top of Tinkerpop Blueprints. Yesterday has been released the new version of Gremlin (0.5) with the support of new storages such as OrientDB, a new open source document-graph dbms.