Skip to content

erg/kayos

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

kayos

Keep All Your Objects Safe

Cloning:

Build dependencies:

  • cmake
  • snappy
  • sudo apt-get install cmake libsnappy-dev

To build kayos:

  • Unix: mkdir build && cd build && cmake -DCMAKE_BUILD_TYPE=Release .. && cmake --build . -- -j9
  • Unix debug: cmake -DCMAKE_BUILD_TYPE=Debug .. && cmake --build . -- -j9

To run:

  • ./kayos-server dbname
  • ./kayos-producer dbname
  • ./kayos-consumer dbname

Producer port:

  • telnet localhost 9890

Producer commands:

  • set key val
  • delete key
  • {"command": "set", "key": "a", "value": "1"}
  • [{"command": "set", "key": "a", "value": "1"},{"command": "set", "key": "b", "value": "2"}]

Consumer port:

  • telnet localhost 9891

Consumer commands:

  • get key
  • iterate
  • iterate 100 -- seqnum >= 100
  • {"command": "iterate"}
  • {"command": "iterate", "start": "100"}
  • {"command": "get", "key": "a"}

HTTP commands:

  • curl -X GET http://127.0.0.1:9891/_iterate

Troubleshooting:

  • ./kayos-consumer: error while loading shared libraries: libforestdb.so: cannot open shared object file: No such file or directory Run ldconfig as root to udpate the library cache.

cannot make path: /usr/local/var/lib/kayos libc fatal_error: mkdir failed errno = 13, strerrno: Permission denied``` Fix the permissions for /usr/local so that it is writable by your user.

git submodule cheat sheet:

  • git submodule update --init
  • git submodule update --remote forestdb
  • git submodule update --remote jansson
  • git submodule update --remote http-parser
  • git submodule foreach git pull origin master

cmake cheat sheet (forestdb):

  • mkdir -p forestdb/build && cd forestdb/build && cmake .. && make -j && make install && cd ../../
  • sudo echo "hi" && mkdir -p forestdb/build && cd forestdb/build && cmake .. && make -j && sudo make install && cd ../../
  • Linux: cmake --build . -- -j8

cmake cheat sheet (jansson):

  • mkdir -p jansson/build && cd jansson/build && cmake -DJANSSON_BUILD_SHARED_LIBS=1 .. && make -j && make install && cd ../../
  • sudo echo "hi" && mkdir -p jansson/build && cd jansson/build && cmake -DJANSSON_BUILD_SHARED_LIBS=1 .. && make -j && sudo make install && cd ../../

windows cmake cheat sheet:

  • Windows 32: mkdir build && cd build && cmake -G"Visual Studio 12" -DCMAKE_BUILD_TYPE=Release .. && cmake --build .
  • Windows 64: mkdir build && cd build && cmake -G"Visual Studio 12 Win64" -DCMAKE_BUILD_TYPE=Release .. && cmake --build .

About

Keep All Your Objects Safe

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published