Coder Social home page Coder Social logo

nutstool's Introduction

What is NutsDB?

English | 简体中文

NutsDB is a simple, fast, embeddable and persistent key/value store written in pure Go.

It supports fully serializable transactions and many data structures such as list、set、sorted set. All operations happen inside a Tx. Tx represents a transaction, which can be read-only or read-write. Read-only transactions can read values for a given bucket and a given key or iterate over a set of key-value pairs. Read-write transactions can read, update and delete keys from the DB.

We can learn more about NutsDB in details on the documents site of NutsDB: NutsDB Documents

Announcement

📢 Note: Starting from v0.9.0, defaultSegmentSize in DefaultOptions has been adjusted from 8MB to 256MB. The original value is the default value, which needs to be manually changed to 8MB, otherwise the original data will not be parsed. The reason for the size adjustment here is that there is a cache for file descriptors starting from v0.9.0 (detail see #164 ), so users need to look at the number of fds they use on the server, which can be set manually. If you have any questions, you can open an issue.

After nutsdb v1.0.0, due to changes in the underlying data storage protocol, the data of the old version is not compatible. Please rewrite it before using the new version. And the current Bucket needs to be created manually. Please see the Bucket usage documentation for details.

Architecture

nutsdb-架构图

Welcome contributions to NutsDB.

Quick start

Install NutsDB

To start using NutsDB, first needs Go installed (version 1.18+ is required). and run go get:

go get -u github.com/nutsdb/nutsdb

Opening a database

To open your database, use the nutsdb.Open() function,with the appropriate options.The Dir , EntryIdxMode and SegmentSize options are must be specified by the client. About options see here for detail.

package main

import (
    "log"

    "github.com/nutsdb/nutsdb"
)

func main() {
    // Open the database located in the /tmp/nutsdb directory.
    // It will be created if it doesn't exist.
    db, err := nutsdb.Open(
        nutsdb.DefaultOptions,
        nutsdb.WithDir("/tmp/nutsdb"),
    )
    if err != nil {
        log.Fatal(err)
    }
    defer db.Close()

    ...
}

Documentation

Buckets
Pairs
Iterator
Data Structures
Database Options
More Operation
Comparison
Benchmark

Contributors

Thank you for considering contributing to NutsDB! The contribution guide can be found in the CONTRIBUTING for details on submitting patches and the contribution workflow.

Acknowledgements

This package is inspired by the following:

License

The NutsDB is open-sourced software licensed under the Apache 2.0 license.

nutstool's People

Contributors

xujiajun avatar

Stargazers

 avatar

Watchers

 avatar

nutstool's Issues

create data of database instance

在日常的性能测试过程中,我们需要生成一些数据集,这里其实会涉及到一些重复的劳动,这个issue的目的在于开发一套比较通用的api,可以提供给各个项目,比较轻松的生成一个指定数据集的nutsdb实例。
我们可以定制一个常见的参数。比如key-size,value-size,db-size之类的。

upgrade dabase protocol tool

随着项目的不断深化,我们会有涉及到存储协议的升级,所以开发一个工具让用户原来的存在的数据集做一个协议上的升级是有必要的,为了让用户无痛的升级nutsdb版本,开发一个升级协议的工具成为了一个必要的需求。这个issue旨在实现一个工具可以帮助用户实现存储协议上的升降级。

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.