Skip to content

Instantly share code, notes, and snippets.

@janl
Created October 29, 2012 16:30
Show Gist options
  • Star 6 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save janl/3974676 to your computer and use it in GitHub Desktop.
Save janl/3974676 to your computer and use it in GitHub Desktop.
The CouchDB Plugin System

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.

  1. Go to Futon.
  2. Click on the main navigation item “Plugins”.
  3. See a landing page of popular CouchDB plugins with
  • descriptions
  • user ratings & comments
  • a big fat “Install Now”
  1. Find a desireable plugin.
  2. Click the “Install Now” button.
  3. Wait for a progress bar to finish.
  4. 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:
    • Twitter
    • Facebook
    • 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
@beamed-world
Copy link

Some sort of support for JSON schema would be nice, as well as JSON API plugin as well

@OpakAlex
Copy link

OpakAlex commented Nov 8, 2016

@janl any updates on this?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment