Re: hydra:expects and hydra:returns

Hello,

On 11/05/2013 03:29 PM, Markus Lanthaler wrote:
> On Sunday, November 03, 2013 6:07 PM, Kuno Woudt wrote:
>>
>> A document at https://example.com/musicvideos/murio.jsonld contains
>> something like:
>>
>> {
>>       "@context": "https://example.com/context.json"
>>       "@id": "mbrec:95dd147c-71ba-48b1-91f3-0bf2916e9ec4#_",
>>       "@type": "mo:Signal",
>>       "foaf:isPrimaryTopicOf": [
>>           { "@id": "mbrec:95dd147c-71ba-48b1-91f3-0bf2916e9ec4" },
>>           { "@id": "https://example.com/musicvideos/murio.jsonld" }
>>       ],
>>       "dbpedia:Director": {
>>           "foaf:name": "Ray Cuts",
>>           "sioct:microblog": { "@id": "https://twitter.com/RayCuts" }
>>       }
>> }
>
> I wouldn't model things like this. In the context of Hydra we are talking
> about Linked Data applications and thus
> https://example.com/musicvideos/murio.jsonld should be the "primary"
> resource in the representation above. You could then say that murio.jsonld's
> foaf:primaryTopic is mbrec:95dd... which is a mo:Signal
>

My concern with this is that it gives focus to the "wrong" identifier. 
The identifier for the document is only of interest when interacting 
with my service, the identifier for the real-world-thing my document is 
about is what is of interest to clients -- in particular clients who 
will consume this as json (not RDF or linked data).

My experience with MusicBrainz is that there are many databases out 
there using musicbrainz identifiers to talk about music and the artists 
making that music:

- audio fingerprints at http://acoustid/track/{mbid}/
- coverart at http://coverartarchive.org/release/{mbid}/
- reviews at http://www.bbc.co.uk/music/artist/{mbid}.xml
- artist pictures at http://fanart.tv/artist/{mbid}/
etc..

Many of our customers have a local copy of the database for which they 
maintain a mapping with their internal databases and which they query 
locally.  There is value in all these services using a common identifier 
to represent a particular artist (or track, or album, etc..) so they can 
talk to eachother.

So, similarly, if someone has a local copy of my hypothetical music
video database, all the document URLs will have changed because
they're running the service on e.g. http://localhost:8080/.  But the
identifier for a particular music video should stay the same --
regardless of whether I am minting these myself or use musicbrainz
identifiers.


-- Kuno / warp.

Received on Wednesday, 6 November 2013 06:33:09 UTC