I developed NacDB, a database with seamless and not cycles-hungry enumeration of items, that are ordered by some order. It is done by splitting the whole DB into sub-DBs each of which is fully fit into a partition canister. If a sub-DB becomes too big, it is moved to another canister. (CanDB doesn’t support this, enumerating in CanDB requires querying all canisters in a partition. So, I recommend for some projects using both CanDB and NacDB, with values from CanDB referring to NacDB keys and vice versa.)
Today, I realized that I did NacDB wrongly and need to rewrite it:
I should for each operation like
insert have two shared functions:
finishInsert (internally, they share the same code by calling the same non-shared function).
insert has as arguments the inserting data (sub-DB id, inserted value, etc.) and a GUID (intended to ensure idempotency).
finishInsert will have as the argument only GUID.
finishInsert is planned to be callable by everybody, not only the entity that started inserting. This allows, if a bad actor or a coincidence overflows the small list of GUIDs (it needs to be small not to overflow heap memory), call
finishInsert a few times before doing our own insert.
The above is interesting, but I won’t explain it all here, because the purpose of this post is different than technical explanations:
I received a $5000 grant from DFINITY for writing NacDB. My two subsequent grant requests were rejected, quoting that there was not enough interest in my software. So, I plead you, to reply to this thread expressing interest in NacDB project.
Imagine a social network with ordered lists of posts. Or a donations site with ordered lists of grantees. For all things like those, my NacDB is invaluable: We need to order things and allow using not too much cycles enumerate them to display to users. Other uses are, of course, possible. Please, as many people as possible, answer this post telling that you want this software, in order for me to quote you in a grant application.
Please also tell that you want to know how to use GUIDs and stuff like
finishInsert, for me to get a grant to write a tutorial for you how to write failure-resilent software in DFINITY actor model with multiple actors. It is a really interesting subject and the experience I got is invaluable for others.