jellydb

module
v0.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2022 License: Apache-2.0

README

Jellydb in-memory NoSQL message database.

Licence GitHub release Build Status PkgGoDev Go Report Card

Philosophy:

In-memory Database with the ability to upload / download data from file storage.

File storage:
├── PATH_KEY
├────── STORAGE_MESSAGES_PATH_KEY
├──────────── log.jelly.db
└──────────── meta.jelly.format

log.jelly.db:

A monotonically growing string of bytes having the following data set:

Message size: 4 bytes
Message: 512 bytes

Example:

When saving the message “my very important message” to the store, the message is converted to the following form:

10101my very important message\0\0\0\0\0\0\0\0….(up to 512)

size: 10101
message: my very important message\0\0\0\0\0\0\0\0….(up to 512)

meta.jelly.format:

A file that contains the "meta" information of each key. Stores the following data: Offset of committed messages Offset recorded messages

Example:

When saving the “my very important message” message to the repository and committing it, the message will be converted to the following form:

00010001

To decrypt a string, do the following:

take the first 4 bytes - the offset of the recorded messages
take the next 4 bytes - the offset of the comic messages
Quick Start:
Run tcp server on current port
go run cmd/tcp/main.go -addr :7777
Run CLI
go run cmd/cli/main.go -addr :7777
Commands for use
(sys)
-help:  Navigating existing Commands
exit:  Exit from CLI
clear: Carriage cleaning

(store)
SET: Adding an entry to the read queue, as soon as the entry
example:
> SET my_super_important SOME_VALUE_1

GET [N]: Getting uncommitted messages from the batch queue and n is batch elements
example:
> GET my_super_important 2
> SOME_VALUE_1
> SOME_VALUE_2

COM [N]: Commenting on a batch of messages
example:
> COMMIT my_super_important 2
SET command:
> SET my_key_1 object_1
👌
> SET my_key_1 object_2
👌
> SET my_key_1 object_3
👌
GET command:
> GET my_key_1 3
object_1
object_2
object_3
COM (commit) command:
> COM my_key_1 3
👌

Directories

Path Synopsis
cmd
cli
tcp
internal
cli
pkg/jell
Package jell package exists to describe and use stretchable storage concepts for various implementations
Package jell package exists to describe and use stretchable storage concepts for various implementations
pkg/jellystore
Package jellystore
Package jellystore
tcp
pkg
protogenerated

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL