The CouchDB Plugin System
This document describes a possible future CouchDB Plugin system.
This is a work in progress, all the feedback is welcome. Please simplify and rewrite this as you see fit.
Once this is a solid description of what we want to build, we cna start building it.
High Level User-Oriented Walkthrough
tl;dr: think Firefox/Chrome Extensions.
- Go to Futon.
- Click on the main navigation item “Plugins”.
- See a landing page of popular CouchDB plugins with
- descriptions
- user ratings & comments
- a big fat “Install Now”
- Find a desireable plugin.
- Click the “Install Now” button.
- Wait for a progress bar to finish.
- Futon shows the “Getting Started” page of the plugin’s documentation.
Alternatively:
$ cpm # couch plugin manager
$ cpm search geocouch
$ cpm install geocouch
...
Name
What should these things be called?
- Plugins
- Extensions
- Modules
Architecture
Here is a list of things that need to be in place for this to work.
The Plugin Registry
A public web service that allows people to post new plugins & new versions of plugins. Think NPM, just plugins.couchdb.org.
The web service allows to browse & search plugins.
Eventually, the web service incorporates user feedback like votes and comments to rank plugins so users can make informed opinions.
Technically, I think we should just take NPM and add what we need that it doesn’t yet do (which is not much, I assume).
Futon Integration
A Futon interface to the Plugin Registry.
Plugin Tech
Documentation on how to create a CouchDB plugin, example plugins, a way to develop and test pugins, and finally hooks in CouchDB to allow “over-the-air“ plugin installation.
// Obviously this needs a lot of expanding.
Example Plugins
- CouchDB Lucene
- GeoCouch
- Auth:
- OpenID
- OAuth
- GitHub
- Log to DB
- Log to $service
Futon Plugins:
- Different JSON/Data editors.
Issues
If anyone can publish plugins, how do users know they are not malicious?
- user votes
- crypto authorship
- horses
It might be good to start a section of plugins/modules that might be made as a brainstorming exercise. I find this helps guide the design. We can start to group into categories around what they need from a plugin system, and what are out of scope.