600 likes | 718 Views
Table of Contents:. 1.X Change Log 2.X Graph Basics 3.X Special Forms in the XDI Graph 6.X Dataweb Example 7.X Link Contracts 8.X Contract Exchange Process 9.X Linking and Embedding 10.X Permissioning a Community 11.X Resolving Synonyms – Unifying the Graph
E N D
Table of Contents: 1.X Change Log 2.X Graph Basics 3.X Special Forms in the XDI Graph 6.X Dataweb Example 7.X Link Contracts 8.X Contract Exchange Process 9.X Linking and Embedding 10.X Permissioning a Community 11.X Resolving Synonyms – Unifying the Graph 12.X Removing a path - $Deleted? 13.X Delta Syntax - $Include and $Exclude? 14.X $word Usage 15.X +word Usage 16.X Universal Schema Representations 20.X Questions
2.1 The XDI Graph Basics The XDI Universal Graph is the logical data model by which resources and their associated data are discovered, identified and accessed on the Dataweb. This does not imply anything about the native data schema or physical storage mechanism!! Any resource that can be associated with an XRI is a candidate for inclusion in the XDI Graph (although XDI does place some constraints on the structure of the XRI)
2.2 The XDI Graph Basics • The proposed XDI Universal Schema stipulates that the XRI element identifying an XDI Resource be made up of a combination of 4 subelements: • Physical Authority • Logical Authority • Type • Instance
2.3 The XDI Graph Basics The first Graph Element is Resource Nodes. These are depicted as black circles. A Resource Node is any point in the XDI Graph that is the parent of either another Resource Node, a Link Node, or a Data Node. It can also contain a reference to another Resource Node. Resource Nodes serialize into Resource Elements in the XDI Universal Schema !!1010 Black lines depict authoritative relationships. Authoritative Relationships are arcs where the Child Node is wholly dependent for it’s existence on the Parent Node. If the parent is deleted the child is also deleted. (This is analogous to a UML Composition Relationship.)
2.4 The XDI Graph Basics It is important to note that ‘labels’ (XRIs) actually name the arcs (lines) between nodes not the nodes themselves. Space permitting I always try to place the labels as close as I can to the arrow head of an arc. !!1010 =andy Resource Nodes at any level MUST have ONLY ONE authoritative parent at the level above. +Email home Data Nodes are depicted in green and CANNOT have children. They are ‘Terminal Nodes’ XMLResource Nodes are also Terminal Nodes and are also depicted as green dots. ad@ootao.com
2.5 The XDI Graph Basics A red dotted line shows a Reference (Ref). A Ref is a non-authoritative relationship. It is a way of saying.. “The graph at the references target is a sub-section of my graph”. It denotes a union. The blue dotted line is a Backref. A Backref is the mechanism by which a node knows (or shows) that it is referenced. !!1010 This implies that an XDI_get() on @ootao*andy would return one phone number and one email address. An XDI_get() on =andy would return 2 phone numbers and an email address. Q: How are we going to resolve collisions? Proposal: We use the value at the Source node of the ref. =andy @ooTao*andy +phone +email +phone home contact work ad@ootao.com 510-445-5124 510-456-7878
2.6 The XDI Graph Basics !!1010 These NOTES in red will show up from time to time. These are statements that we believe to be ‘Theorems’ about the XDI Graph ( and should therefore be imposed by the Schema wherever possible). I highlight them as we are actively looking for the exceptions that will disprove the rule. @ooTao =andy +Email +Email contact contact work NOTE: Because a Ref denotes equivalence it can ONLY go horizontally, i.e., across a level of the graph. ad@ootao.com
2.7 The XDI Graph Basics !!1010 @ooTao =Andy • The red dot is a Link Node. Links denote aggregation or inclusion. (This is analogous to a UML Aggregation Relationship.) • A red dot is similar to the English language concept of ‘includes’; in this example @ooTao’s contact email includes =Andy’s work email, it can also include other values. • One way to express the XRI of ooTao’s contact email is therefore; • xri://@ooTao/(+Contact)/email*(=Andy/(+Email)/work) +Contact +Email email work =Andy/(+Email)/work ad@ootao.com
2.8 The XDI Graph Basics You can actually imagine that each level is split into 2 sub-levels. The top sub-level is for Resources and the lower is for Links. Drawn this way, a Black Line, an Authoritative Relationship should always traverse down either 1 or 2 levels. !!1010 @ooTao*Andy @ooTao =Andy Andy =Andy/(+Email)/work +Contact +Email NOTE: A link MUST have a synonym that is equal to the XRI that is addressed by the Links Reference. email work =Andy/(+Email)/work ad@ootao.com
3.1 Delegation Syntax A’s Paths to C: xri://=A*B/C You may alternately use the =B synonym: xri://=A*(=B)/C !!1011 !!1012 =B =A XRI delegation syntax (* or !) is used when one authority wants to provide a link to data at another authority… It looks like C is coming from =A (has a path rooted in =A), but C comes from B. =B B, =B C Resources representing Physical Authority nodes – the “root” of each instance of an XDI graph – can be linked just like any other level. In this case the Refs shown are links from a global registry representing the XRI 2.0 global context symbol (GCS) “!”. This registry has assigned the i-numbers “!1012” and “!1011” to these two Physical Authorities, so the absolute XRI paths are “!!1012” and “!!1011”.
3.2 Versioning Syntax !!1010 =Andy +Email Versioning Syntax is a form of delegation that can occur at any level. It represents an XRI cross-reference to the type “$v” (for version), followed by a version instance. !2 Primary !1 $v/2 $v/1 Ad@ooTao.com Ad@convoii.net
6.1 Building the Dataweb To start building any “tree” (instance) of the XDI graph “forest” (Dataweb), you first need a Physical Authority on which to root it. This Resource Node represents the network endpoint through which other nodes on the graph are addressable. Like any XDI Resource, it may have multiple XRI synonyms. This Physical Authority represents an i-broker addressable both via an abstract global independent XRI (!!1010) and via two concrete URIs based on DNS domain names. A Physical Authority could be any network-addressable endpoint, from a server farm to a cell phone to a thermostat. The Dataweb abstracts all Physical Authorities as peers, just like all IP addresses are peers. !!1010, http://xdi.example.com,https://xdi.example.com @ooTao
6.2 Building the Dataweb • A Physical Authority registers and hosts Logical Authorities (similar to the way a PC can have multiple Users). • A Logical Authority can in turn register other Logical Authorities. Note that while the i-number “!A2B3” for the second Logical Authority above is assigned by the Physical Authority !!1010, the i-name “andy” is assigned by the Logical Authority “@ooTao”. Thus there are now 3 XRI paths to this new Resource Node: • xri://!!1010/!A2B3 • xri://!!1010/(@ooTao*andy)xri://@ooTao*andy !!1010 !A2B3,@ooTao*andy @ooTao andy
6.3 Building the Dataweb Here the @ooTao authority has resources that are about ooTao. It has delegated authority for Andy and Steven’s data to other (local) Logical Authorities. !!1010 steven !A2B3,@ooTao*steven @ooTao !A2B4,@ooTao*andy andy +Phone +Email +Email +Phone +Email Support Admin Work Cell Primary Primary
6.4 Building the Dataweb If Steven now registers a global i-name, =Steven, we simply add a synonym at the node. This synonym represents a reference from the Logical Authority represented by the “=” registry. !!1010 steven !A2B3,@ooTao*steven,=Steven @ooTao !A2B4 andy +Phone +Email +Email +Phone +Email Admin Work Cell Primary Primary
7.1 Link Contracts One of the primary goals of XDI is to provide CONTROLLED access to data. The mechanism for control is establishing ‘Link Contracts’ between logical authorities that define ‘rules of engagement’. In order to make data accessible via an XDI Service one must create Link Contract Templates. Link Contracts are used to establish “Rights Paths” to data. NOTE: Any Logical Authority can only respond to requests on data (get, set, etc…) on Nodes under it’s own authority. The establishment of a ‘Rights Path’ is the process of establishing a XRI from one Logical Authority Node to a section of the XDI graph under another Logical Authority via an association node. If Steven only had his one piece of data, what might his Link Contract Template look like?... (next slide) !!1010 =Steven +Email Home
7.2 Link Contracts The first step in establishing a Link Contract Template is creating a permission path to the data. In this example the Private contract permissions an XDI Get path to =Stevens Home email via =Steven’s Personal Dataset. This example is a little simplistic as it doesn’t have any versioning syntax. See the next slide to see a more realistic version of what a Contract Template might look like. !!1010 =Steven +Email +Dataset $contract Private Home Personal TODO: Somewhere there should be a $Policies node that can be linked into the contract that stipulates the policies governing the sharing of this data. $get Home
7.3 Link Contracts This graph section is setup so that the Personal Dataset and the Private Contract can both be independently versioned. !!1010 =Steven Here version 1 of the Private Contract permissions Get on the Personal Dataset and version 2 permissions both Get and Set on the same dataset. In this example $get is repeated in both versions of the contract, so we theorize that there may be ‘delta’ syntax that would let v2 reference v1 and specify only the differences between them. +Dataset $contract +Email Private $get $v/1 Personal Home $get Home $v/1 $v/2 $set
7.4 Link Contracts In order to show ‘permissioning’ we need another Logical Authority to ‘permission’ I am intentionally showing a case where both entities are at the same Physical Authority so we don’t (yet) have to deal with replication across Physical Authorities. !!1010 =Steven =Andy +Email +Email $contract In order to save space and simply illustrate the concepts I have gone back to the simple, non-versioned, depiction of the Link Contract Template. +DataSet Private Home Personal Work $get
7.5 Link Contracts By adding the $assoc (association) node we are saying that =Steven has a relationship with =Andy. The link between the =Steven/($assoc)/(=Andy) node and the =Steven/($contract)/Private node establishes the contract instance that specifies the permissions. Now =Andy CAN access =Stevens data but hasn’t yet. !!1010 =Steven =Andy $assoc +Email +Email $contract +Dataset Private =Andy Home Personal Work $get
7.6 Link Contracts When =Andy agrees to the contract, =Andy’s digital signature of the contract is captured within =Stevens graph and =Andy creates an association node that completes the creation of the Rights Path. !!1010 =Steven =Andy $assoc $assoc +Email $assoc $contract +Dataset +Email Private =Andy =Steven Home Personal Work $link $get =Andy Signed copy of the contract
7.7 Link Contracts The Rights path explicitly states the privileges to the Data Node (# 1 from Andy’s perspective and #2 from =Steven’s perspective) 1) xri://=Andy/($assoc)/=Steven*($link)*(=steven/($contract)/private))*($get)*(=Steven/(+Email)/Home) 2) xri://=Steven/($assoc)/=Andy*(=steven/($contract)/Private)*($get)*(=Steven/(+Email)/Home) !!1010 =Steven =Andy $link +Email +Dataset $contract +Email $link =Steven Private =Andy Home Personal Work $link $get =Andy Signed copy of the contract
7.8 Link Contracts – Reciprocal Relationships NOTE: Links to Resources that have Links back is valid in the XDI Graph it is incumbent on Apps that are navigating the graph to avoid infinite recursion. !!1010 =Steven =Andy $assoc +Email +Dataset $contract +Email $assoc +Dataset $contract Personal Private Private =Andy =Steven Home Personal Work $link $get $get $link =Andy Signed copy of the contract =Steven Signed copy of the contract
7.9 Link Contracts – The $public $contract The $public instance of a $Contract type is a special Contract Template. It establishes an Anonymous access path to a determined set of data. The $public contract does not require an $assoc to be valid. This is different from a ‘Public’ contract that permissions everyone; The ‘Public’ contract will still require authentication and an $assoc to provide valid access. !!1010 =Steven =Andy $assoc $assoc +Email $contract +Dataset +Email $assoc =Steven =Andy $public Private Home Personal Work $link $get $set =Andy Signed copy of the contract
7.10 Link Contracts – INVALID ACCESS!! NOTE: One logical authority CANNOT provide a rights path directly into another logical authorities data. Access MUST be mediated via a valid contract at the logical authority that ‘owns’ the data. See next slide for valid access delegation $contract description validation revision $type $type $logical $instance $public 1.0 $get Description of how +email should be interpreted when used at the Instance level Description of how +email should be interpreted when used at the Type level
7.10 Link Contracts –VALID ACCESS!! Here the wholesale pet company only provides access to their inventory to select vendors. But the Vendor makes the data publicly available via their catalog. @wholesale.pets @wholesale.pets @birds.online $contract birds love.bird catalog vendors $assoc $contract sparrow description price $public vendors @birds.online birds partners price description $link $get $get
XDI Doc 8.2 Link Contracts – Contract Exchange How do we represent an Error Code in the response to an xdi request? !!1010 !!1011 =Steven =Andy $assoc +Email $contract +Dataset <xdi> <xri> … </xri> <resource> </resource> </xdi> Private =Andy Personal Work XDI_Get() $get
9.1 Linking and Embedding Navigating across a $link node at the Instance level signifies crossing an authority boundary and is the equivalent of Linking in a compound document architecture. !!1010 =Steven =Andy $assoc $assoc $assoc $contract +Dataset +Email Private =Andy =Steven Personal Work $link $get =Andy Signed copy of the contract
14.1 $word Usage - Intro All $words are themselves Logical Authorities and as such can all be found at the Logical level of the graph. The graph segment under a $word entry should contain the description and specification for the intended usage of that $word. The entire graph should be accessible via a $public contract. $policy $contract description validation spec $type $type $logical $instance $public 1.0 $get Description of how $policy should be interpreted when used at the Instance level Description of how $policy should be interpreted when used at the Type level
14.2 $word Usage - Intro • Position: Instance level Resource • Contains: • Contains $op-named Link Nodes that provide anonymous access to specified data. • Versioning: No • Code Use: When determining a requester’s access this node is included in addition to specifically permissioned data. $public First attempt at capturing $word usage specification. description $instance Description of how $public should be interpreted when used at the Instance level
14.3 $word Usage - $contract • Position: Type level Resource • Contains: • A user-named node that has $op*-named Links that specify permissioning (required) • $policy Instance Node (optional) • $public Instance Node (optional) • Versioning: No • Code Use: When a new Assoc is being established the code will traverse the $Contract children to find the portion of the graph that should be available to the requester. $Contract $get $public $Policy Friends $get $set
14.4 $word Usage - $policy • Position: Instance level Resource • Contains: • XML Data Node representing the text that will be presented to an end user for acceptance and application readable instructions. (optional) • Links to other Instance Nodes that contain instructional information. • Versioning: Yes • Code Use: When a contracts are being negotiated $policy must be satisfied by either App Logic or human interaction. $Contract $get $public Friends $Policy $get $set Don’t call after 10:00 PM
14.5 $word Usage - $assoc • Position: Type level Resource • Contains: • Instance nodes whose names match the URIs of Logical Authorities • Containing: • $link Link Node that provides access to a graph segment under the named Logical Authority (optional) • Link nodes to one or more Instance Nodes of Type $Contract (optional) • Versioning: No • Code Use: The $assoc is used to find and validate the location of signed contracts and therefore confirm access to requested information. It can also be used to manage the local representation of another Logical Authority $assoc $contract =Andy Private $link
14.6 $word Usage - $public • Position: Instance level Resource • Contains: • Contains $op-named Link Nodes that provide anonymous access to specified data. • Versioning: No • Code Use: When determining a requester’s access this node is included in addition to specifically permissioned data. $Contract $get $public $Policy Friends $get $set
14.7 $word Usage - $link • Position: Instance level Link (child of an instance of an $assoc) • Contains: • Ref to an access node under another Logical Authority • Versioning: No • Code Use: Differentiates ‘My’ data about another Logical Authority from the data from that authority. Used to identify an authority boundary. !!1010 =Steven $assoc =Andy $link, =andy/($assoc)/(=steven)
14.8 $word Usage - $v • Position: ANY level Link • Contains: • Ref to a resource that contains a versioned representation of the parent resource • Versioning: No • Code Use: Used to identify a versioning delegation and support version control logic such as automatically incrementing the version number to the next version number !!1010 =Andy +Email !2 Primary !1 $v/2 $v/1 Ad@ooTao.com Ad@convoii.net
14.9 $word Usage - $current • Position: ANY level Link • Contains: • Ref to a resource that contains a versioned representation of the parent resource • Versioning: No • Code Use: Explicitly maintained by Apps this alias of a version link node is used to specify the graph representation that should be used when multiple versions are available. !!1010 =Andy +Email !2 Primary !1 $current,$v/2 $v/1 Ad@ooTao.com Ad@convoii.net
14.10 $word Usage - $exception • Position: ANY level Link • Contains: • Ref to a resource that contains a versioned representation of the parent resource • Versioning: No • Code Use: Explicitly maintained by Apps this alias of a version link node is used to show that a node is ‘soft deleted’. The $deleted can be used in the syntax - $deleted*2 replacing the $v in the xri and providing restoration information while de-activating the version path.
14.11$word Usage - $delete • Position: ANY level Link • Contains: • Ref to a resource that contains a versioned representation of the parent resource • Versioning: No • Code Use: Explicitly maintained by Apps this alias of a version link node is used to show that a node is ‘soft deleted’. The $deleted can be used in the syntax - $deleted*2 replacing the $v in the xri and providing restoration information while de-activating the version path. !!1010 =Andy +Email !2 Primary !1 $current,$v/2 $delete/($v/1) Ad@ooTao.com Ad@convoii.net
14.12 $word Usage - $op*($XXXXX) • Position: Instance level Link from an instance of a $contract type resource. • Contains: • Ref to any resource that should be permissioned. • Versioning: No • Code Use: Used to validate the rights of the requester to act upon the specified resource. !!1010 =Steven $op*($get) $op*($set)*($add)*($resource) $op*($set)*($add)*($link) $op*($add)*($data) $op*($set)*($add)*($xri) $op*($set)*($add)*($ref) $op*($set)*($add)*($backref) $op*($set)*($delete)*($resource) $op*($set)*($delete)*($link) $op*($set)*($delete)*($data) $op*($set)*($delete)*($xri) $op*($set)*($delete)*($ref) $op*($set)*($delete)*($backref) $op*($set)*($replace)*($data) $op*($set)*($replace)*($xri) $contract +Dataset Private Personal $get
14.12 $word Usage - $header • Position: Instance level Link from an instance of a $contract type resource. • Contains: • Ref to any resource that should be permissioned. • Versioning: No • Code Use: Used to validate the rights of the requester to act upon the specified resource. !!1010 $header $op*($get) $op*($set)*($add)*($resource) $op*($set)*($add)*($link) $op*($add)*($data) $op*($set)*($add)*($xri) $op*($set)*($add)*($ref) $op*($set)*($add)*($backref) $op*($set)*($delete)*($resource) $op*($set)*($delete)*($link) $op*($set)*($delete)*($data) $op*($set)*($delete)*($xri) $op*($set)*($delete)*($ref) $op*($set)*($delete)*($backref) $op*($set)*($replace)*($data) $op*($set)*($replace)*($xri) +Dataset $session Private Personal $get
15.1 +word definitions @IDcommons +email email.primary $dictionary $contract description validation revision $type $instance $type $logical $public 1.0 $get Description of how +email should be interpreted when used at the Instance level Description of how +email should be interpreted when used at the Type level
15.2 +word definitions !!1010 +email $definition $validation $representation $mask +US-EN +UK-EN I say, lets have a cup of tea. A valid, native SMTP address