Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Consider LDBM support #67

Open
vanrein opened this issue Mar 1, 2018 · 1 comment
Open

Consider LDBM support #67

vanrein opened this issue Mar 1, 2018 · 1 comment

Comments

@vanrein
Copy link
Contributor

vanrein commented Mar 1, 2018

We use BerkeleyDB as our database. Some might argue that LMDB is a faster choice. Note that this is not the ancient LDBM backend!

This mostly depends on the read/write balance. LMDB is heavily geared towards systems that are mostly being read (such as most LDAP usage scenarios). This idea may or may not be kind on the TLS Pool patterns. LMDB appears to have a very impressive design, and does not appear to be a step down in quality from BerkeleyDB. The lack of synchronisation with majority voting may not be a problem in rarely written scenarios.

BerkeleyDB has recovery functions, but they are not necessarily heavenly. LMDB uses copy-on-write semantics, meaning that data is not overwritten and so it cannot be invalidated by crashes halfway a distributed write. This smells just like many really reliable pieces of software.

LMDB is also interesting to consider from the perspective of MIT licensing and non-giant-ownership. And it is used widely in the field as a key2value database.

@vanrein
Copy link
Contributor Author

vanrein commented Mar 28, 2019

What we use of BerkeleyDB is:

  • rock-solid reliability and recovery
  • efficiency in looking up data
  • uses: cert with p11 ref ; trust ; privacy disclosure settings
  • binary keys, binary values
  • multiple mappings (same key, more than one outcome)
  • references from one table to another (simply two lookups)
  • transactionality
  • many threads reading the database at the same time
  • occassional updates from the side-line, by the operator
  • perhaps one day: replication with majority voting

The current knowledge about the database choice is hard-coded as it was not considered a variable in the beginning. The closer the databases are, the easier it will be to make a simple abstraction. Maybe such an abstraction actually exists in C, haven't looked yet. It'd have to be very simple and light-weight to be attractive.

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

No branches or pull requests

1 participant