4 ms·
Just today I swapped SQLite out for NeDB in the electron app I'm building. Does RxDB handle persistence to disk easily?
by jamespetercook 10y ago
Just today I swapped SQLite out for NeDB in the electron app I'm building.
Does RxDB handle persistence to disk easily?
- chris_st 10y agoHow do you deal with the corruption issue of NeDB? From their page: > corruptAlertThreshold (optional): between 0 and 1, defaults to 10%. NeDB will refuse to start if more than this percentage of the datafile is corrupt. 0 means you don't tolerate any corruption, 1 means you don't care. I personally don't want a database that "allows" corruption at any level. I understand that there are going to be bugs, but this seems different to me.
- jamespetercook 10y agoYeah that worried me but I just presumed all persisted data is at risk of corruption, and the library simply provided some options to help manage it. Im not really very clued up in this area though. Does the way NeDB saves data (serialised json to plain text files) increase the chances of corruption? I don't really know how I'd handle a corrupt data file
- grinich 10y agoIf you're looking for a way to persist data, check this out: https://github.com/nylas/electron-RxDB https://github.com/nylas/electron-RxDB
- jamespetercook 10y agoThis looks really great, thanks for sharing! I don't even mind that I've spent time implementing NeDB only to pull it out again, because it looks like this library will save so much time and many headaches
- grinich 10y agoWe're using it really successfully to power the entire data layer of Nylas Mail. I figure if it's good enough for an email app (with gigabytes of text, >300k objects) then it should work for other apps too!