Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.
A Resource-Oriented Approach to the Repository OAI ORE Technical Committee Meeting, New York City
A Resource-Oriented Approach to the Repository <ul><li>The REST/Resource-Oriented Approach </li></ul><ul><li>Repository Fu...
The REST/Resource-Oriented Approach <ul><li>“ Architectural style” </li></ul><ul><li>Key principles </li></ul><ul><ul><li>...
The REST/Resource-Oriented Approach <ul><li>Designing an application  </li></ul><ul><ul><li>Decide on types/classes of  re...
Repository Functional Requirements <ul><li>Enable agent to </li></ul><ul><ul><li>Harvest a batch of Representations, one p...
<ul><li>Essentially, concerned with two(?) types/classes of resource </li></ul><ul><ul><li>Instances identified by URIs </...
Resources and representations <ul><li>Components communicate by transferring representations of resources </li></ul><ul><l...
Resources and representations <ul><li>URIs are typically not assigned to representations </li></ul><ul><li>But if it is us...
hasRepresentation/ isRepresentationOf <ul><li>If  there is a requirement to refer to specific representations independentl...
Formats <ul><li>XHTML </li></ul><ul><li>Collection format (XML? XHTML plus embedded RDF/RDF-A/microformats?) </li></ul><ul...
Methods: Collection i.e. add Object to Collection (Note: also adds a Representation of the Object)  Object Format Post i.e...
Methods: Object Aside: Could be extended to cover creation of  e.g. Object isComponentOf Object relations i.e. add Represe...
Methods: Representation i.e. get Representation of Object (Representation Format) ?Get
Response Codes: Collection 201 Created 400 Bad Request 401 Unauthorized 415 Unsupported Media Type Object Format Post 200 ...
Response Codes: Object 201 Created 400 Bad Request 401 Unauthorized ?415 Unsupported Media Type (Representation Format) ?P...
Response Codes: Representation 200 OK (Representation Format) ?Get
Repository Functional Requirements <ul><li>Enable agent to </li></ul><ul><ul><li>Harvest a batch of Representations, one p...
Repository Functional Requirements <ul><li>Enable agent to </li></ul><ul><ul><li>Reference </li></ul></ul><ul><ul><ul><li>...
Repository Functional Requirements <ul><li>Enable agent to </li></ul><ul><ul><li>Obtain </li></ul></ul><ul><ul><ul><li>A l...
Repository Functional Requirements <ul><li>Enable agent to </li></ul><ul><ul><li>Put </li></ul></ul><ul><ul><ul><li>An Obj...
Summary <ul><li>Focus on resources of interest </li></ul><ul><ul><li>Collections </li></ul></ul><ul><ul><li>Objects </li><...
isMoreGenericThan/ isMoreSpecificThan <ul><li>Leigh D: Web Arch takes care of resource-representation relations </li></ul>...
A Resource-Oriented Approach to the Repository OAI ORE Technical Committee Meeting, New York City
Upcoming SlideShare
Loading in …5
×

A Resource-Oriented Approach to the Repository - OAI ORE TC Meeting, NYC, Jan 2007

2,014 views

Published on

Short presentation given to OAI ORE Technical Committee meeting, Columbia University, New York City, Thursday 11 January 2007. Outlines a model of resources and their relationships to support the core repository functions and a (very tentative!) suggestion for how those core repository functions might be delivered using HTTP.

Published in: Technology, Education
  • Be the first to comment

A Resource-Oriented Approach to the Repository - OAI ORE TC Meeting, NYC, Jan 2007

  1. 1. A Resource-Oriented Approach to the Repository OAI ORE Technical Committee Meeting, New York City
  2. 2. A Resource-Oriented Approach to the Repository <ul><li>The REST/Resource-Oriented Approach </li></ul><ul><li>Repository Functional Requirements </li></ul><ul><li>Delivering Functions using a Resource-Oriented Approach </li></ul><ul><li>Caveat: All quite tentative! Needs more work etc etc! </li></ul>
  3. 3. The REST/Resource-Oriented Approach <ul><li>“ Architectural style” </li></ul><ul><li>Key principles </li></ul><ul><ul><li>Identifiable resources </li></ul></ul><ul><ul><li>Uniform interface </li></ul></ul><ul><ul><li>Stateless communication </li></ul></ul><ul><ul><li>Exchange of representations of resources </li></ul></ul><ul><ul><li>Hyperlinks in representations </li></ul></ul><ul><li>HTTP as one implementation of REST </li></ul><ul><ul><li>Actually, REST principles derived a posteriori from HTTP </li></ul></ul><ul><ul><li>Roy Fielding, Architectural Styles and the Design of Network- based Software Architectures </li></ul></ul>
  4. 4. The REST/Resource-Oriented Approach <ul><li>Designing an application </li></ul><ul><ul><li>Decide on types/classes of resources </li></ul></ul><ul><ul><li>Select/create formats for representations of resources </li></ul></ul><ul><ul><li>Select methods to be supported for resources of different types </li></ul></ul><ul><ul><li>Document likely response codes </li></ul></ul>http://bitworking.org/news/How_to_create_a_REST_Protocol http://rest.blueoxen.net/cgi-bin/wiki.pl?RESTfulDesign
  5. 5. Repository Functional Requirements <ul><li>Enable agent to </li></ul><ul><ul><li>Harvest a batch of Representations, one per Object </li></ul></ul><ul><ul><li>Reference </li></ul></ul><ul><ul><ul><li>An Object </li></ul></ul></ul><ul><ul><ul><li>A Representation of an Object </li></ul></ul></ul><ul><ul><li>Obtain </li></ul></ul><ul><ul><ul><li>Representations of an Object </li></ul></ul></ul><ul><ul><ul><li>A list of the available Representations of an Object </li></ul></ul></ul><ul><ul><li>Put </li></ul></ul><ul><ul><ul><li>An Object (into a Repository) </li></ul></ul></ul><ul><ul><ul><li>A Representation of an Object (into a Repository) </li></ul></ul></ul>
  6. 6. <ul><li>Essentially, concerned with two(?) types/classes of resource </li></ul><ul><ul><li>Instances identified by URIs </li></ul></ul><ul><li>Collection </li></ul><ul><ul><li>An aggregation of zero or more Objects </li></ul></ul><ul><ul><li>Collection hasMember 0-n Objects </li></ul></ul><ul><ul><li>Object isMemberOf 0-n Collections </li></ul></ul><ul><ul><li>Specifying harvest criteria results in different sub-collections </li></ul></ul><ul><li>Object </li></ul><ul><ul><li>(definition) </li></ul></ul><ul><ul><li>Object isComposedOf 0-n Objects </li></ul></ul><ul><ul><li>Object isComponentOf 0-n Objects </li></ul></ul><ul><ul><li>Object isDerivativeOf 0-n Objects </li></ul></ul><ul><ul><li>Object hasDerivative 0-n Objects </li></ul></ul><ul><li>Any resource has zero or more representations </li></ul>hasComponent/ isComponentOf Collection Object hasMember/ isMemberOf 0…m 0…n hasDerivative/ isDerivativeOf 0…m 0…n 0…n 0…m Resources
  7. 7. Resources and representations <ul><li>Components communicate by transferring representations of resources </li></ul><ul><li>A representation is data that encodes information about resource state. Representations do not necessarily describe the resource, or portray a likeness of the resource, or represent the resource in other senses of the word &quot;represent“ (AWWW) </li></ul><ul><li>A URI owner may provide zero or more representations for a single resource via a single URI </li></ul><ul><ul><li>Basis for Content Negotiation </li></ul></ul><ul><li>A URI owner may provide different representations over time for a single resource via the same URI </li></ul><ul><li>The same representation may be provided for multiple resources via different URIs </li></ul><ul><li>A representation is a bitstream; two different bitstreams are two different representations </li></ul>
  8. 8. Resources and representations <ul><li>URIs are typically not assigned to representations </li></ul><ul><li>But if it is useful/necessary to refer to the representation independently of the resource(s) it represents, a representation </li></ul><ul><ul><li>could be modelled/exposed as a resource in its own right </li></ul></ul><ul><ul><li>could be identified by a URI </li></ul></ul><ul><li>May be for purposes of description rather than de-referencing </li></ul><ul><li>However </li></ul><ul><ul><li>each different bitstream is a different representation, so each different bitstream would require a different URI </li></ul></ul><ul><li>Also </li></ul><ul><ul><li>isRepresentedBy is different relationship from hasComponent or isDerivedFrom </li></ul></ul><ul><ul><li>hasComponent relationship is between Objects </li></ul></ul><ul><li>Do we really need to model representations as resources? </li></ul><ul><ul><li>Representations just of Objects? Or of Collections too? </li></ul></ul><ul><li>Or do we want to model some other “more specific” resource that is related to the Object but may still have multiple representations? </li></ul>
  9. 9. hasRepresentation/ isRepresentationOf <ul><li>If there is a requirement to refer to specific representations independently of the resource(s) they represent, then we need to introduce </li></ul><ul><ul><li>an additional relationship and </li></ul></ul><ul><ul><li>an additional resource type/class </li></ul></ul><ul><li>Representation </li></ul><ul><ul><li>Resource isRepresentedBy 1-n Representations </li></ul></ul><ul><ul><li>Representation isRepresentationOf 1-n Resources </li></ul></ul>hasComponent/ isComponentOf Collection Object hasMember/ isMemberOf 0…m 0…n hasDerivative/ isDerivativeOf 0…m 0…n 0…n 0…m Resources Representation 1…n 1…m
  10. 10. Formats <ul><li>XHTML </li></ul><ul><li>Collection format (XML? XHTML plus embedded RDF/RDF-A/microformats?) </li></ul><ul><ul><li>“ Core” attributes of Collection </li></ul></ul><ul><ul><ul><li>maybe just type = Collection, label/title? </li></ul></ul></ul><ul><ul><li>List of references to (i.e. URIs of) Objects which are members of this Collection </li></ul></ul><ul><li>Object format (XML? XHTML plus embedded RDF/RDF-A/microformats?) </li></ul><ul><ul><li>“ Core” attributes of Object </li></ul></ul><ul><ul><ul><li>maybe just type = Object/other-type (i.e. “Semantics”), label/title? </li></ul></ul></ul><ul><ul><li>Datastream(s) (or references to datastreams) </li></ul></ul><ul><ul><li>List of references to (i.e. URIs of) other Objects from which this Object derived (i.e. Lineage) </li></ul></ul><ul><ul><li>List of references to (i.e. URIs of) Objects which are components of this Object (i.e. Composition) </li></ul></ul><ul><li>? List representations format </li></ul><ul><ul><li>Either list of content-types of Representations of this Resource? </li></ul></ul><ul><ul><li>Or list of content-types of and references to (i.e. URIs of) Resources which are Representations of this Resource? </li></ul></ul><ul><ul><li>Does this require a separate format? </li></ul></ul><ul><ul><ul><li>Can this be done with Status Code 300 Multiple Choices? </li></ul></ul></ul><ul><ul><ul><li>Could this data be part of Collection format & Object format? </li></ul></ul></ul><ul><li>(Other representation formats for representations!) </li></ul>
  11. 11. Methods: Collection i.e. add Object to Collection (Note: also adds a Representation of the Object) Object Format Post i.e. get Collection details (including list of Objects in Collection) i.e. get list of content-types (and URIs?) of Representations of Collection XHTML Collection Format ?List Representations Format Get
  12. 12. Methods: Object Aside: Could be extended to cover creation of e.g. Object isComponentOf Object relations i.e. add Representation of Object (Representation Format) ?Post i.e. get Object details (including list of component Objects, list of Objects from which derived) i.e. get list of content-types (and URIs?) of Representations of Object XHTML Object Format ?List Representations Format Get
  13. 13. Methods: Representation i.e. get Representation of Object (Representation Format) ?Get
  14. 14. Response Codes: Collection 201 Created 400 Bad Request 401 Unauthorized 415 Unsupported Media Type Object Format Post 200 OK 200 OK XHTML Collection Format ?List Representations Format Get
  15. 15. Response Codes: Object 201 Created 400 Bad Request 401 Unauthorized ?415 Unsupported Media Type (Representation Format) ?Post 200 OK 200 OK XHTML Object Format ?List Representations Format Get
  16. 16. Response Codes: Representation 200 OK (Representation Format) ?Get
  17. 17. Repository Functional Requirements <ul><li>Enable agent to </li></ul><ul><ul><li>Harvest a batch of Representations, one per Object </li></ul></ul><ul><li>GET Collection URI </li></ul><ul><li>For each member Object </li></ul><ul><ul><li>GET Object URI (Accept: Content-Type=application/listrep+xml) </li></ul></ul><ul><ul><li>GET Object URI (Accept: Content-Type=xyz) or ?GET Representation URI </li></ul></ul>
  18. 18. Repository Functional Requirements <ul><li>Enable agent to </li></ul><ul><ul><li>Reference </li></ul></ul><ul><ul><ul><li>An Object </li></ul></ul></ul><ul><ul><ul><li>A Representation of an Object </li></ul></ul></ul>Object URI Representation URI
  19. 19. Repository Functional Requirements <ul><li>Enable agent to </li></ul><ul><ul><li>Obtain </li></ul></ul><ul><ul><ul><li>A list of the available Representations of an Object </li></ul></ul></ul><ul><ul><ul><li>Representations of an Object </li></ul></ul></ul>GET Object URI (Accept: Content-Type=application/listrep+xml) GET Object URI (Accept: Content-Type=xyz) or ?GET Representation URI
  20. 20. Repository Functional Requirements <ul><li>Enable agent to </li></ul><ul><ul><li>Put </li></ul></ul><ul><ul><ul><li>An Object (into a Repository) </li></ul></ul></ul><ul><ul><ul><li>A Representation of an Object (into a Repository) </li></ul></ul></ul>POST instance of Object Format to Collection URI ?POST instance of (Representation Format) to Object URI
  21. 21. Summary <ul><li>Focus on resources of interest </li></ul><ul><ul><li>Collections </li></ul></ul><ul><ul><li>Objects </li></ul></ul><ul><ul><li>?Representations (or “Views”) </li></ul></ul><ul><li>Exchange representations of resources </li></ul><ul><li>Relationships between resources expressed using (typed) links/URIs in representations </li></ul><ul><ul><li>Server provides URIs, client consumes/follows them </li></ul></ul><ul><li>Uniform interface </li></ul><ul><ul><li>GET and POST probably sufficient for core functions? </li></ul></ul><ul><ul><li>PUT and DELETE may be required for updates, removals etc </li></ul></ul><ul><ul><ul><li>Implementers can add functionality around core functionality </li></ul></ul></ul><ul><li>Repository-as-service “disappears from view” </li></ul>
  22. 22. isMoreGenericThan/ isMoreSpecificThan <ul><li>Leigh D: Web Arch takes care of resource-representation relations </li></ul><ul><li>Maybe instead of modelling Representations and Object Resource isRepresentedBy Representation, should consider “specificity” </li></ul><ul><li>i.e. an Object may be associated with zero or more “more specific” other Objects </li></ul><ul><li>See Berners-Lee, Design Issues: Generic Resources </li></ul><ul><ul><li>http://www.w3.org/DesignIssues/Generic </li></ul></ul><ul><li>Object </li></ul><ul><ul><li>Object isMoreGenericThan 0-n Objects </li></ul></ul><ul><ul><li>Object isMoreSpecificThan 0-n Objects </li></ul></ul><ul><li>Allows for recursion </li></ul><ul><li>Allows a “more specific” Object to participate in a hasComponent relationship </li></ul>hasComponent/ isComponentOf Collection Object hasMember/ isMemberOf 0…m 0…n hasDerivative/ isDerivativeOf 0…m 0…n 0…n 0…m Resources 0…n 0…m
  23. 23. A Resource-Oriented Approach to the Repository OAI ORE Technical Committee Meeting, New York City

×