<?xml version="1.0"?><html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" dir="ltr"><head><title>EER - ERIS and RDF</title><style type="text/css">body {
    max-width: 900px;
    margin-top: 3em;
    margin-bottom: 5em;
    margin-left: auto;
    margin-right: auto;
    text-align: left;
    line-height: 1.6;
    font-family: &quot;courier new&quot;, courier, monospace;
    font-size: 12pt;
}

#logo {
    margin: auto;
    width: 70px;
    display: block;
}

nav ul {
    list-style-type: none;
    display: flex;
    margin: 0;
    padding: 0;
}
nav ul li {
    margin: auto; padding: 2.0rem;
}
nav ul li a::before {
    content: &quot;[&quot;
}
nav ul li a::after {
    content: &quot;]&quot;
}

.banner {width: 25%; display: block; margin: auto; padding: 2.0rem;}
.banners {display: flex;}

h1 {text-align: center;}

h2 {margin-top: 4em; text-align: center;}

h3 {margin-top: 2em;}

table {border-collapse: collapse; width: 100%; margin: 1.5rem 0;}

td, th {border: 1px solid black; text-align: left; padding: 0.5rem;}

th {background: goldenrod; font-weight: bold;}

pre {
    max-width: 100%;
    overflow: auto;
}

code {
    font-size: 90%;
    background-color: whitesmoke;
}


figure {width: 80%; display: block; margin: auto; padding: 2.0rem;}
img { margin: auto; max-width: 70%; }
footer { text-align: right; font-weight: 200; padding-top: 5em; }
footer span { padding: 0 0.5em 0 0.5em; }
</style></head><body><svg id="logo" xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 32 32"><defs><clipPath id="inside"><circle cx="16" cy="16" r="12" /></clipPath></defs><circle cx="16" cy="16" r="14" fill="goldenrod" stroke="black" stroke-width="2" /><path id="symbol" d="M 6,6 A 8,8 0 0,1 6,26 M 16,1 V 31 M 26,6 A 8,8 0 0,0 26,26" fill="none" stroke="black" stroke-width="2" clip-path="url(#inside)" /></svg><nav><a href="index.html">back to index</a></nav><article><h1>ERIS and RDF</h1><p>ERIS can be used to encode and share large pieces of content, similar to protocols like BitTorrent. Unlike BitTorrent, ERIS is also usable for encoding very small pieces of content (&lt;1KiB). This enables small pieces of data to be encoded and made available robustly. One way of encoding small pieces of data is with the Resource Description Framework (RDF).</p><p>In RDF data is modeled as a graph consisting of nodes that are either IRIs (internationalized URIs, see <a href="https://datatracker.ietf.org/doc/html/rfc3987">RFC3987</a>) or literal values (e.g. strings or integers). Edges between nodes are labeled with IRIs. RDF turns out to be very well suited for decentralized systems as identifiers are universally valid (by being URI/IRIs) and fragments of graphs can always be merged without conflict.</p><p>There are two ways in which ERIS and RDF work together: Referencing ERIS encoded content from RDF and encoding RDF with ERIS. Both will be described in the following.</p><p>The usage of ERIS and RDF was first researched as part of the <a href="https://openengiadina.net">openEngiadina</a> project.</p><h2>Referencing ERIS encoded content from RDF</h2><p>ERIS encoded content can be referenced by the <a href="http://purl.org/eris#name-urn">URN encoding of the read capability</a>. The URN can be used in any RDF. For example:</p><pre><code class="language-turtle">&lt;https://example.org/a-track-by-funki-porcini&gt;
  a mo:Track ;
  dcterms:creator &quot;Funki Porcini&quot; ;
  dcterms:title &quot;Back Home&quot; ;
  mo:musicbrainz &lt;urn:uuid:a9dae29a-3f23-4c4b-804d-e125d4582adf&gt; ;
  mo:release &lt;urn:uuid:0f028066-5891-322e-ad8d-6aa588063a2e&gt; ;
  foaf:maker &lt;urn:uuid:2adb429d-e39c-467b-b175-3f40440ff630&gt; ;
  mo:available_as &lt;urn:eris:BIAD77QDJMFAKZYH2DXBUZYAP3MXZ3DJZVFYQ5DFWC6T65WSFCU5S2IT4YZGJ7AC4SYQMP2DM2ANS2ZTCP3DJJIRV733CRAAHOSWIYZM3M&gt; .</code></pre><p>A digital representation of the track (as Ogg or Flac) that is encoded using ERIS is referenced with the <code>mo:available_as</code> property.</p><p>Consumers must know how to dereference ERIS encoded content, but the representation itself is completely conformant RDF and compatible with all existing RDF software.</p><h2>Content-addressable RDF with ERIS</h2><p>In the previous example the small RDF fragment that describes the track and references the ERIS encoded digital representation is identified by an URL (<code>https://example.org/a-track-by-funki-porcini</code>). Is it possible to encode this little piece of RDF with ERIS itself and reference it with a ERIS URN? Yes, of course!</p><p>However, it turns out that just encoding the RDF/Turtle textual representation (as shown above) does not work very well, for following reasons:</p><ul><li>The original identifier is contained in the textual representation above. We would like the identifier to not be dependant on the original location, so it should not appear in a representation that we encode with ERIS.</li><li>The RDF/Turtle representation is not very robust in the sense that we can reorder terms, add spaces and other syntactic tricks to get different textual representations of the same data. This would result in different ERIS URNs for the exactly same content. It would be much better if the identifier is not dependant on such syntactic things - we would need a canonical representation.</li><li>The textual representation is not very efficient. RDF/Turtle is designed for human readability we would prefer a representation that is more efficient.</li><li>When content-addressing large graphs we need a consistent way of grouping statements of the graph that are content-addressed together.</li></ul><p>As part of the <a href="https://openengiadina.net">openEngiadina</a> project we have made a concrete proposal to do all this: <a href="http://purl.org/ca-rdf">Content-addressable RDF</a>. NOTE: An update of this paper is planned!</p><p>Finally we can ERIS encode RDF data and get a nice URN for our track:</p><pre><code class="language-turtle">&lt;urn:eris:BIAT2G3VUQWWDDSHAQ4OSUPA4D3LVVLXZQQ34VCDUGOCYGOADWKABBOVWQNT4D4JI3T65ZV4F2FR6YCSAY3T46M5B2BCEUC2G3JJFGWKMI&gt;
  a mo:Track ;
  dcterms:creator &quot;Funki Porcini&quot; ;
  dcterms:title &quot;Back Home&quot; ;
  mo:musicbrainz &lt;urn:uuid:a9dae29a-3f23-4c4b-804d-e125d4582adf&gt; ;
  mo:release &lt;urn:uuid:0f028066-5891-322e-ad8d-6aa588063a2e&gt; ;
  foaf:maker &lt;urn:uuid:2adb429d-e39c-467b-b175-3f40440ff630&gt; ;
  mo:available_as &lt;urn:eris:BIAD77QDJMFAKZYH2DXBUZYAP3MXZ3DJZVFYQ5DFWC6T65WSFCU5S2IT4YZGJ7AC4SYQMP2DM2ANS2ZTCP3DJJIRV733CRAAHOSWIYZM3M&gt; .</code></pre><p>See also <a href="../eer-005">ERIS Cache</a> for an application of this.</p></article><footer><span><a href="https://codeberg.org/eris/eer/" title="Git repository from which this site is generated">Git</a></span><span><a href="https://creativecommons.org/licenses/by-sa/4.0/" title="Content licensed as CC-BY-SA-4.0">CC-BY-SA-4.0</a></span></footer></body></html>