RxDB – Local JavaScript-Database(github.com)
github.com
RxDB – Local JavaScript-Database
https://github.com/pubkey/rxdb?x=1
21 comments
This looks like a wrapper
around the PouchDB replication and storage, but with user-friendly APIs. It's high time somebody did this. They should make a bigger note of the fact that by using RxDB you get access to a large and established ecosystem. Not just PouchDB, but also IBM Cloudant and Couchbase Mobile, are part of the stack you can interoperate with.
Yes you are right with the wrapper-thing. Before I started creating RxDB, I used pouchdb, minimongo, gunJS and lokiDB and had just too many things to handle by myself. RxDB is an approach to create a database which is easier to use and does not create discussing-point when using it in a big team.
the title seems like click bait. Its very misleading to the point of being intentional. The title to me implies that there are intention to replace the use of sqlite with this javascript database.
sqlite (from their website) "SQLite is a self-contained, high-reliability, embedded, full-featured, public-domain, SQL database engine. SQLite is the most used database engine in the world."
When I click on a link I see a nodejs application with a bunch of info on how to use it. No justification or details on implementation, or how real problems were solved.
How portable is RxDB (PouchDB)? Can you run it on a embeded device without a browser? How full featured is it? Is it crash safe?
For instance see how sqlite is tested https://www.sqlite.org/testing.html
Finally how is this any better than simply using the databases built into the browsers, like html5 storage?
sqlite (from their website) "SQLite is a self-contained, high-reliability, embedded, full-featured, public-domain, SQL database engine. SQLite is the most used database engine in the world."
When I click on a link I see a nodejs application with a bunch of info on how to use it. No justification or details on implementation, or how real problems were solved.
How portable is RxDB (PouchDB)? Can you run it on a embeded device without a browser? How full featured is it? Is it crash safe?
For instance see how sqlite is tested https://www.sqlite.org/testing.html
Finally how is this any better than simply using the databases built into the browsers, like html5 storage?
Its exactly what i was expecting, but i've been looking at projects like https://github.com/ngrx/db lately. Maybe the title should say IndexedDB somewhere.
Server side rxjs db... I'm not sure what that would be.
Server side rxjs db... I'm not sure what that would be.
Looks pretty impressive at first glance, but it seems that most of its features come from dependencies such as PouchDB, RxJS, JSON Schema, crypto-js, and more. The built version is 1.3 MB, minified file is 520 KB, or 140 KB gzipped.
I found the "key compression" feature to be an amusing micro-optimization. It truncates names of keys, making DB migrations tricky. There are better ways to save more bytes, namely by using an actual compression algorithm.
I found the "key compression" feature to be an amusing micro-optimization. It truncates names of keys, making DB migrations tricky. There are better ways to save more bytes, namely by using an actual compression algorithm.
Just today I swapped SQLite out for NeDB in the electron app I'm building.
Does RxDB handle persistence to disk easily?
Does RxDB handle persistence to disk easily?
How 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.
> 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.
Yeah 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
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
If you're looking for a way to persist data, check this out: https://github.com/nylas/electron-RxDB
This 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
We'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!
Possible replacement for Meteor's minimongo?
It depends. RxDB can be used completely serverless, while minimongo always needs a stream to the server. But minimongo is better integrated into your meteor-server-side.
The approach of RxDB is to fullfill the principles of offline-first ( http://offlinefirst.org/ )
It's not quite the same thing, but I've been using the Redux store in conjunction with Mingo (https://github.com/kofrasa/mingo/) to perform sorts and filtering.
Also checkout js-data.io
Curious where "to Replace SQLite" came from in the title.
It doesn't appear to support SQL. The word "SQLite" isn't anywhere on the repo. And, this is a client side browser database...sqlite is not.
It doesn't appear to support SQL. The word "SQLite" isn't anywhere on the repo. And, this is a client side browser database...sqlite is not.
We took that out of the title as linkbait (https://news.ycombinator.com/newsguidelines.html). One does not mess with SQLite users.
And sqlite is going to be an order of magnitude faster, being written in cross platform C.
I do think there's a gap for a sqlite-like cross platform native "in a file" nosql-db however..
I do think there's a gap for a sqlite-like cross platform native "in a file" nosql-db however..
There's already leveldb and bdb. However both have kind of odd interfaces, but other than that their nice. Bdb not so much however, because it has a very odd license.
> this is a client side browser database...sqlite is not.
I should think it's referring to WebSQL, which I understand was just SQLite integrated into the browser.
I should think it's referring to WebSQL, which I understand was just SQLite integrated into the browser.
How does it compare to https://github.com/amark/gun and http://lokijs.org ? Does it handle concurrency and conflict resolution?