-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Shape tree for Umai #22
Comments
As a starting point, here's a first attempt.
Edited:
|
In my opinion, the shapes/shape tree should also be versioned to support schema migration over time. It might be sufficient to have the shape tree defined in a document with a version number in its name? |
Hey, thanks for working on this, I'm very excited to see how we keep improving the interoperability story in Solid :). Overall it looks fine, although I've never worked with shapes so I may be missing something important. Here's some initial feedback on what we have so far. I'm pretty sure I could generate this file from the Soukai model definitions, it doesn't seem too complicated. That could also be used to hook into the build script, and publish these files alongside the application assets. That way, they would be versioned automatically, because each release would already include the updated shapes. I wonder if the file itself should contain some versioning information, something like Looking at the shapes, I found a couple of things to change (mentioned below), but the only thing I'm not sure about is the These are some things that aren't right in the shape:
|
All sounds good. I'd included sh:closed true for operations and metadata with the idea that it might be useful to maintain integrity of the data, given that history is in principle immutable. Your potential future additions make a lot of sense. I agree sh:closed might be counterproductive. The bit I'm least sure about is
The intent is to express that Umai expects a single document that should validate against all four shapes, but I'm not sure this how it would be interpreted by the the shape tree spec and others that depend on it. In principle the user might also want the crdt data to be stored in a separate document and I'm also not sure how this could be expressed. Umai (and other apps) are of course free to mandate that the data should be in the same document. |
With this do you mean that it has to contain all shapes? Or that it can? I'm asking because the initial version of a recipe doesn't have any operations, they're only added after the first edition (although that may be a pointless optimization, so I don't care about it too much). But more importantly, recipe instructions (HowToStep) are optional, there can be valid recipes without them.
Do you need more examples? Let me know what's missing and I can provide some more.
Yeah, that's a complicated topic. Soukai (the library that powers Umai) already supports loading data from different documents, but in the case of operations that's very complicated because it's the operations that point to the resource. So it wouldn't know which documents to fetch. In the case where related data is referenced in the recipe (for example, the recipe instructions), it should be possible to load them as well. But I don't think Umai is taking advantage of that feature at the moment. Edit: I just realized we could just create a new property as the inverse for |
One thing I'm not sure about - does |
It only applies to new documents, but depending on how the app is implemented it may not work properly. Long story short, Soukai models have relationships; and related documents stored in the same document will be loaded automatically. But if there is any related model in a different document, it won't be loaded unless the relationship is loaded explicitly. In Umai's case, a Recipe has a relationship with Recipe Instructions (a recipe belongs to many recipe instructions). I haven't tested this extensively, but if there is some case where an instruction in a different document is not loaded properly; I would consider that a bug.
Keeping in mind what I explained, I don't think it should. |
I'm opening this issue to discuss definition of a shape tree for Umai.
This is related to #19 and the use cases defined there, but at this stage the purpose of this issue is just to use the Umai data model as a test case for Solid interoperability.
As a point of reference for discussion, the Soukai data model is here: https://github.com/NoelDeMartin/umai/tree/main/src/models
And the crdt ontology used by Umai is here:
https://github.com/NoelDeMartin/vocab/blob/main/resources/ontologies/crdt.ttl
The text was updated successfully, but these errors were encountered: