[Sugar-devel] On datastore object IDs
Walter Bender
walter.bender at gmail.com
Thu Jul 2 12:44:42 EDT 2009
On Thu, Jul 2, 2009 at 12:35 PM, Benjamin M.
Schwartz<bmschwar at fas.harvard.edu> wrote:
> 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
>
>
> _______________________________________________
> Sugar-devel mailing list
> Sugar-devel at lists.sugarlabs.org
> http://lists.sugarlabs.org/listinfo/sugar-devel
>
>
Presumably the objects themselves have unique ids, a la git, so that
we can refer to the same object from multiple trees and by multiple
users? (e.g., when I share something with you, it still has the same
name.)
-walter
--
Walter Bender
Sugar Labs
http://www.sugarlabs.org
More information about the Sugar-devel
mailing list