libinzhangyuan / duoduo

Key value database for const data on SSD disk. Do not using memory. --- unfinished

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Key value database for const data on SSD disk.

  • This nosql db store data on a SSD disk. It's using little memory for data cache.
  • It's for data that do not change frequently.
  • The common usage of DuoDb is initialize the data in your app initialize phase. Then using it in running phase.
  • It do not support transaction because changing data when running server is not our feature.

Warning: Changing data frequently will damage your SSD disk. Add data is ok.

One change per second will be OK. But 100 changes per second may let SSD disk dying in few months.

Config

  • Get block size of your ssd.
  • sudo /sbin/dumpe2fs /dev/hda2 | grep 'Block size'
  • then config the ssd block size.

Compile static lib for production using.

  • $ cd essential
  • $ vim Makefile : open the line: CPPFLAGS = -Wall
  • $ make
  • $ cd ../ddlib
  • $ vim Makefile : open the line: CPPFLAGS = -Wall -I ../essential
  • $ make
  • then coping the ddlib.a to your production lib dir.

Compile for cppunit test

Install cppunit

Compile

  • $ cd essential
  • $ vim Makefile : open the line: CPPFLAGS = -Wall -D _UTEST_
  • $ make
  • $ cd ddlib
  • $ vim Makefile : open the line: CPPFLAGS = -Wall -I ../essential -D _UTEST_
  • $ make
  • $ cd ..
  • $ vim Makefile : open the line: CPPFLAGS = -Wall -I essential -I ddlib -D _UTEST_
  • $ make
  • $ ./duoduo_utest

contribute

About

Key value database for const data on SSD disk. Do not using memory. --- unfinished

License:MIT License


Languages

Language:C++ 88.8%Language:Makefile 10.9%Language:C 0.2%Language:Shell 0.1%