https://github.com/misachi/sikv
In memory Key Value store
https://github.com/misachi/sikv
cache inmemory-cache inmemory-db key-value key-value-store
Last synced: 9 months ago
JSON representation
In memory Key Value store
- Host: GitHub
- URL: https://github.com/misachi/sikv
- Owner: misachi
- License: mit
- Created: 2024-05-04T18:23:50.000Z (almost 2 years ago)
- Default Branch: main
- Last Pushed: 2024-07-21T18:24:04.000Z (almost 2 years ago)
- Last Synced: 2024-07-21T20:13:10.738Z (almost 2 years ago)
- Topics: cache, inmemory-cache, inmemory-db, key-value, key-value-store
- Language: C
- Homepage:
- Size: 257 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SiKV
In memory Key Value store
Currently supports single threaded client-server communication. The underlying hashmap is not thread safe -- this will be changed later
Tested on my laptop installed with AMD Ryzen 7 5700U processor running the following software in a VM
```
Ubuntu 20.04.6 LTS
Linux 5.4.0-182-generic
GCC v11.4.0
```
# Installing Dependencies
To install all requirements[Tested on Ubuntu]:
```
sudo chmod +x install_dependencies_ubuntu.sh
./install_dependencies_ubuntu.sh
```
Default is to use the custom allocator. You need to pass the `USE_CUSTOM_ALLOC=yes` flag like this `make USE_CUSTOM_ALLOC=yes`. Check the documentation for [liballoc](https://github.com/misachi/allocator) on how to install it. You also need to set `USE_CUSTOM_ALLOC` macro in `sikv.h` to 1 or a value greater than zero
You may need to add `/usr/local/lib` to your linker path with `ldconfig` command -- This might require user with `sudo` privileges as follows: `sudo ldconfig /usr/local/lib/`
# Examples
## Running the server
Remember to replace `main.o` with `main.out`

## Running the client
Remember to replace `client.o` with `client.out`

### Check for potential memory leaks
**NOTE**: This will not run when using custom allocator(i.e USE_CUSTOM_ALLOC is set to value > 0) since Valgrind does not work well with `mmap`
```
make memcheck # server
make client_memcheck # client
```