← Prev in month ← Prev in thread
Next in thread → Next in month →

Discovery scenarios (LDPCs)

From
Martin P Pain <>
Date
2015-08-28T16:03:17+00:00
ID
Thread
Discovery scenarios (LDPCs)
I've added most of the work I've done so
far on thinking through discovery using LDPCs here: https://wiki.oasis-open.org/oslc-core/Discovery/Scenarios

So far there is:

A walk through of how OSLC Automation
discovery works in v2

The first half of thinking about how
a server using LDPCs would want OSLC discovery to work

I'm also intending to fill in the third
column of the table with how a client would take advantage of LDPCs having
been used in discovery (although of course such a client would not be compatible
with v2 servers unless they programmed the v2 approach anyway).

I've also got some worked examples to
go with the "servers" section, which I haven't worked into the
wiki page yet, but I'll copy them here so you guys have a chance to see
them, think about them, comment on them etc in good time for Thursday.

Please have a read through all of
this (in particular the servers section on the wiki page an the examples
below) and think about whether this is how you would expect OSLC discover
to work with LDPCs, and whether LDPCs give us (or anyone) any benefits.

Here are the examples, but you'll
have to correlate them to the text in the wiki page yourself for now. These
examples are not complete in that they don't go as far as Service Providers
or SPCs, but as far as creation factories & services are concerned
I don't have any further changes in mind (although there probably are more
scenarios that could be covered).

Scenario: Server contains one LDPC,
with one resource type.

LDPC:

GET /discovery HTTP/1.1

Host: example.com

200 OK

Content-Type: text/turtle

Link: http://www.w3.org/ns/ldp#BasicContainer;
rel="type",

      <http://www.w3.org/ns/ldp#Resource>;
rel="type"

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

@prefix ldp: <http://www.w3.org/ns/ldp#>.

<>

   a ldp:BasicContainer;

   dcterms:title "Container
of all this server's resources (which are all of one type)";

   ldp:contains </r1>,
</r2>, </r3>.

Plus Creation Factory:

GET /discovery HTTP/1.1

Host: example.com

200 OK

Content-Type: text/turtle

Link: http://www.w3.org/ns/ldp#BasicContainer;
rel="type",

      <http://www.w3.org/ns/ldp#Resource>;
rel="type"

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

@prefix ldp: <http://www.w3.org/ns/ldp#>.

@prefix oslc: <...>.

<>

   a ldp:BasicContainer, oslc:CreationFactory;

   dcterms:title "Container
of all this server's resources (which are all of one type)";

   ldp:contains </r1>,
</r2>, </r3>;

   oslc:creation <>;
# Itself

   oslc:resourceType <http://example.com/resource-type>.
# Optional

Plus Service:

GET /discovery HTTP/1.1

Host: example.com

200 OK

Content-Type: text/turtle

Link: http://www.w3.org/ns/ldp#BasicContainer;
rel="type",

      <http://www.w3.org/ns/ldp#Resource>;
rel="type"

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

@prefix ldp: <http://www.w3.org/ns/ldp#>.

@prefix oslc: <...>.

<>

   a ldp:BasicContainer, oslc:CreationFactory,
oslc:Service;

   dcterms:title "Container
of all this server's resources (which are all of one type)";

   ldp:contains </r1>,
</r2>, </r3>;

   oslc:domain <http://example.com/custom-oslc-domain>;

   oslc:creationFactory <>;

   oslc:creation <>.

Scenario: Automation - with separate
LDPCs for AutoPlans, AutoRequests & AutoResults (another option would
be to have one LDPC for all 3 types):

LDPC:

GET /autoPlans/ HTTP/1.1

Host: example.com

200 OK

Content-Type: text/turtle

Link: http://www.w3.org/ns/ldp#BasicContainer;
rel="type",

      <http://www.w3.org/ns/ldp#Resource>;
rel="type"

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

@prefix ldp: <http://www.w3.org/ns/ldp#>.

<>

   a ldp:BasicContainer;

   dcterms:title "Tasks
available for execution";

   ldp:contains </autoPlans/1>,
</autoPlans/2>, </autoPlans/3>.

Very similar for /autoRequests/ and
/autoResults/.

Plus Creation Factory:

GET /autoPlans/ HTTP/1.1

Host: example.com

200 OK

Content-Type: text/turtle

Link: http://www.w3.org/ns/ldp#BasicContainer;
rel="type",

      <http://www.w3.org/ns/ldp#Resource>;
rel="type"

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

@prefix ldp: <http://www.w3.org/ns/ldp#>.

@prefix oslc: <...>.

@prefix oslc_auto: <...>.

<>

   a ldp:BasicContainer;

   dcterms:title "Tasks
available for execution";

   ldp:contains </autoPlans/1>,
</autoPlans/2>, </autoPlans/3>.

   

_:factory

   a oslc:CreationFactory;

   oslc:creation <>;
# The request URI

   oslc:resourceType oslc_auto:AutomationPlan.

Service:

GET /automation/ HTTP/1.1

Host: example.com

200 OK

Content-Type: text/turtle

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

@prefix oslc: <...>.

<>

   a oslc:Service;

   oslc:domain <http://open-services.net/ns/auto#>;

   dcterms:title "Task
automation";

   oslc:creationFactory [

      oslc:creation </autoPlans/>;

      oslc:resourceType
oslc:AutomationPlan.

   ]; # Note: OSLC Automation
doesn't require creation of plans

   oslc:creationFactory [

      oslc:creation </autoRequests/>;

      oslc:resourceType
oslc:AutomationRequest.

   ];

   oslc:creationFactory [

      oslc:creation </autoResults/>;

      oslc:resourceType
oslc:AutomationResult.

   ]. # Note: OSLC Automation
doesn't require creation of results

GET /autoPlans/ HTTP/1.1

Host: example.com

200 OK

Content-Type: text/turtle

Link: http://www.w3.org/ns/ldp#BasicContainer;
rel="type",

      <http://www.w3.org/ns/ldp#Resource>;
rel="type"

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

@prefix ldp: <http://www.w3.org/ns/ldp#>.

<>

   a ldp:BasicContainer;

   dcterms:title "Tasks
available for execution";

   ldp:contains </autoPlans/1>,
</autoPlans/2>, </autoPlans/3>.

   

   

   

If we wanted to make the Service an
LDPC itself (this time considering the case where the server doesn't support
creation of Plans or Results):

GET /automation/ HTTP/1.1

Host: example.com

200 OK

Content-Type: text/turtle

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

@prefix oslc: <...>.

Link: http://www.w3.org/ns/ldp#BasicContainer;
rel="type",

      <http://www.w3.org/ns/ldp#Resource>;
rel="type"

<>

   a oslc:Service, ldp:BasicContainer;

   oslc:domain <http://open-services.net/ns/auto#>;

   dcterms:title "Task
automation";

   oslc:creationFactory [

      oslc:creation ;

      oslc:resourceType
oslc:AutomationPlan.

   ]; # Note: OSLC Automation
doesn't require creation of plans

   oslc:creationFactory [

      oslc:creation </autoRequests/>;

      oslc:resourceType
oslc:AutomationRequest.

   ];

   ldp:contains </autoPlans/>,
</autoRequests/>, </autoResults/>. # Useful for querying, discovering
dialogs, etc, etc.

Martin
Pain

Software Developer - Green Hat

Rational Test Virtualization Server, Rational Test Control Panel

E-mail:


Find me on:  and
within IBM on:  

IBM United Kingdom Limited Registered in
England and Wales with number 741598 Registered office: PO Box 41, North
Harbour, Portsmouth, Hants. PO6 3AU 

Unless stated otherwise above:

IBM United Kingdom Limited - Registered in England and Wales with number
741598. 

Registered office: PO Box 41, North Harbour, Portsmouth, Hampshire PO6
3AU
← Prev in month ← Prev in thread
Next in thread → Next in month →