Apache License 2.0

项目介绍

al8n/skipdb 是一个托管在 GitHub 上的开源项目,主要使用 Rust 编写,采用 Apache License 2.0 许可证,目前获得 239 个 Star、9 次 Fork。

仓库全名
al8n/skipdb
开源许可证
Apache License 2.0
Star 数
239
Fork 数
9
未关闭 Issue
4

README 摘要

SkipDB & Watermark & Txn This repository the implementation: 1. Generic optimistic transaction manger, which supports concurrent execution of transactions, providing serializable snapshot isolation, avoiding write skews. 2. An atomicity, consistency, isolation, MVCC and WASM friendly in-memory database based on the transaction manager. English | [简体中文][zh-cn-url] Introduction This repository contains two kinds of…

完整内容见 GitHub 原始 README 或本页 。

常见问题

skipdb 用什么语言开发?

主要使用 Rust 编写,采用 Apache License 2.0 许可证,目前有 239 个 Star。

skipdb 可以免费商用吗?

仓库采用 Apache License 2.0 许可证,可免费使用与修改,商业使用请遵守许可证条款(例如保留版权声明与许可声明)。

如何获取 skipdb 的源码?

可以直接克隆仓库:git clone https://github.com/al8n/skipdb.git,默认分支为 main;安装与运行步骤见仓库 README。

skipdb 最近还在维护吗?

仓库最近一次更新为 2024年10月26日,当前有 4 个未关闭 Issue;Star 数为 239,可作为社区活跃度的参考。

关于

GitHub 原始描述(英文)

An embedded, in-memory, zero-copy, atomicity, consistency, isolation, MVCC, almost lock-free and serializable snapshot isolation database engine.

描述取自 GitHub 官方 API,保持仓库作者书写的原文。

语言占比

Rust
Shell

Release

贡献者

README

SkipDB & Watermark & Txn

This repository the implementation:

  1. Generic optimistic transaction manger, which supports concurrent execution of transactions, providing serializable snapshot isolation, avoiding write skews.
  2. An atomicity, consistency, isolation, MVCC and WASM friendly in-memory database based on the transaction manager.

github LoC Build codecov

docs.rs LoC crates.io crates.io

docs.rs LoC crates.io crates.io

docs.rs LoC crates.io crates.io

docs.rs LoC crates.io crates.io

docs.rs LoC crates.io crates.io

license

English | 简体中文

Introduction

This repository contains a transaction framework (async-txn and txn) based on optimistic concurrency control, which is inspired by foundationdb’s paper and badger.

This repository contains two kinds of in-memory key-value database which supports both async (async-skipdb) and sync (skipdb):

  1. SerializableDb

    Supports both concurrent execution of full serializable snapshot isolation transactions and optimistic concurrency control transactions.

    Transactions are created by SerializableDb::serializable_write can handle all kinds of write skew correctly.

    Transactions are created by SerializableDb::optimistic_write can handle all kinds of direct dependent write skew, but cannot handle all kinds of indirect dependent write skew e.g. https://wiki.postgresql.org/wiki/SSI#Intersecting_Data.

  2. OptimisticDb

    Only support oncurrent execution of optimistic concurrency control, which means the write transaction cannot detect all kinds of write skew.

    All kinds of direct dependent write skew can be handled correctly, but cannot handle all kinds of indirect dependent write skew e.g. https://wiki.postgresql.org/wiki/SSI#Intersecting_Data.

Features

  • Atomicity, Consistency, Isolation, MVCC, concurrent safe and almost lock-free.
  • No extra allocation and copy, there is no Arc wrapper for both key and value stored in the database, which means that users provide K and V, and database store K and V directly.
  • Zero-copy and in-place compaction, which means there is no copy, no extra allocation when compacting.
  • Concurrent execution of transactions, providing serializable snapshot isolation, avoiding write skews.
  • Both read transaction and write transaction are Send + Sync + 'static, which means you do not need to handle annoying lifetime problem anymore.
  • Lock-free and concurrent safe read transaction: the read transaction is totally concurrent safe and can be shared in multiple threads, there is no lock in read transaction.
  • BTreeMap like user friendly API and all iterators implement Iterator trait, which means users use Rust powerful conbinators when iterating over the database.
  • Async version is runtime agnostic, tokio, async-std, smol, wasm-bindgen-futures and any other async runtime.
  • 100% safe, sets [forbid(unsafe_code)].

Installation

  • For sync

    [dependencies]
    skipdb = "0.2"
    
  • For async

    • tokio

      [dependencies]
      async-skipdb = { version = "0.2", features = ["tokio"] }
      
    • async-std

      [dependencies]
      async-skipdb = { version = "0.2", features = ["async-std"] }
      
    • smol

      [dependencies]
      async-skipdb = { version = "0.2", features = ["smol"] }
      
    • wasm-bindgen-futures

      [dependencies]
      async-skipdb = { version = "0.2", features = ["wasm"] }
      

Examples

Please see skipdb or async-skipdb.

License

skipdb is under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE, LICENSE-MIT for details.

Copyright © 2024 Al Liu.

评论

暂无评论