Code Monkey home page Code Monkey logo

nexus's Introduction

Nexus

一个轻量级的存储框架。

将kv类型的数据库群转化成为树形结构的存储。

优势:

拓展易,可支持海量存储需求;

缺点:

每次操作需要最多height(树的深度)次的操作。

原理:

kv模式下,以key的md5后的hash为16位的byte数组,通过每4位变成一个biary.BigEndian转化为一个hash值,所以总共有12层。

每一个节点与其子节点变成一个节点数组,通过取余的模式,分配节点数据。为了方便起见,root节点不存放数据,为空节点。

使用时,通过实现interface.go的interface即可。
详细可以查阅test文件夹。

nexus's People

Contributors

catlittlechen avatar

Watchers

 avatar  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.