ceramicnetwork / CIPs

The Ceramic Improvement Proposal repository
https://cips.ceramic.network/
MIT License
82 stars 22 forks source link

Discussion: Doctypes #37

Open michaelsena opened 4 years ago

michaelsena commented 4 years ago

Discussion for CIP-5.

oed commented 4 years ago

@michaelsena Did an edit of your original outline adding a lot of details. ☝️

michaelsena commented 4 years ago

@oed some thoughts:

michaelsena commented 4 years ago

@oed I think we should make accessControl an optional meta property (alongside owners, schema, tags, etc) of a document included in the general Doctype specification (both genesis and signed). This would allow users to plug in a reference to some access control provider (either Ceramic document as described here), or some other mechanism.

Unsure if accessControl should be a string or an array of strings tho.

oed commented 4 years ago

@michaelsena accessControl seems to specific and unrelated to the functioning of the protocol in general. Maybe it could be introduced in tiles specifically instead? Want to try to keep the general parts of the protocol more minimal.

Making the update to tags 👍

michaelsena commented 4 years ago

@oed I've also been thinking about how we might be able to include links to documents one level above the current document. Theoretically there could be many different documents that point to a given document, so this would likely need to be an array.

i.e. Doc A and Doc B both include links to Doc C. I'm a user and query Doc C, but want to traverse back up the directory. I'd need to know the documents that link to this one, in this case Doc A and Doc B.

Maybe this could be something like a paths property that contains an array of docIds that link to the current doc.

Thoughts?

oed commented 4 years ago

@michaelsena @simonovic86 I updated the original post once more to reflect the recent changes in the spec.

simonovic86 commented 4 years ago

@oed @michaelsena I updated the original post with:

simonovic86 commented 4 years ago

@oed @michaelsena should we update the type of the schema to string|object? By using the object type can support nested schemas as well

oed commented 4 years ago

@simonovic86 My worry with doing that is that it will segregate how schemas are defined and also silo them. By enforcing it to live in another Ceramic document devs can easily make use of each others schemas.

simonovic86 commented 4 years ago

@oed good point, makes sense! that will enable versioning as well

simonovic86 commented 4 years ago

@oed @michaelsena updated DocMetadata with isUnique property. Also, added [index: string]: any; to allow arbitrary properties.