collections containing collections

hello ashok.

On 2013-01-29 2:21 , "Ashok Malhotra" <ashok.malhotra@oracle.com> wrote:
>3. Can collections contain collections?
>There seems to be agreement that, yes, collections can contain
>collections.
>There also seems to be agreement that collections are LDPRs and should
>be added to collections like any other LDPR.  I think this is settled
>but, personally,
>I would like to see a line in the spec saying collections can be added to
>collections
>just like any other LDPR rather than leaving this as an exercise for the
>reader.

so if collections can contain collections, i can POST a collection
representation to a collection. so far so good. if i GET all members of a
collection that is nested, do i GET a mix of collections and members? the
models of collections and members must have some difference (and hopefully
do have quite a bit of overlap), because a collection has a list of
members (and a member doesn't have that), and a member has (embedded or
linked) content and a collection doesn't have that. if we make collections
nestable, then implementations always must be aware that the set of
resources returned is heterogeneous (members and/or collections).

if we take the delete model of "always deleting what's managed by the
server", then deleting nested collections deletes everything directly or
indirectly contained in that tree, i suppose.

i am not saying that we shouldn't be doing it, but i just want to say that
this has  number of non-trivial side-effects on the complexity of the
model (i know because we're just going through the exact same exercise
internally, where things are even worse because things can be moved and
even linked into multiple collections). it certainly is doable, but rather
than saying "why not do it?", i think we should only be doing it if we
have people enthusiastically saying that this is critically necessary for
LDP.

cheers,

dret.

Received on Tuesday, 29 January 2013 14:34:58 UTC