Hey guys !
I want to talk about something I’m working on right now, it’s a CLI tool and a rust library to use autonomi’s scratchpad a bit like malloc does with the heap.
You can mutably store some key/values and later update them or delete them. The space is reserved in multiple scratchpads, increasing their amount when the storage is scarce. When deleting some key, it frees a block in the corresponding scratchpad that can be reused later for some similarly sized data or smaller.
The CLI tool can be used like this for simple key pairs:
$> anthill store my_key my_value
Or with pipes for files
$> cat ~/some_file | anthill store my_file
Then you can list your keys
$> anthill list
Stored keys:
- my_file
Usage: 712KB / 4.00 MB (0.1%) - 1 scratchpads managed
Then you can fetch it again
$> anthill fetch my_file > /some/path
Or update it
# edit the file first then
$> cat my_updated_file | anthill update my_file
And finally delete it to free the space for some more data
$> anthill delete my_file
I have a fully working prototype on my local testnet, I still have to test this in the mainnet, but this could empower anybody to have unlimited mutable private key/value storage, as well as a handy API to implement hierarchical storage like for a FS (with the proper driver, we could directly mount that to the linux filesystem, but one step at a time…)
I don’t know if this is a good idea, or if the network is made to be used that way, so I’d love some feedback to know if I should pursue this idea or just leave it.
I’m actually cleaning the implementation and will probably have an alpha version to show to you in the next days
EDIT: Oh and the most important, scratchpads are pay-once-use-forever. So once you have paid and grown you personal space, it is yours forever and you can use it as you like for free.