Comments (10)
Does that mean that a BodyParser has to convert all the corresponding headers to triples for an incoming representation?
It can be lazy though.
And I guess this gets stored in the corresponding .metadata entry then?
Yes.
Is it necessary to store these as well for incoming triples (which would make things like contentType a bit weird)?
Yes.
However, I would implement this on an as-needed basis. We found triples the most extensible mechanism to also account for future link headers etc. But I don't think it's a priority.
from communitysolidserver.
Some more metadata questions:
What needs to happen with metadata when passing through a converter of some sort? E.g. input data is text/turtle
but this gets converted to Quad[]
in the BodyParser, and then ingested into a SPARQL store. Should metadata fields (and triples in raw
) that reflect byteSize
, contentType
, etc. get removed and/or changed then?
What is supposed to happen with the metadata during a PATCH request?
If I understand correctly metadata is supposed to have its own URI (in the current client this is uri + .metadata
). This is then returned in a Link
header when accessing the resource (which will have the same problem as #16 on how to get that header to the output, should probably be an issue on its own). Can this have its own metadata then?
(I think the answer to all of the above could potentially be that metadata is only used for binary input, but then the field would have to be optional probably).
The only non-optional field according to the architecture (besides raw) is profiles
. It was mentioned before that this was not really relevant yet, but it feels a bit weird to currently have to add it as an empty array every time.
from communitysolidserver.
What needs to happen with metadata when passing through a converter of some sort? E.g. input data is
text/turtle
but this gets converted toQuad[]
in the BodyParser, and then ingested into a SPARQL store. Should metadata fields (and triples inraw
) that reflectbyteSize
,contentType
, etc. get removed and/or changed then?
Metadata should probably reflect the actual current contents indeed.
What is supposed to happen with the metadata during a PATCH request?
For the entity body? That would likely be preserved.
If I understand correctly metadata is supposed to have its own URI (in the current client this is uri +
.metadata
).
I don't think we currently have this in the spec. This would likely just be a convention for a filesystem-based backend, but not exposed.
(I think the answer to all of the above could potentially be that metadata is only used for binary input, but then the field would have to be optional probably).
It would also be relevant for non-binary input, for instance to indicate content-language.
The only non-optional field according to the architecture (besides raw) is
profiles
. It was mentioned before that this was not really relevant yet, but it feels a bit weird to currently have to add it as an empty array every time.
Oh, feel free to drop it for now.
from communitysolidserver.
If I understand correctly metadata is supposed to have its own URI (in the current client this is uri + .metadata).
I don't think we currently have this in the spec. This would likely just be a convention for a filesystem-based backend, but not exposed.
I forgot to mention this but I got my information about the metadata URI from the "spec" here
If it would not be exposed though, do we need a way to access metadata without getting the representation?
from communitysolidserver.
I forgot to mention this but I got my information about the metadata URI from the "spec" here
solid-spec
has some outdated parts still; I don't think .meta
is relevant at the moment, @csarven?
If it would not be exposed though, do we need a way to access metadata without getting the representation?
If you do a HEAD
, it would be in the HTTP headers.
from communitysolidserver.
If you do a HEAD, it would be in the HTTP headers.
Might be interesting to have a getMetadata
function in the ResourceStore
interface to get the metadata without having to do potential work to acquire the data stream?
from communitysolidserver.
Might be interesting to have a
getMetadata
function in theResourceStore
interface
My current thoughts were to rely on laziness; so if the data is not read, don't generate it.
Because I don't think HEAD
will be all that common.
But yes, could be an optimization if needed.
from communitysolidserver.
Some more metadata musings:
Regarding the incoming and outgoing metadata. Currently the BodyParser would handle both data stream (usually by doing nothing, but potentially validation and in the case of PATCH parsing), and the metadata. But chances are the different BodyParsers would handle the metadata the same (just parsing headers to an object and to triples), so either we need a separate MetadataParser next to the BodyParser or as constructor argument for most BodyParsers.
We also have metadata going the other way, when requesting a Representation from a ResourceStore. Getting the raw metadata triples should be easy since those are stored by the ResourceStore, but who is going to convert them to the members of the RepresentationMetadata object? We could have a (another ;) ) ResourceStore that simply handles the conversion of those triples to actual object values. But that would mean the original stores output "invalid" metadata objects with only triples and no filled in fields. Although those fields are optional so it could be said that they are not required to be filled in if the triples are there, it feels wrong to do so. That would imply that checking if the contentType
field is filled in is not sufficient (which is what I do already in some cases), you would also always have to check if the triples are potentially present, making the other fields somewhat redundant.
Makes me wonder if we should only make use of the triples when passing from BodyParser to ResourceStore, or from ResourceStore to ResponseWriter (who would then have to convert those back to headers, so another place conversion will be needed). Other classes that need actual header values somewhere inbetween could call a parser that returns a filled in RepresentationMetadata object. Still feels a bit muddy since there will still be several places where metadata conversion will happen.
from communitysolidserver.
I forgot to mention this but I got my information about the metadata URI from the "spec" here
Please use solid/specification as canonical reference. Alternatively, for the time being, use https://solid.github.io/specification/ as what's currently drafted.
Ruben is right that ".meta" naming convention is not relevant because the Solid spec does not define a URI Template for servers to use when naming auxiliary resources, and in this case it is descriptive resources (discovered through rel=describedby on resource that's directly associated with). How servers manage that association is deemed to be an implementation detail.
from communitysolidserver.
Mostly answered by #65
from communitysolidserver.
Related Issues (20)
- rdf-js is used, but not listed in package.json HOT 1
- Server error when switching to other account HOT 1
- Lock expired error when multiple clients fetch a particular resource from the Community Solid Server. HOT 10
- Crash "buffer undefined" in jsonparse when getting json-ld document HOT 8
- Receiving multiple notifications with WebHooks instead of one when a resource is created. HOT 12
- Static root applies to both root of server and root of pods for subdomain HOT 3
- "Unable to find storage root" for server root under subdomain configuration HOT 3
- Can't preview markdown file in Penny as they get text/turle type instead of text/plain HOT 6
- Error when running the solid server in multithread mode HOT 2
- Unable to discover ACL resource when only having Control permission HOT 1
- Allow new path placeholders to be registered
- setup and run prettier before eslint HOT 2
- `Invalid predicate IRI: requestParser` after adding requestParser as a parameter HOT 8
- Handle unknown content-types correctly with a file backend HOT 1
- Non-root container metadata templates are ignored with memory backend HOT 1
- `BaseIdentifierStrategy.getParentContainer` returns incorrect results for identifiers with a query parameter
- Server doesn't start when using configuration with redis locker with a Maximum call stack size exceeded error. HOT 1
- Won't work with Upper Case Pod name
- Duplicate JTI error for pods/WebIDs containing Japanese characters
- Server leaves spurious .meta files with a content-length triple HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from communitysolidserver.