Now all in unison:
foo:bar:baz:bar:foo
Introduction #
Being inspired by Google Bigtable left me wanting to write my own wide-column database. Now I know that Bigtable is not “just” a wide-column database, it is a highly-scalable, distributed (CP) database. Lucky for me, I don’t need “highly-scalable” or “distributed”, I have Kubernetes for that. What I really want is a database with a nice API, none of that SQL and weird database connector stuff. Just keys and values over JSON/HTTP. I want Bigtable but quick, local, and small.
So I made one.
Quicktable #
Quicktable is at its core a wrapper around Badger, which is a key/value store based on a LSM tree. In line with my previous projects; everything is a list of strings. They can be read from, written to, reduced to a single value, and expanded back to multiple ones. From the concept of lists of strings I extrapolated other types:
- Keyspaces and valuesets:
["foo", "bar", "baz"]
- Key:
"foo:bar:baz"
- Value:
"Hello, world!"
Because they are all essentially the same “thing” I can use them interchangeably.
So a keyspace can be reduced to a key (["hotel", "trivago"]
-> "hotel:trivago"
), and vice versa.
Values can become keys, and keys can become values.
You can also build hierarchies of keys, simulating more traditional databases.
For more practical details you can read the API document.
Implementation #
As of the date of publishing, the version of Quicktable 0.5; and the project is still very young. I have implemented most of the so-called CRUD functionality and more. I also have deployment options for Docker, Kubernetes, Nomad, or as a Systemd service. All of which have been running stable and tested.
In the future I am planning a Go client package, with you can use Quicktable programmatically.