Skip to content
This repository has been archived by the owner on Oct 7, 2023. It is now read-only.

Why separate keys for each metadata parameter? #113

Open
funny-falcon opened this issue Feb 7, 2020 · 0 comments
Open

Why separate keys for each metadata parameter? #113

funny-falcon opened this issue Feb 7, 2020 · 0 comments

Comments

@funny-falcon
Copy link

Thinking about I cann‘t see any benefits from current "key per metadata parameter scheme" versus "single key (or couple of keys) for serialized metadata".

Current scheme doesn't improve query (ie with conditions) performance for single parameter since its value is not a part of a key. And it doesn't improve single param lookup significantly. (Serialization coukd be choosen to allowe single key lookup without unpacking whole value. Even json has Go libraries capabke to do it).

But current scheme eats significantly more space (since BBoltDB doesn't compress keys afaik), and requires to update and/or query keys in many parts of database which lay far from each other.

I suppose, using just one key (or two keys if there is clean distinction between "slim" and "fat" params) with appropriate serialization (msgpack or protobuf (msgpack is better, imho)) will greatly improve performance of zetcd.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant