Giter Site home page Giter Site logo

aleksj / nessdb Goto Github PK

View Code? Open in Web Editor NEW

This project forked from bohutang/nessdb

0.0 1.0 0.0 900 KB

A very fast key-value,embedded Database Storage Engine (Using log-structured-merge (LSM) trees),and supports Redis-Protocols(PING,SET,MSET,GET,MGET,DEL,EXISTS,INFO,SHUTDOWN).

Home Page: https://groups.google.com/group/nessdb

License: BSD 3-Clause "New" or "Revised" License

nessdb's Introduction

================================================================
nessDB v1.8 with LSM-Tree
Copyright (C) 2012 BohuTANG________________ 
_____________________________  __ \__  __ )
__  __ \  _ \_  ___/_  ___/_  / / /_  __  |
_  / / /  __/(__  )_(__  )_  /_/ /_  /_/ / 
/_/ /_/\___//____/ /____/ /_____/ /_____/  
================================================================

  nessDB is a fast Key-Value database(embedded), supports Redis-Protocol(PING,SET,MSET,GET,MGET,DEL,EXISTS,INFO,SHUTDOWN).
  Which is written in ANSI C with BSD LICENSE and works in most POSIX systems without external dependencies.

  nessDB is very efficient on disk-based random access, since it's using log-structured-merge (LSM) trees.

  The 1.8 version is still under construction.

  LAYOUT
  ======
  Doc		-- Documentations
  bench		-- Benchmark testing
  engine	-- The kernel of storage
  server	-- Database server(python)
  interface	-- Others binding of nessDB(python, lua)

  
  V1.8 FEATURES
  =============
  a. Better performances on Random-Read/Random-Write
  b. Log recovery
  c. Using LSM-Tree as storage engine
  d. Background detached-thread merging
  e. Support billion data
  For more details, please refer to documentations which in 'Doc' folder.

  HOW TODO BENCHMARK
  ==================
  $make db-bench
  $./db-bench <write | read > <count> 
	or 
  $./db-bench readone <key>

  If you want delete all idnexes/db/logs, you should do:
  $make cleandb

  HOW TO USE AS DB ENGINE
  =======================
  a. OPEN
		struct nessdb *db = db_open(db-path, is_log_recovery); 

  b. ADD
  		struct slice sk, sv;
		sk.len = 3;
		sk.data = "key";
		sv.len = 5;
		sv.data = "value";
		db_add(db, &sk, &sv);

  c. DELETE
  		struct slice sk;
		sk.len = 3;
		sk.data = "key";
		db_remove(db, &sk);

  d. READ
  		struct slice sk, sv;
		sk.len = 3;
		sk.data = "key";
		int ret = db_get(db, &sk, &sv);
		if (ret == 1) {
			printf("data is %s", sv.data);
			free(sv.data);
		} else
			print("Not found");

  e. CLOSE
  		db_close(db);

  how to use as db server
  =======================
  See server/README
  Now, you can connect it with anyone redis-client, even can use the redis-benchmark for performance testing(Note the db-server only support a few redis command).


  Thanks for your attention!

nessdb's People

Contributors

bohutang avatar qmx avatar ldmiao avatar codeslinger avatar feinno-zhangyanfei avatar tobydipasqualera avatar pitulloz avatar zhpengg avatar

Watchers

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