
RxDB – Local JavaScript-Database - realPubkey
https://github.com/pubkey/rxdb?x=1
======
jchrisa
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.

~~~
realPubkey
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.

------
sigmonsays
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](https://www.sqlite.org/testing.html)

Finally how is this any better than simply using the databases built into the
browsers, like html5 storage?

~~~
STRiDEX
Its exactly what i was expecting, but i've been looking at projects like
[https://github.com/ngrx/db](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.

------
sapeien
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.

------
jamespetercook
Just today I swapped SQLite out for NeDB in the electron app I'm building.

Does RxDB handle persistence to disk easily?

~~~
chris_st
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.

~~~
jamespetercook
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

------
bsbechtel
Possible replacement for Meteor's minimongo?

~~~
realPubkey
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/](http://offlinefirst.org/) )

------
jvanveen
Also checkout js-data.io

------
tyingq
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.

~~~
yarper
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..

~~~
Something1234
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.

------
marknadal
How does it compare to
[https://github.com/amark/gun](https://github.com/amark/gun) and
[http://lokijs.org](http://lokijs.org) ? Does it handle concurrency and
conflict resolution?

