Giter Club home page Giter Club logo

skipdb's Introduction

skipdbv2

rewrite and fix for https://github.com/stevedekorte/skipdb 嵌入式 k/v 数据库,编译大小只有 300k。可以代替nvram,并有nvram更强大的功能。详细说明 为了在嵌入式下更少的占用jffs的空间。建议最多使用配置条目为1w。(merlin正常使用nvram的配置条目为2000条) 当jffs占用大于8M时,会进行一次refresh,重新计算空间。

速度

  • 写15000条数据需要6s
  • time ./test.sh #测试脚本在tests目录
  • real 0m6.697s

实现功能有:

  • dbus set key=value
  • dbus ram key=value
  • dbus replace key=value
  • dbus get key
  • dbus list key
  • dbus delay key tick path_of_shell.sh #定时运行脚本,脚本情使用绝对路径
  • dbus time key H:M:S path_of_shell.sh #绝对时间运行脚本,脚本情使用绝对路径
  • dbus export key #将配置导入到脚本
  • dbus update key #将脚本配置保存到数据库
  • dbus inc key=value #增加数值
  • dbus desc key=value #减去数值
  • dbus event name path_of_shell.sh #注册一个事件脚本
  • dbus fire name #触发一个事件脚本

编译方法

  • 依赖库 libev,需要自行编译或安装
  • cd skipdb
  • mkdir build
  • cd build
  • cmake ..
  • make

执行方法

  • skipd -d /path/of/data
  • dbus command params

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.