Open Morgul opened 10 years ago
The NeDB backend has been found to be extremely buggy, with some data-destroying issues. It needs to be removed ASAP.
+1 same experience here. I found NeDB is a bit buggy, changed to TingoDB and everything works fine now. However there are also some minor bugs, but can be avoided by some work arounds. By the way I made the TingoDB Sails.js adapter here http://github.com/andyhu/sails-tingo. Sails.js' Waterline ORM is very similar as omega-models
@andyhu: Since writing this issue, I wrote my own key-value store database:
https://github.com/Morgul/jbase
So far, it's a great little db.
I made a performance benchmark yesterday, in some cases, finding records in NeDB is about 20-30 times faster than in TingoDB. EJDB is about 2 times faster than NeDB.
Could any of you perhaps be a bit more specific regarding some of the bugs you ran into? I'm looking into both TingoDB and NeDB, and would be glad to have a heads-up. Although it has been some time...
The problems I ran into with NeDB was that occasionally records would have their contents swapped out with other records. Typically, this only happened when something else threw an error in the application. But the fact that NeDB could corrupt the database like that was enough I went off and did my own thing.
Dear Morgul, thank you for your elaboration. I am currently doing some of my own benchmarks for TingoDB, NeDB and LinvoDB (fork of NeDB). I had been happy to look into your project, but it appears it currently doesn't support indexes. :)
Actually, this project has been eclipsed by new work I've been doing:
https://github.com/trivialsoftware/TrivialModels
Unfortunately I haven't written documentation, nor have I written backends for more than just a simple memory store, and trivialDB (formerly jbase).
Neither support indexes at the moment, mostly because I haven't needed them (mostly just using key-value stores).
NeDB, while nice in concept has some issue that make it rather annoying to work with. Instead, we should switch to TingoDB, which has mongodb level performance, and API.