This project is not covered by Drupal’s security advisory policy.
This modules provides an opinionated integration with CouchDB; allowing you to synchronise entities from Drupal into a CouchDB installation. The entities can then be quickly accessed (via the CouchDB API) by apps, decoupled front ends and and basically anything with a HTTP client. CouchDB API documentation can be found at http://docs.couchdb.org/.
The 'opinionated' part of this module refers to the fact it is not just encoding a raw entity with JSON and calling it a day. Drupal entities are very verbose and parsing through them is a pain at the best of times. This module will 'flatten' the entity as much as possible with the goal of improving the dev experience for anyone consuming the data.
Disclaimer
This module is not intended to be a content staging solution. It is designed to be a one way process, from Drupal to CouchDB, and that will never change. If you want something to sync entities to and from CouchDB then you should look at the Deploy project.
DO NOT use this module in a production environment yet. It is still at a proof of concept stage, so things can and will go wrong.
Roadmap
- Current implementation only handles nodes. Extend to handle all entities.
- Implement configuration UI.
- Implement permissions system to ensure sensitive content is not pushed to CouchDB unnecessarily.
- Implement hook system for agnostic entity status checking. i.e. Should the entity be pushed to CouchDB? For example nodes should not be pushed if they are unpublished.
- Implement static caching when building documents.
- Implement extensible means of handling fields and their values. Current approach is very bare bones.
Entity Flattening
The mantra of this module is to flatten entities to make them easy to work with. Doing this involves following a few rules of thumb:
- Data should be accessible, and usable, no more than 2 levels deep. No more
entity->field[language][0]->value['safe_value'] - Collapse arrays with incremental keys into simple JSON lists.
- Just Enough Data - If the end consumer doesn't need the data, then don't include it.
Requirements
This module requires the following modules:
Installation
- Enable the CouchDB Sync module (https://www.drupal.org/documentation/install/modules-themes/modules-7).
- Clear cache.
Configuration
At this stage there is no configuration UI, but it will come at some stage. The scope of which will be to choose which entity types and bundles that get synced to CouchDB. Also there is scope for choosing the method of pushing the data; deferred via queue or instant.
Documentation
See README.txt in the module folder.
Project information
- Project categories: Content editing experience, Content display
- Created by danielmrichards on , updated
This project is not covered by the security advisory policy.
Use at your own risk! It may have publicly disclosed vulnerabilities.
