embassy-rs / ekv Goto Github PK
View Code? Open in Web Editor NEWKey-value store for embedded systems, for raw NOR flash, using an LSM-Tree.
License: Apache License 2.0
Key-value store for embedded systems, for raw NOR flash, using an LSM-Tree.
License: Apache License 2.0
After the max chunk size feature, there is an issue where the PageWriter can still write chunks that are larger than max chunk size.
I attempted to fix this here https://github.com/embassy-rs/ekv/compare/write-max-chunk-size?expand=1 - but I don't think it is a good one, because it would waste a whole page per chunk.
Looking at FileWriter::write, it looks like it will just call write() in a loop, but it will not write the chunk header between the writes.
One solution could then be to commit each chunk in the FileWriter::write() loop, or build this into the PageWriter::write() itself. I'm not sure what the best solution is, or if calling commit() inside the write will somehow break some atomicity properties.
@dotcypress has a good crate (dotcypress/kvs) with examples and a small number of adapters. Can you join forces ๐
hello, could you add the ram/flash overhead of ekv, or the minimum required ram/flash? I want to use ekv, but my MCU's flash has only one sector(8kb) available. I'm not sure whether it's enough
I ran into an index out of bounds panic while writing a lot of small items in separate transactions. If I understand the readme correctly each transaction starts at a new page, but the number of transactions is much lower than the number of pages so this is not the cause.
I'm using a high page count and a relatively small page size but I'm not sure if that has something to do with it.
The panic occurs here:
Line 31 in 571a9c8
index out of bounds: the len is 32 but the index is 32
My full code that triggers the panic can be found here: https://github.com/avsaase/embedded-fatfs/blob/5ff6ca0735e85fb52d5b40380f30bbd9473a2d86/examples/rp2040/src/bin/ekv.rs
Ekv works great but with 4096 page size it does allocate 8kB of RAM on the stack with can be pretty huge on a 96kb RAM chip.
My flash does have 4096 erase page size but the write can be done in 256 pages (with any offset), maybe splinting up page size into two settings could make it use a 2x256 buffer size?
Or maybe ekv could use free flash sectors as a buffer?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.