Labs/Ubiquity/Herd CouchDB Schema

From MozillaWiki
< Labs‎ | Ubiquity
Jump to: navigation, search

Back to Labs/Ubiquity.


Here's a tentative schema for a CouchDB document representing a snapshot of a Ubiquity command feed:

var commandFeedDocument = {
  // Size in bytes
  size: 50,

  // Contents of the code, if available (null if not available)
  contents: 'function cmd_foo() {}',

  // SHA-1 hash of the code
  hash: '706a483da34fe8d41624f1006e112853f353b5b6',

  // first seen date/time, in ISO-8601 format
  first_seen: '2002-12-25 00:00:00-06:39',

  // last seen date/time, in ISO-8601 format
  last_seen: '2002-12-25 00:00:00-06:39',

  // Number of current subscribers
  subscribers: 50,

  // URLs that have had these contents at some point in time
  urls: ['',

  // Commands contained in this feed
  commands: ['wikify', 'tinyurl', 'verbalize']