Re: Collection/Container design - AS, Hydra, LDP, SIOC, ...

On 11/09/2014 12:40 PM, Owen Shepherd wrote:
> ☮ elf Pavlik ☮ wrote:
>>
>> On 11/09/2014 02:35 AM, Owen Shepherd wrote:
>>>
>>>>
>>>> ☮ elf Pavlik ☮<mailto:perpetual-tripper@wwelves.org>
>>>> 09 November 2014 01:23
>>>> 1. Not sure if you wanted to send it just to or simply missed cc list
>>>> 2. If you put collection directly as values of follows you will get some
>>>> undesired consequences in RDF!
>>>>
>>>> * https://github.com/HydraCG/Specifications/issues/33
>>>> * https://github.com/HydraCG/Specifications/issues/41
>>>
>>> This problem doesn't apply to AS because we don't use "AS:follows"
>>> properties or similar
>>
>>
>> i think i don't understand what you meant in sentence above!
>>
>> if you go with
>>
>> {
>>   "@id": "https://wwelves.org/perpetual-tripper",
>>   "@type": "as:Person",
>> & nbsp; "follows": {
>>      "@id": "https://wwelves.org/perpetual-tripper/follows",
>>      "@type": "as:Collection",
>>      "memberTypes": "as:Actor",
>>      "totalItems": 23,
>>      "items": [
>>         "http://owenshepherd.net",
>>         "https://e14n.com/evan",
>>         ...
>>      ]
>>   }
>> }
>>
>> it doesn't mean
>>
>> @prefix ap:<http://www.w3.org/ns/activitypump#>.
>>
>> <https://wwelevs.org/perpetual-tripper>
>>                    ap:follows<https://e14n.com/evan>;
>>                    ap:follows<http://owensheph erd.net>  .
>>
>> but instead
>>
>> <https://wwelevs.org/perpetual-tripper>
>>              ap:follows<https://wwelves.org/perpetual-tripper/follows>  .
>>
>> which IMO doesn't make much of a sense!
> 
> 
> Sure it does. as:follows points at the collection of people you follow.
> as:followers points at the collection of people who follow you. These
> would be defined as owl:functionalProperty(?) - there may only be one of
> them.
> 
> Maybe it doesn't mean what perfectly idiomatic RDF would say, but it is
> certainly workable and even practical. It mirrors what AS1 deployments do.
> 
>>
>> what do you think about approach captured in hydra:Collection?
>> https://www.w3.org/community/hydra/wiki/Collection_Design
> 
> 
> Hydra's collection design is interesting, though I'm concerned about
> some aspects of it: How do I find the collection which contains my
> followers for example?
> 
> And is there any tooling which is capable of understanding the semantics
> of a Hydra collection?
> 
> I'm somewhat concerned that Hydra's collections may be this lovely,
> really clean design in theory and this complex, difficult to implement
> thing in practice.

If you look on my website (WiP) https://wwelves.org/perpetual-tripper/
You can see many candidates for collections, not only followers,
following and favorites. Now I have it on the same page but they will
need to move to dedicated pages as they grow.
Similar I will need to expose *multiple activity streams* for various
kind of activities: travel, consume/produce, eat/drink,
sleep/shower/shave etc.

For most of those 'non activity' collections I can simply reuse
predicates from existing vocabs, like knows, owns/seeks/makesOffer,
affiliation/memberOf, attendeeIn/performerIn etc. I find it very
impractical that we would need to create 'collection version' of a
predicate for each of those + many more, just so that we can set value
to a collection!

If one wants to find specific collection, in javascript one can use
helper function like:

var _ = require('lodash');

function getCollection(subject, property, inverse){
  return _.find(subject.collection, function(collection){
    var edge = collection.manages.property;
    var node = inverse ? collection.manages.object :
collection.manages.subject;
    return edge === property && node === subject['@id'];
  });
}

Another issue, if I use AS collection as currently proposed, doing HTTP
GET https://wwelves.org/perpetual-tripper/follows, i get a collection
but have no way to find out that this collection relates to
https://wwelves.org/perpetual-tripper in some way! In hydra:Collection I
would discover it from hydra:manages block :)

Received on Sunday, 9 November 2014 14:27:07 UTC