[Sugar-devel] On datastore object IDs

Eben Eliason eben at laptop.org
Thu Jul 2 13:26:19 EDT 2009


On Thu, Jul 2, 2009 at 1:06 PM, Benjamin M.
Schwartz<bmschwar at fas.harvard.edu> wrote:
> Walter Bender wrote:
>> 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.)
>
> Hmmm.
>
> So there are two issues here:
>
> 1. blob uuid.  Each object may own a blob, and if two objects own
> identical blobs, then there's no good reason to store them separately on
> disk.  Something like this is used in git, I suspect.  In our case, I

That sounds fine.

> cannot think of any reason to expose the uuid outside the datastore
> itself.  It might be useful for accelerating various forms of
> object-sharing and backup, but those operations are still "behind the
> curtain".
>
> 2. Some sort of object name.  I think I agree with you that each object
> should probably have a user-editable name or  title.  We certainly need
> something like this for the Actions, and so it makes enough sense to

Hmm, I think that only objects have titles and user editable metadata
(tags/description, etc.). If I open Write, and name that Document in
the usual way, that title should be associated with that object. The
action will happen to read like:

Wrote [My Story]

And clicking on the icon next to "My Story" in the action should
resume the activity, but the name is actually belonging to the object
that the action refers to.

> extend it to objects.  However, I think that we can keep this as it
> currently is: a metadata attribute like any other.  When I share an object
> with you, it may get a new tree_id and a version_id of 1, but it keeps all
> its metadata, including its title.

This seem fundamentally wrong to me, but perhaps that's because I'm
not actually seeing how these 2 problems you bring up are problems.
Why can't a given Document (tree_id, version_id) be referenced from
any number of actions?

Eben


More information about the Sugar-devel mailing list