connectr
data store spec DRAFT

See also bug #515531

The data store is a collection of items.

Each item consists of:

The body is a string in JSON format; it is constant and its hash identifies the item. It contains a JSON object, with fields as per the following table (plus additional ones depending on the type).

field
type
description
default
type
string
The type of the item, eg. "status", "deleted", etc. This defines what additional fields are valid, apart from those in this table. Unknown types MUST be accepted, as future versions will expand the list; they may be discarded or stored-and-forwarded as seems best (but otherwise should probably be ignored).
(no default; mandatory)
??? supersedes
array of strings
List of hashes that this item supersedes.
empty list
???
name? id? piece?
string, maybe anything?
If this field is the same for two items (of the same type?), the newer one supersedes the older one.
  • Who can do this? Only the original author, or also some others?
(unique)
references
array of strings
List of hashes that this item references (ie items which should really travel with this one). For a comment this would be the item on which it's commenting; for a photo tag, this would be the person tagged and the photo (two items); for a relationship status, it'd be the two persons; etc.

time
number
When the item was created.



The following types are currently defined:
type
fields description
status
text
Status update; the "text" field stores the plain text of the update.
???
deleted
-
How to think of it? One of two ways:
  • Does nothing; its purpose is to supersede other items.
  • Deletes existing item(s).


Questions:

Notes: