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

DBM proof-of-concept via QDBM #54

Closed
wants to merge 1 commit into from
Closed

DBM proof-of-concept via QDBM #54

wants to merge 1 commit into from

Conversation

russhwolf
Copy link
Owner

Still needs some cleanup but it should be passing tests now

I remain woefully uncertain whether this is useful from an interop perspective.

@russhwolf russhwolf marked this pull request as draft June 14, 2020 22:50
@russhwolf russhwolf added the help wanted Looking for help or feedback from the community label Aug 1, 2020
@russhwolf russhwolf changed the base branch from 1.4 to master August 17, 2020 23:36
@goncalossilva
Copy link

I'm not a Linux expert, but have some experience developing for Linux and would love to see multiplatform-settings support it (use case is a KMP library that will be used from Python). Throwing 2 cents in here, in case it helps.

QDBM is a solid option. For proper transactions and crash recovery, it should be set up using a B+ tree instead of a hash table. I think that requires using the Villa API instead of this one (ref). It's generally available, but not in Alpine. The author has mostly abandoned this project in favor of Tokyo/Kyoto Cabinet.

A similar option I'd recommend looking into is GDBM, i.e., GNU dbm. It's a rewrite of NDBM, but has features around crash tolerance and crash recovery. It's also widely available, including in Alpine. My guess is that the code would remain largely the same, except checking for the GDBM_NEED_RECOVERY error code and invoking gdbm_recover() accordingly.

Other options might seem interesting, but they either haven't been around for as long as Q/GDBM has, they aren't as widely available, have various documented corruption issues, or I haven't heard about them. 😅

@russhwolf
Copy link
Owner Author

I looked at GDBM as well when I first did this, but had licensing concerns. QDBM is LGPL which I understand is safe to link against from Apache-licensed code. GDBM is GPL3 which I understand is not.

@russhwolf
Copy link
Owner Author

Closing in favor of #111 and/or #112

@russhwolf russhwolf closed this May 2, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted Looking for help or feedback from the community
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants