-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fs-storage
: Implement storages in Rust
#1
Comments
@twitu as soon as the simplest |
Added FileStorage struct with same functionality as Kotlin implementation in #2
|
The next step is to implement specific implementations for However, the android implementation assumes that the keys are resource ids. The FileStorage can write any key that can be converted to a string. So for the specialized implementation where will the keys come from? |
* Add FileStorage logic, example and documentation Co-Authored-by: Ishan Bhanuka <bhanuka.ishan@gmail.com> Co-Authored-by: Pushkar Mishra <pushkarmishra029@gmail.com> Co-Authored-by: Tarek <tareknaser360@gmail.com> Co-Authored-by: Kirill Taran <kirill@taran.space> * refactor done Signed-off-by: Pushkar Mishra <pushkarmishra029@gmail.com> * fix cargo.toml Signed-off-by: Pushkar Mishra <pushkarmishra029@gmail.com> * Update fs-storage/src/file_storage.rs Co-authored-by: Tarek Elsayed <60650661+tareknaser@users.noreply.github.com> * Update fs-storage/src/file_storage.rs Co-authored-by: Tarek Elsayed <60650661+tareknaser@users.noreply.github.com> * Update fs-storage/src/file_storage.rs Co-authored-by: Tarek Elsayed <60650661+tareknaser@users.noreply.github.com> * Add doc comment for erase * feat(fs-storage): refactor CLI write cmd to accept key-value pairs Signed-off-by: Tarek <tareknaser360@gmail.com> --------- Signed-off-by: Pushkar Mishra <pushkarmishra029@gmail.com> Signed-off-by: Tarek <tareknaser360@gmail.com> Co-authored-by: Pushkar Mishra <pushkarmishra029@gmail.com> Co-authored-by: Tarek <tareknaser360@gmail.com> Co-authored-by: Kirill Taran <kirill@taran.space> Co-authored-by: Tarek Elsayed <60650661+tareknaser@users.noreply.github.com>
fs-storage
: Implement storages in Rust
We have the |
Right now, we have storages implemented in Kotlin. It would be great to move them from
arklib-android
repo toarklib
and implement them in Rust. Then, we'll replace Kotlin code with JNI bindings to Rust code.The original storages implementation is here. Any storage is just a KV-table. Usually, from with
ResourceId
as type for keys.The original implementation contains also "sync with disk" functionality. We should carefully plan this feature. Probably, it should be separated from storages into merge strategy for atomic files
Monoid
abstraction for this moment.AggregatedStorage
class for this moment.FileStorage
for keeping the table in a single fileFolderStorage
for keeping the values in separate filesChunkedStorage
as hybrid between the two, multiple files where each file contains several entries from the tableThe text was updated successfully, but these errors were encountered: