Support for auxiliary resources and manifest (#67)#113
Open
Support for auxiliary resources and manifest (#67)#113
Conversation
kaefer3000
reviewed
Mar 31, 2026
|
|
||
| - **Container** — a resource that contains other resources. | ||
| - **DataResource** — a data-bearing resource (e.g., a document, image, or structured data file). | ||
| The storage system's root is designated as a container, serving as the apex organizational unit devoid of a superior parent, and acts as the entry point for the storage hierarchy. Storage MAY function as a root container, enabling direct writes. |
There was a problem hiding this comment.
I see that you copied those words from the current LWS-core, so nothing to complain about in your PR. Maybe a separate discussion is to be had what the storage system is and what is its root? The file system where the resource representations are physically located? On Windows, that is C:\?
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summery
This PR addresses the issue #67, and issue #86 by introducing support for auxiliary resources. And thus makes changes to logical resource organization, operations, etc.
The storage system organizes resources into two distinct layers: primary and auxiliary. The two layers are complementary. The primary layer organizes resources spatially and hierarchically using containment relations, while the auxiliary layer attaches supplementary resources to each node in that hierarchy using auxiliary relations.
The auxiliary resource layer is flat. Each primary resource owns a local set of auxiliary resources. An auxiliary resource is an LWS resource that is used to provide additional information or functionality related to a unique principal primary resource. The lifetime of an auxiliary resource is bound to the lifetime of its principal resource. There MUST be a link from aux resource to it's principal resource with rel value
principal, and a link from principal to it's each auxiliary resource with specialized rel value for each auxiliary relation called auxiliary rel. auxiliary rels are functional.linksetis such an auxiliary rel, and linkset resources are auxiliary resources.Most importantly, though server can manage (like linkset), or interpret (like acl) the auxiliary resources, the client too has freedom to create auxiliary resources with any aux-rel subject to functional constraint. Thus auxiliary resources are free axis , available for client as a tool for modelling auxiliarity interoperably across servers. For example, an app can choose to persist rights-info, or data-provenanace, etc using custom auxiliary relations and content media-types. Servers need not to pre-configured to support each relation specifically.
Manifest resource.
Each primary resource has a manifest auxiliary resource. The manifest describes basic resource metadata like type, etc. and provide auxiliary member listing, and contained member listing in case of containers. This manifest resource has the media-type
lws+json. This essentially generalizes the membership listings on both layers, and persists as a separate auxiliary resource. Thus also freeing containers to have arbitrary hypermedia representations. This is not forced separation, but natural generalization.Operations:
The Create operation is changed to support creation of auxiliary members as well. At the time of creation clients provide membership link, linking it to target via either
uporprincipalrel corresponding to containment membership or auxiliary membership. The target resource is called as patron in both cases.This is the gist. It is a significant change. But I believe it as obvious generalization, instead of forceful feature. Request to review the model first. The grammar, etc. can be updated if the direction find some resonance. Feel free to say no.
Thanks a lot for your time and consideration.
CC: @pchampin , @acoburn
Preview | Diff