OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.

 


Help: OASIS Mailing Lists Help | MarkMail Help

xdi message

[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]


Subject: Re: [xdi] Ordering


On Sun, Mar 3, 2013 at 1:33 AM, Markus Sabadello <markus.sabadello@xdi.org> wrote:
I reviewed how ordering currently works in XDI.

As we know, statements are inherently unordered, but order can be introduced through additional statements.

I think the idea is that we want to be able to #1 order members in a collection, and #2 order relational arcs on a context node.

Both is relevant for messaging, as described here:
https://wiki.oasis-open.org/xdi/XdiMessagePatterns#StatementOrderingRules

#1 is used for ordering messages in a message envelope
#2 is used for ordering operations in a message

#1 I think is pretty well specified here:
https://wiki.oasis-open.org/xdi/XdiMultiplicity#Ordering

You can try it here:
http://xdi2.projectdanube.org/XDILocalMessenger?category=6&sample=1

When looking at #2, I ran into a question:

#2.A. Do we want to be able to order relational arcs of the same type? I.e. do something like this:

=markus/+friend$*1/=joseph
=markus/+friend$*2/=animesh
=markus/+friend$*3/=drummond

#2.B. Or do we want to be able to order all relational arcs, independent of the type. This would be what we'd need for messaging, i.e.:

.../$add$*1/...
.../$del$*2/...
.../$mod$*3/...

You can try it here:
http://xdi2.projectdanube.org/XDILocalMessenger?category=6&sample=2

So I think #2.B. is what we want, but maybe anyone has thoughts on this.

So yes, here's a set of thoughts that I had while reviewing your very clear summary above.
  1. Pattern #1 -- adding ordering subcontexts to a subject context -- seems to be very clear and clean for all uses, because by definition subcontexts must be unique.
  2. Pattern #2 -- adding ordering subcontexts to a predicate context -- is more problematic because:
    1. Predicates are not required to be unique.
    2. The very question you raise -- of whether ordering applies within a particular predicate context or across all predicate contexts -- must be answered.
  3. So here was my thought: what if the second requirement for XDI message ordering -- ordering the operations in a message -- used subject ordering instead of predicate ordering?
Here's what I mean. Right now to message ordering, the message template is modified by adding the <order> context (in the form of $*<digit>) after the message ID:

#7: OPERATION             <from>$($msg)$(!<id>)<msg-order>$do/<operation>/<object-graph>
My suggestion is just to do the same for operation ordering after the $do context. In other words:

#7: OPERATION             <from>$($msg)$(!<id>)<msg-order>$do<op-order>/<operation>/<object-graph>

This way we would get 100% unambiguous ordering of every message and every operation within that message entirely via subject ordering (and avoid the great complexity of predicate ordering altogether).

 

BTW I think XdiOrdering should be its own proposal, with both XdiMultiplicity and XdiMessagePatterns referencing it.

Agreed. Do you want to do a first draft?
 
Also, in a few places on the wiki, $is is used for ordering, but it should be $ref. I can make these changes.

Please do. Thanks!

=Drummond 
 


[Date Prev] | [Thread Prev] | [Thread Next] | [Date Next] -- [Date Index] | [Thread Index] | [List Home]