Timemaps expressed as Link Sets

38 views
Skip to first unread message

Herbert Van de Sompel

unread,
Oct 4, 2021, 12:36:26 PM10/4/21
to memen...@googlegroups.com, Herbert Van de Sompel
Hi all,

For quite a while, I have been working on the Link Set Internet Draft, see https://datatracker.ietf.org/doc/draft-ietf-httpapi-linkset/, which specifies two serializations and two media types (application/linkset ; application/linkset+json) to express a bunch of typed links in stand-alone documents. It also introduces a "linkset" relation type to support discovering Link Sets; this relation type has an optional "profile" attribute that allows expressing the profile of a Link Set.

Since Link Sets convey a bunch of typed links, they could potentially also be used to express Memento Timemaps. I finally got around to testing what those would look like and, below, I provide an example using the application/linkset+json serialization. I would be interested to get your feedback. Note that I am hereby not at all suggesting that Timemaps should be expressed as Link Sets (the existing serialization is doing the job). But in case there would eventually be a need for a standard-based JSON serialization for Timemaps, then maybe JSON Link Sets might be considered.

Anyhow, in the below example note that:

* The profile of the Link Set is said to be https://mementoweb.org/guide/timemap-linkset+json/ ; that URI does not exist but, obviously, the idea would be to have a document there that lists all the link relation types that one can expect in Memento Timemaps expressed as application/linkset+json

* In order to convey the "original", "first", "last" relations, a random Memento is picked as anchor for links with those relation types.

The example is based on this one from the Memento RFC7089:

<http://a.example.org>;rel="original",
    <http://arxiv.example.net/timemap/http://a.example.org>
      ; rel="self";type="application/link-format"
      ; from="Tue, 20 Jun 2000 18:02:59 GMT"
      ; until="Wed, 09 Apr 2008 20:30:51 GMT",
    <http://arxiv.example.net/timegate/http://a.example.org>
      ; rel="timegate",
    <http://arxiv.example.net/web/20000620180259/http://a.example.org>
      ; rel="first memento";datetime="Tue, 20 Jun 2000 18:02:59 GMT"
      ; license="http://creativecommons.org/publicdomain/zero/1.0/",
    <http://arxiv.example.net/web/20091027204954/http://a.example.org>
       ; rel="last memento";datetime="Tue, 27 Oct 2009 20:49:54 GMT"
       ; license="http://creativecommons.org/publicdomain/zero/1.0/",
    <http://arxiv.example.net/web/20000621011731/http://a.example.org>
      ; rel="memento";datetime="Wed, 21 Jun 2000 01:17:31 GMT"
      ; license="http://creativecommons.org/publicdomain/zero/1.0/",
    <http://arxiv.example.net/web/20000621044156/http://a.example.org>
      ; rel="memento";datetime="Wed, 21 Jun 2000 04:41:56 GMT"
      ; license="http://creativecommons.org/publicdomain/zero/1.0/",
    ...

And this is the Link Set Timemap I came up with:

{
  "linkset": [
    {
      "anchor": "http://arxiv.example.net/timemap/http://a.example.org",
      "profile": [
        {
          "href": "https://mementoweb.org/guide/timemap-linkset+json/",
          "type": "application/linkset+json"
        }
      ]
    },
    {
      "anchor": "http://a.example.org",
      "timegate": [
        {
          "href": "http://arxiv.example.net/timegate/http://a.example.org"
        }
      ],
      "timemap": [
        {
          "href": "http://arxiv.example.net/timemap/http://a.example.org",
          "type": "application/linkset+json",
          "from": "Tue, 20 Jun 2000 18:02:59 GMT",
          "until": "Wed, 09 Apr 2008 20:30:51 GMT"
        }
      ],
      "memento": [
        {
          "href": "http://arxiv.example.net/web/20000620180259/http://a.example.org",
          "datetime": "Tue, 20 Jun 2000 18:02:59 GMT",
          "license": "http://creativecommons.org/publicdomain/zero/1.0/"
        },
        {
          "href": "http://arxiv.example.net/web/20091027204954/http://a.example.org",
          "datetime": "Tue, 27 Oct 2009 20:49:54 GMT",
          "license": "http://creativecommons.org/publicdomain/zero/1.0/"
        },
        {
          "href": "http://arxiv.example.net/web/20000621011731/http://a.example.org",
          "datetime": "Wed, 21 Jun 2000 01:17:31 GMT",
          "license": "http://creativecommons.org/publicdomain/zero/1.0/"
        },
        {
          "href": "http://arxiv.example.net/web/20000621044156/http://a.example.org",
          "datetime": "Wed, 21 Jun 2000 04:41:56 GMT",
          "license": "http://creativecommons.org/publicdomain/zero/1.0/"
        }
      ]
    },
    {
      "anchor": "http://arxiv.example.net/web/20000621011731/http://a.example.org",
      "original": [
        {
          "href": "http://a.example.org"
        }
      ],
      "first": [
        {
          "href": "http://arxiv.example.net/web/20000620180259/http://a.example.org"
        }
      ],
      "last": [
        {
          "href": "http://arxiv.example.net/web/20091027204954/http://a.example.org"
        }
      ]
    }
  ]
}

Discovery of Link Set Timemaps could be achieved via an HTTP Link like this:
  Link: <http://arxiv.example.net/timemap/http://a.example.org>
         ; rel="linkset"
         ; type="application/linkset+json"
         ; profile="https://mementoweb.org/guide/timemap-linkset+json/"

I'd be very interested in feedback.

Greetings

Herbert

--
==================
Herbert Van de Sompel

Shawn Jones

unread,
Oct 7, 2021, 2:25:06 PM10/7/21
to memen...@googlegroups.com
This is great Herbert. I do, however, have a question.

I do not really understand the last section:

    {
      "original": [
        {
          "href": "http://a.example.org"
        }
      ],
      "first": [
        {
        }
      ],
      "last": [
        {
        }
      ]
    }

The mail states: 'In order to convey the "original", "first", "last" relations, a random Memento is picked as anchor for links with those relation types.' Why is the anchor a URI-M? Why not a URI-R or URI-T? It appears to state that "first" and "last" relate to this specific URI-M and not any URI-M in the TimeMap. Instead, could we add "first" and "last" to the previous section where the anchor is the URI-R? Maybe I misunderstand "anchor" ?

Cheers,

Shawn M. Jones, PhD
Postdoc
Information Sciences
Los Alamos National Laboratory

Twitter: @shawnmjones


--

---
You received this message because you are subscribed to the Google Groups "Memento Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email to memento-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/memento-dev/CAOywMHftTFHnGJathmu-zga-tx-S2LLyQZ%3DoGY3UFiP8cGZCaQ%40mail.gmail.com.

Herbert Van de Sompel

unread,
Oct 7, 2021, 3:46:59 PM10/7/21
to memen...@googlegroups.com, Herbert Van de Sompel
Thanks, Shawn. I do agree that the last section looks odd but, then again, I think it is correct yeet counter-intuitive:

1. Let's revise the meaning of "first" and "last" as per https://www.iana.org/assignments/link-relations/link-relations.xhtml

* first: An IRI that refers to the furthest preceding resource in a series of resources.

* last: An IRI that refers to the furthest following resource in a series of resources.

2. The approach I took is that the "series of resources" is the series of Mementos (the URI-Ms) for the Original Resource (URI-R). Hence, I picked a random Memento from the Timemap and expressed what the first/last Mementos are in the series of Mementos.

3. I agree with you that one could also consider the "series of resources" as the full history of the Original Resource. In that case the "first" would be the same as in (2), namely the very first Memento. But would the "last" then not necessarily have to be the current version of the resource, i.e. the URI-R?

4. It is relevant to mention here that we have taken a bit of a shortcut in the RFC7089 Timemaps to convey the first/last information. For example, this from the Timemap:

  <http://arxiv.example.net/web/20000620180259/http://a.example.org>
      ; rel="first memento";datetime="Tue, 20 Jun 2000 18:02:59 GMT"

effectively translates to:

<http://a.example.org> memento <http://arxiv.example.net/web/20000620180259/http://a.example.org> ; datetime="Tue, 20 Jun 2000 18:02:59 GMT"

which, as per my consideration (3) is OK. Now, this from the Timemap:

    <http://arxiv.example.net/web/20091027204954/http://a.example.org>
       ; rel="last memento";datetime="Tue, 27 Oct 2009 20:49:54 GMT"

effectively translates to:

<http://a.example.org> memento <http://arxiv.example.net/web/20091027204954/http://a.example.org> ; datetime="Tue, 27 Oct 2009 20:49:54 GMT"

which, as per my consideration (3) is not really OK because the current/live version would have to be the "last". It is through using the combination "last memento" that the approach of RFC7089 looks correct, but, when breaking down what that really means (2 links with same anchor and target but with different relationships rather than one link with a relationship that's the combo of two relationships) that one understands the shortcut that was taken.

5. Having said that, we could use the same convention as used by RFC7089 and do what you propose, i.e. convey the first/last as separate entries in the section that has the Original Resource as anchor:
  "first": [
        {
          "href": "http://arxiv.example.net/web/20000620180259/http://a.example.org"
        }
      ],
  "last": [
        {
          "href": "http://arxiv.example.net/web/20091027204954/http://a.example.org"
        }
      ]
    },

which IMO is slightly incorrect for "last" as per (3) (but hey, it's definitely more intuitive and aligned with RFC7089). But what we can't do in Link Sets is play the "first memento" and "last memento" trick because the JSON serialization does not allow that. We would also lose the "original" link but that's kind of implicit in the timegate/timemap/memento links.

Looking forward to more feedback!

Cheers

Herbert

Reply all
Reply to author
Forward
0 new messages