JSPM

  • Created
  • Published
  • Downloads 24
  • Score
    100M100P100Q46648F
  • License MIT

responsible of synchronizing duplicate data between collections

Package Exports

  • mongodb-data-sync

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (mongodb-data-sync) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

mongodb-data-sync

In MongoDB having duplicate data between multiple collections is not an uncommon thing, It is efficient for searching, sorting or event for just project fields.

handling this duplicated data can be a pain in the ass, you will have to create jobs to sync the data, or do updates in place what makes the ref collection need to know about all the collections needed data from him . and we all know the bugs that can lead to.

mongodb-data-sync comes to solve this problem by letting you declare the dependencies in a logical place in your applications (for instance where you declare your schemas ) and sync the data in almost real-time.

mongodb-data-sync was designed to do all the updates and synchronization with minimum overhead on the database and do most of the checks in memory.

Notice

mongodb-data-sync is still experimental and hasn't been tested on production yet

Architecture

mongodb-data-sync built from 2 parts.
  1. The server(there can only be one)- this what runs all the updates logic,don't use more than 1 process, it was designed to work as a single process and knows from where to continue after restart, crash

  2. The client - this is the SDK for manging the database dependencies

How to use?