[Sugar-devel] On datastore object IDs
Benjamin M. Schwartz
bmschwar at fas.harvard.edu
Thu Jul 2 12:35:59 EDT 2009
We've been talking a lot about how datastore version 3 (?) should be
structured. I'd like to propose (purely to initiate discussion) that it
be structured as follows:
The datastore is a collection of objects, which are arranged into version
trees. Each object has a tree_id, which is an arbitrary unique identifier
(string) for the version tree. The datastore will generate a new tree_id
each time a new tree is created. Each object also has a version_id, which
indicates the object's place in the tree. The version_id could take the
form of a dotted decimal string like "4.5.2.1".
Some objects are Actions, and some objects are Documents. Each Action
must retain a list to all Documents associated with that Action, each
represented as a (tree_id, version_id) pair. Each Document must retain a
reference to the Action with which it is associated, represented as a
(tree_id, version_id) pair. Each Document is only associated with a
single Action; a new Action that uses a Document must always make a new
version.
To implement the concepts present in the current datastore, activity_id
would actually be the tree_id of an Action, and object_id would be the
(tree_id, version_id) pair of a Document.
--Ben
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 198 bytes
Desc: OpenPGP digital signature
Url : http://lists.sugarlabs.org/archive/sugar-devel/attachments/20090702/90586243/attachment.pgp
More information about the Sugar-devel
mailing list