A realtime Database for JavaScript Applications

RxDB (short for Reactive Database) is a NoSQL-database for JavaScript Applications like Websites, hybrid Apps, Electron-Apps, Progressive Web Apps and NodeJs. Reactive means that you can not only query the current state, but subscribe to all state changes like the result of a query or even a single field of a document. This is great for UI-based realtime applications in way that makes it easy to develop and also has great performance benefits. To replicate data between your clients and server, RxDB provides modules for realtime replication with any CouchDB compliant endpoint and also with custom GraphQL endpoints.

Core features

Realtime Queries

In addition to normal pull-based queries, RxDB is capable of having so called realtime queries. These do not only give you the results once but instead emit the new query results each time the state of your database changes. The stream comes as simple RxJS Observable and works flawless together with your frontend framework.

db.heroes
  .find({
    sort: ['name']
  })
  .$ // <- returns observable of query
  .subscribe( docs => {
    myDomElement.innerHTML = docs
      .map(doc => '<li>' + doc.name + '</li>')
      .join();
  });

reactive.gif

Replication

To synchronize data between your clients and your server, RxDB provides replication modules for CouchDB and GraphQL. So when your server changes data, your application will autmatically stream that change to the client and updates its visual representation.

Multi-Window / Tap Support

When your application is opened in multiple windows or tabs at the same time, it can be tricky to synchronize actions between the open states. RxDB automatically broadcasts all changes between these tabs so you do not have to take any care of it.

Other features

Schema

RxDB is based on json-schema where the structure of documents is defined for each collection. This is useful when you develope in a team with multiple developers. It also provides information for RxDB to do performance optimizations. Also the schema is versionized and you can provide migration strategies to migrate the data which is already stored on the clients.

Encryption

RxDB comes with an encryption module where specific fields of a document can be stored encrypted. So when your clients device is stolen or hacked, you can be sure that sensitive data is not readable by third parties.

Key Compression

Saving data on a client can be tricky because you cannot predict how much storage capacity will be available. RxDB provides a key-compression module that compresses the stored json documents which saves about 40% of storage space.




If you are new to RxDB, you should start reading the documentation here.

results matching ""

    No results matching ""