Show HN: Fast database for React Native with multiple data-type support
github.com
github.com
Inside the MMKV library, a NSData object is created, another class is used to write a single "int" value to it, then the data object is used as the "raw" value for the given key.
I haven't looked any futher but already this seems like a lot of work to set a number in memory. Is there any reason for this?
The second thing about numbers is that its just in case you needed it for something, it is there but there are other ways to set the data too.
Sciter implements what I call "an ultimate data persistence solution" - NoSQL DB integrated right into script VM.
You can open storage as:
var storage = Storage.open("path/to/data/file.db");
Storage provides root object - normal script object (or array) that can be updated by normal script means: storage.root = { foo:[1,2,3], bar: {...} };
storage.root.foo.push(4);
storage.root.bar.newProp = 42;
All script objects that are accessible from the storage.root are persist-able - pushed to HD on storage.close() or storage.commit();More details about architecture and implementation: https://sciter.com/data-persistence-in-sciter-database-integ...
Overall feature set is close to MongoDB (modulo sharding).
DB layer uses Konstantin Knizhnik's DyBASE pretty much as it is: http://www.garret.ru/dybase.html
When I was building SwiftStore - a KV store [1] for iOS, I went with LevelDB as the choice for the underlying database.
LevelDB because it's written in c++ and used widely as an embedded database. Integrating it as a static library in Objective-C is also fairly straight forward.