Echo JS 0.11.0

<~>
jklu 364 days ago. link parent 2 points
A key value store in memory adds little value imho, we already have native objects which are hard to beat performance wise. 

Persistence is another ballgame. Every now and then people need persistence, there you might be able to add value.
Having said that: that space is already quite full (e.g. think pouchDB, levelDB, lokijs ) so you will need to find a niche which you serve better than the rest.

Good luck !

Replies

fi3 363 days ago. link 1 point
Thanks for your feedback!

Sorry I haven’t been clear enough, in fact, KyVe is not two DB but just one:

1. it maintains simultaneously two DB one in [memory](https://github.com/Fi3/KyVe/wiki/KyVe-in-memory-datastore) the other one in a [file](https://github.com/Fi3/KyVe/wiki/KyVe-Dump-File-Format). To read we use the memory DB and should be almost fast as a native object. To write we use the file DB each write should be atomic and if it returns you should be almost sure that the value has been saved.
2. the file DB is a linked list so save/change a {key: dbvalue} is the same of an insert in a linked list  0(1) + search time where search time should be fast because the search is done in the memorDB.
3. the file and memory DB are obviously synced and the file DB work as an index for the memory DB

Above I use `should` because, for now, the implementation is just a proof of concept.

About the niche, I could say that KyVe could be useful if you need a very simple key-value DB  for mobile Cordova apps, you want something that can run also in browser and node and you do not need persistence on a server but just on the device. I guess could be an app for a distributed system.