W3C home > Mailing lists > Public > public-hydra@w3.org > June 2014

Re: How to avoid that collections "break" relationships (ISSUE-41)

From: Gregg Kellogg <gregg@greggkellogg.net>
Date: Fri, 13 Jun 2014 15:49:55 -0600
Cc: public-hydra@w3.org
Message-Id: <7C98F94E-42FC-491C-83D5-47EA13C57BD4@greggkellogg.net>
To: Markus Lanthaler <markus.lanthaler@gmx.net>
On Jun 13, 2014, at 8:03 AM, Markus Lanthaler <markus.lanthaler@gmx.net> wrote:

> On 13 Jun 2014 at 01:24, Gregg Kellogg wrote:
>> In any case, the collection mechanism is more than just a way of referencing specific
>> members, but also associating a relationship between a subject and object, which is no-where
>> to be seen in any ListItem proposal. I am concerned that those of us using both schema.org
>> and Hydra will have some difficult decisions on how to separate an entity's definition
>> between multiple resources other than relying exclusively on reverse relationships, and that
>> still doesn't handle wide many-to-many relationships such as Friend or Follows.
> 
> Could you please elaborate a bit? Are you worried that simple crawlers and other clients won't be able to reconstruct the complete resource description and it's relationships to other resources?

Not clear exactly what SEO scrapers do or donít do, but my guess is that they restrict themselves to schema.org properties. Even then, thereís not always an obvious property to connect to classes defined in schema.org. For example, its natural to want to link things such as questions from, say, a Person to the set of questions asked of her. Question has an about property, which can link back to a Thing, but there is no forward relationship. In JSON-LD (or RDFa), I could create this relationship using @reverse or @rev, but no natural way to do that in Microdata. If I create my own property to reference questions, does just the fact that Iíve linked to another resource cause an SEO scraper to dereference it?

> Does the hasCollection/collection forward link help in that regard in your opinion?

hasCollection suffers from the same ambiguity; it makes perfect sense to provide this, and a Hydra client will be able to use it to find appropriate collections (vs, having to query for collections having a subject referencing the interesting entity. But, for SEO, is there some reason to believe that a scraper will follow this to find related information?

Similarly, if I split the definition of an entity between the main entity resource, and the collections having that entity as a subject, will this result in a search engine marrying those properties together? From a linked data prospective, sure, but for SEO weíre sort of shooting in the dark.

> What do you think makes many-to-many relationships special?

Many-to-many relationships are interesting because you donít use CREATE/DELETE operations to cause to entities to become related. For example, in the Friend case, if I want to friend Markus, performing a CREATE doesnít make sense as the Markus entity presumably already exists. This is where I think LINK/UNLINK become interesting (and that seems to be exactly what theyíre intended for). You might be able to do this with PATCH on the collection manifesting these relationships, but again the semantics would be clear. If I patch the member property of a collection, do I replace itís values, or add a new value? How would I remove a specific value from a property? LINK/UNLINK make this fairly clear (although, IMO, the operation should be performed on the entities, not the collection.

In contrast, many-to-one relationships always result in a new entity being created, updated or deleted. For example, I create a new instance of a Game by performing a create on the collection (in my view), but manipulate it or delete it by operating on the game directly.

Gregg

> --
> Markus Lanthaler
> @markuslanthaler
> 
> 
> 
> 
Received on Friday, 13 June 2014 21:50:25 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 15:53:59 UTC