Multipart MIME #5
AdamSobieski
started this conversation in
Ideas
Replies: 1 comment
|
This bit of history is worth a look: https://www.w3.org/TR/2015/WD-web-packaging-20150115/ It's very similar to what you describe here with clearly similar use cases in mind. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Introduction
By providing and making use of a metadata part, multipart MIME messages could be used for representing knowledge, argumentation, and other kinds of data intended for interchange between software applications and systems.
Use Cases
As there exist mappings between multipart MIME messages and (compressed) archive files, use cases can be described as encompassing those for both of these kinds of resources. Some of these use cases are listed below.
One use case involves using multipart messages with semantic metadata parts for clipboard, drag-and-drop, and other interprocess communication scenarios.
Another use case involves providing data's provenance alongside the data. For example, one could provide bibliographic references (e.g.,
text/x-bibtex) alongside data, e.g., content, selections, excerpts, or quotations.Another use case involves bundling data-table schemas with one or more more data tables (e.g.,
text/csv,text/tab-separated-values). As envisioned, metadata schema resources, e.g., CSVW metadata (application/csvm+json), describing the tables' schemas could accompany one or more data tables. See also: SQLite3 database files (application/x-sqlite3).Another use case involves including rules, grammars, schemas, or ontologies with which to verify one or more resources. For XML-based resources, there is an
xsi:schemaLocationattribute for referring to XML schema resources which could be stored elsewhere in a multipart MIME message or archive file. For RDF-based resources, there aredct:conformsToanddash:shapeproperties for referring to other resources, i.e., SHACL resources.Another use case involves 3D models (e.g.,
model/gltf+json,model/xsd+xml,model/vnd.usda) which could be accompanied by additional graphics, audio, animation, metadata, semantics, and/or accessibility-related resources. See also: Universal Scene Description packages (model/vnd.usdz+zip).Another use case involves enabling resources, e.g., source-code resources (e.g.,
text/x-python) or software projects, to be accompanied by discussion transcripts (e.g.,application/vnd.vcon+json) about them.Another use case involves artificial-intelligence systems, e.g., agentic systems, which could produce, store, load, transmit, and consume multiple resources bundled together as multipart MIME messages or (compressed) archive files.
Indicating Which Part is Metadata
Possibilities for indicating which part of a multipart message provides metadata describing and interrelating that message's parts include:
Content-Metadata: <part>, could be used on messages for indicating which part is metadata.Link: <cid:part>; rel="metadata", could be used on messages for indicating which part is metadata.Content-Metadata: true, could be used on the part which is metadata.Content-Disposition: metadata, could be used on the part which is metadata.Content-Disposition: inline; relation=metadatacould be used on the part which is metadata.Content-Relation, could be used to specify the relation between the message and the part, e.g.:content(default),metadata, orsupplemental.Link: <https://www.example.org/structure.mimeld>; rel="context", could be used to indicate which structure that a multipart message adheres to, to define which values are permissible for its parts'Content-Relationheaders, and to map these values to URIs, resembling JSON-LD's@context.Content-Context, could be used to indicate which structure that a multipart message adheres to, to define which values are permissible for its parts'Content-Relationheaders, and to map these values to URIs, resembling JSON-LD's@context.In the following examples, possibility 8 is used.
Examples
RFC 2392 URL schemes (
mid:,cid:) are utilized throughout the following examples.While the Turtle format is used for the metadata parts in the following examples, other formats, e.g., JSON-LD, could also be utilized. Additionally, a
multipart/alternativepart could be used to provide metadata in multiple formats.Example 1
The following example shows a multipart MIME message with metadata indicating that its main part references a bibliographic resource.
Example 2
The following example, drawing inspiration from the Web Annotation Data Model, shows a multipart MIME message with metadata expressing that its main part is a selection of another of its parts referenced by URL.
Example 3
The following example shows a multipart MIME message with metadata indicating that its main part offers alternative formats for an argument claim while referencing an attached spreadsheet as evidence.
Example 4
How might multipart MIME messages be of use for storing and transmitting knowledge graphs with accompanying embedding vectors? Some possibilities are presented below.
Firstly, embedding vectors can be represented as RDF literals per the RDF Tensor project.
Secondly, noticing that JSON content is in the literals, above, one could extract those parts into resources which could then be referenced by URLs. In this case,
cid:URLs.Thirdly, one could use CBOR instead of JSON to represent tensors.
Fourthly, one could use the Safetensors format. Note that
cid:URLs can make use of fragment identifiers to refer to parts of resources.Fifthly, one could use the HDF5 format.
Conclusion
What do you think about these ideas? Thank you.
All reactions