Hacker News new | ask | show | jobs
by mike_hearn 871 days ago
The most interesting/fresh approach I've seen to this problem is Permazen.

https://github.com/permazen/permazen/

It starts by asking what the most natural way is to integrate persistence with a programming language (Java in this case, but the concepts are generic), and then goes ahead and implements the features of an RDBMS as an in-process library that can be given different storage backends as long as they implement a sorted K/V store. So it can sit on top of a simple in-process file based K/V store, RocksDB, FoundationDB, or any SQL database like PostgreSQL, SQLite, Spanner, etc (it just uses the RDBMS to store sorted key/value pairs in that case).

Essentially it's a way to map object graphs to key/value pairs but with the usual features you'd want like indexing, validation, transactions, and so on. The design is really nice and can scale from tiny tasks you'd normally use JSON or object serialization for, all the way up to large distributed clusters.

Because the native object model is mapped directly to storage there's no object/relational mismatch.

2 comments

DPP (Deep Persistent Proxy Objects) is a javascript library starting from the same question:

https://github.com/robtweed/DPP

.. but you can't really do queries on a K/V store?
Sure you can. In Permazen they're expressed as set operations over collections of objects, so you use map, filter, fold etc as you would if programming functionally. Indexes are also exposed as collections.

Reads and writes on those objects are then mapped to K/V operations.