GithubHelp home page GithubHelp logo

bbolt-rs's Introduction

bbolt-rs

bbolt-rs is an implementation of the etcd-io/bbolt database in Rust. It successfully reads and commits, but it has some limitations.

The current version matches Bolt v1.3.8.

I'm rather pleased with my work as I believe the public API I've created has substantially fewer footguns than the Go code has.

  • The database can't be dropped until all sessions are dropped.
  • No resources from the transaction can escape the transaction.
  • You can't deadlock the database by opening up a RW transaction and then opening up a R transaction right afterwards.

It also is interesting that, despite the increased memory usage, this code is about 40% faster in a synthetic large transaction than the equivalent Go code. Further benchmarking is postponed until the database is fully feature complete and we can have a proper duel (in progress!).

Lastly, I must express my eternal gratitude to the bbolt developers who have created such a simple and easy to understand project to learn from.

Features:

  • Arena memory allocation per transaction
  • Explicitly designed to prevent transaction dependant resources from escaping the transaction.
  • RwLock based transactions
  • File backed database
  • Memory backed database
  • Miri tested to prevent memory errors in unsafe blocks
  • Simple and straightforward public APIs

Check out the documentation!!

Currently not supported:

  • Tx.copy
  • Compact
  • Most of the main application
  • A variety of DB Options including
    • no freelist sync
    • file open timeout
  • Panic handling during bench

bbolt-rs's People

Contributors

ambaxter avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.