jimklo/LearningRegistry — pull request #3 by jpoyau (2012-03-08 21:47:55+00:00)
Title: Push replication

Add code it implement pull/push replication. It implements a service that allows a node to push it data through couchdb replication to any couchdb database. To pull data from any node that implements this service one needs to do a post to/push_to the following data:

```
{
"destination_database_url": "", //couchdb target database url required
"include_exclude"': true/false,
"filter": // array of filter rules optional
[
{"filter_key":"string", // REGEX that matches names in the
// resource data description
// required
"filter_value": "string" // REGEX that matches values in the
// resource data description
// optional, if not present, any value matches
}
],
"predicate": "function(doc){... return true;}" // javascript predicate function that takes a
// doc and return true or false optional
}
```