Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/aratz-lasa/kvq
Key-value store with external queue
https://github.com/aratz-lasa/kvq
Last synced: about 21 hours ago
JSON representation
Key-value store with external queue
- Host: GitHub
- URL: https://github.com/aratz-lasa/kvq
- Owner: aratz-lasa
- Created: 2022-04-26T08:22:43.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2022-05-20T16:43:28.000Z (over 2 years ago)
- Last Synced: 2024-06-20T06:29:19.592Z (5 months ago)
- Language: Go
- Size: 28.3 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# kvq
Key-value store that uses external RabbitMQ queue for client-server communication. It makes use of no lock for storing data, instead, it partitions the data in nodes. Nodes act as actors (for more information on what actor means go to [https://en.wikipedia.org/wiki/Actor_model](https://en.wikipedia.org/wiki/Actor_model)), responding to `add`, `get`, `getall`, and `del` requests.# Installation
1. Install RabbitMQ as indicated in [https://www.rabbitmq.com/download.html](https://www.rabbitmq.com/download.html).2. Install the application:
```console
foo@bar:~$ go install ./...
```
# Server usage
Run server:
```console
foo@bar:~$ kvq server start
INFO[0000] Server running
```Scale server:
```console
foo@bar:~$ kvq server scale
Current scale: 4
Scaling to 8...
New scale: 8
```
# Client usage
Add key-value pair:
```console
foo@bar:~$ kvq client add hello world
```Get value from key:
```console
foo@bar:~$ kvq client add hello world
foo@bar:~$ kvq client get hello
world
```Get all values:
```console
foo@bar:~$ kvq client add hello world
foo@bar:~$ kvq client add hello moon
foo@bar:~$ kvq client getall
world moon
```Del value from key:
```console
foo@bar:~$ kvq client add hello world
foo@bar:~$ kvq client del hello
foo@bar:~$ kvq client get hello```