Re: ISSUE-58: the simple solution to inlined membership

On 19 May 2013, at 20:03, Ashok Malhotra <ashok.malhotra@oracle.com> wrote:

> Henry:
> To help understand your proposal please create a simple example as follows:
> Assume a LDPC has two members.
> The first member is inlined, the second member is not inlined.
> What would be returned if you do a GET on the LDPC?

Thanks Ashot. Here in 3 points

1. Simple Solution (improved)
------------------

Here is an example in N3 with 
  <member1> showing just metadata
  <member2> showing the content as a quoted string with an invented Turtle data Type
  <member3> showing the content as a graph which will be possible in the future with something like Trig,
      and is currently possible in N3. ( I am showing it to see that adding quoted content can be elegant )


~~~~~~~~~~~~~~~~
@prefix dct: <http://purl.org/dc/terms/> .

<> a ldp:Container;
   rdf:member <member1>, <member2>, <member3> .

<member1> dct:title "The first member";
          dct:created "2013-05-16T12:30:01Z"^^xsd:dateTime .

<member2> dct:title "The first member";
          dct:created "2013-05-16T12:30:01Z"^^xsd:dateTime .
          atom:content """
    <http://some.host/member2> <http://xmlns.com/foaf/0.1/primaryTopic> <http://some.host/member2#me> .
    <http://some.host/member2#me> a <http://xmlns.com/foaf/0.1/Person>
  """^^lang:Turtle .

<member3> dct:title "The first member";
          dct:created "2013-05-16T12:30:01Z"^^xsd:dateTime .
          log:semantics {
              <member3> foaf:primaryTopic <member3#me> .
	      <member3#me> a foaf:Person;
                 foaf:knows <member2#me> .
                            <member2#me> a foaf:Idiot .
          }
~~~~~~~~~~~~~~~~


Both <member2> and <member3> include the content in a safe way. You can always include
content that way without fear of creating an inconsistency. When you have the content
in that way then the client need not fetch the remote resource .

2. Problem with memberInlined proposal
--------------------------------------

The other part of my argument is that if you really want to merge the content of the members,
as proposed by the spec then the above would give you

~~~~~~~~~~~~~~~~
@prefix dct: <http://purl.org/dc/terms/> .

<> a ldp:Container;
   rdf:member <member1>, <member2>, <member3>;
   ldp:memberInlined <member2>, <member3> .
   
<member1> dct:title "The first member";
          dct:created "2013-05-16T12:30:01Z"^^xsd:dateTime .

<member2> dct:title "The first member";
          dct:created "2013-05-16T12:30:01Z"^^xsd:dateTime .
          foaf:primaryTopic <member2#me> .
                            <member2#me> a foaf:Person .

<member3> dct:title "The first member";
          dct:created "2013-05-16T12:30:01Z"^^xsd:dateTime .
          foaf:primaryTopic <member3#me> .
                            <member3#me> foaf:knows <member2#me> .
                                                    <member2#me> a foaf:Idiot .

~~~~~~~~~~~~~~~~


So now it turns out that the LDPC is asserting that 
   <member2#me> is a foaf:Idiot. 
Who said that? You can't tell anymore. 


3. How do do inlining correctly
-------------------------------

a. create a resource <inlined>

 <> a ldp:Container;
    rdf:member <inlined> .

<inlined> log:semantics { <inlined> a CashFlow . }

b. PUT or PATCH stuff on that member.
  If you get PUT or PATCH access to <inlined> then you know you have the responsibility to keep
it consistent. You can do that without problem because you can do that action atomically and
without rollback or locking. 





> -- 
> All the best, Ashok

Social Web Architect
http://bblfish.net/

Received on Sunday, 19 May 2013 20:23:40 UTC