Skip to content

changes required to integrate nkv into EVE - #57

Merged
uncleDecart merged 28 commits into
nkval:mainfrom
uncleDecart:improve-client-cli
Oct 13, 2025
Merged

uncleDecart merged 28 commits into
nkval:mainfrom
uncleDecart:improve-client-cli

Conversation

@uncleDecart

Copy link
Copy Markdown
Collaborator

No description provided.

To improve user experience we introduce command history using
rustyline.

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
`trace key` shows you all the cilents subscribed to key or parents of it

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
@uncleDecart
uncleDecart force-pushed the improve-client-cli branch 5 times, most recently from 06e0724 to 6144f51 Compare July 24, 2025 14:49
@uncleDecart
uncleDecart requested a review from deitch July 24, 2025 15:05
Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
version handle reports server version which is taken from CARGO_PKG_VERSION

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
will print warining in case of version missmatch

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
fixing a bug, we should notify parent subscriptions irrespective of
deleted item having a subscription

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
so that we can have command history

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
remove ks1.ks2.key would remove value
remove ks1.ks2.key.* would remove all the children

relaxing contraints on operation: no need to have mutable TreeNode,
returning vector of values to support wildcard operations

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
Previously each Storage should handle get, delete with wildcards, this
is NkvCore responsibility, it should not care about it, just writing
and retrieving key from file system.

That simplifies the logic of the whole system, the only caveat is when
recreating NkvCore from persistent storage StorageEngine should indicate
to NkvCore, what are the keys its having, again, it does not assume any
structure, just returns keys that are stored

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
@uncleDecart
uncleDecart force-pushed the improve-client-cli branch 2 times, most recently from 6a5ea0e to ab3dc64 Compare September 2, 2025 12:04
Now user can choose backend for StorageEngine on build-time usign features.

Introduce `RouterStorage`, a hybrid storage backend that delegates keys
to different storage implementations depending on their prefix.

- Keys under the `runtime.*` tree are stored in memory (volatile).
- All other keys are stored persistently on disk.

The design is intentionally kept simple. A more flexible approach could
involve parameterizing the memory and file backends as well as the
runtime prefix, chosen via a builder or configuration mechanism. This
complexity is omitted for now in favor of simplicity. If extended
flexibility is needed, a ticket can be raised.

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
We try to decode array of bytes into readable string

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
In order to allow for large messages, all packets are now using
frame size, which is u32, so maximal size is 2^32

Also we are forcing 4-byte in little-endian format as length field
to be compatible with github.com/getlantern/framed

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
so we don't accidentally log sensitive data

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
it's not reflecting API

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
in case data has some sensitive information

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
… send in debug

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
@uncleDecart uncleDecart changed the title Improve client cli make nkv compatible with EVE Oct 2, 2025
@uncleDecart uncleDecart changed the title make nkv compatible with EVE changes required to integrate nkv into EVE Oct 2, 2025
async semantics was from op, which is currently used in capture_and_push
pattern, where we caputered value in `Vec` of `tokio::mutex` which is `async`

this resulted in the fact that we don't guarantee the order of events processed,
which is crucial for EVE (main software that is nkv is used currently)

This patch switches `tokio::Mutex` to `std::sync::Mutex` in `trie.get_mut`
and changes function signatures accordingly

Signed-off-by: Pavel Abramov <uncle.decart@gmail.com>
@uncleDecart
uncleDecart merged commit c356917 into nkval:main Oct 13, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant