introduction to oslc
DESCRIPTION
============================= THIS PRESENTATION IS OUTDATED See a newer version here: http://www.slideshare.net/openservices/introduction-to-oslc-and-linked-data =================================== An introduction to Open Services for Lifecycle Collaboration (OSLC): - The OSLC community - Linked Data and RDF - OSLC specificationsTRANSCRIPT
Introduction to OSLCSteve Speicher and Kartik Kanakasabesan
2
Objectives and Pre-requisites
Objectives: You will gain an understanding of the OSLC community,
linked data, and the OSLC specification
Pre-requisites: none
Highly recommended reading:
1. http://www.linkeddatatools.com/introducing-rdf
2. http://3roundstones.com/linked-data-101/linked-data-tutorial/
3
What’s next
The OSLC communityLinked data and RDFAn exampleThe OSLC specification
4
Need open collaboration on solutions
Past collaborations have fallen short because of limited and restrictive participation.
No consensus driven approachNo external reviewNo visibility into solution
Built after the fact with limited product APIsSolution focuses on two tools in hand
License feesFear of giving up IPForces alternative solutions
No open process for others to join inLimits solution to particular use cases and technologies
Limited to small set of business partners
Solution design goals and approach Restrictive licenses and intellectual property
Point-to-point integrations
5
Need better integration approaches
Past integration approaches have provided limited choice and coverage.
Past integration approaches have been disruptive and slow to emerge.
Universal metadata standard
“How did I ever think all those vendors would be able to agree?”
Point-to-point integrations
“How can I ever upgrade one tool without breaking everything else?”
Standard implementations
“Did I really believe that every vendor would rewrite their tools on a single framework?”
Single repository
“Can I really expect one vendor to provide all the functionality I need? And what about my existing tools?”
6
Identify Scenarios
Iterate on working drafts
Call it a specification
Gain technical consensus, collect non-
assert statements
OSLC and Open Community – open collaboration, better integration
7
Change Management, Quality Management, Requirements Management, Asset Management, Architecture Management, Automation
Product Lifecycle Management, Configuration Management
Performance Monitoring, Reconciliation
Implementations from IBM Rational, Oracle, IBM Tivoli and open source
3rd party adapters from IBM, Kovair, Tasktop, and open source
Dozens of end users enabling homegrown tools
Vendors, end users, industry consortia
40+ organizations have had employees participate in specification development efforts
Collaborating on solutions for ALM, DevOps, ISM, PLM
OSLC community
Wide range of interests, expertise,
participation
Growing list of implementations
from IBM and others
Completed and active
specifications for many domains
8
OSLC website at http://open-services.net
Register ParticipateBrowseLearn Adopt
9
Some key OSLC milestonesCommunity Advances
W3C Linked Data Workgroup Broaden the applicability of OSLC in the
area of Systems Management and Cloud– Resource reconciliation WG– Performance Monitoring WG – and many more….
Technical advances Eclipse Lyo 1.0 Delivery (see next slide) Atlassian JIRA OSLC based plug-in made
available Kovair announced OSLC interface on their
Omnibus solution OSLC Java library OSLC4J made
available OSLC based Tivoli Offerings New Governance model Lifecycle Integration Adapters (LIA)
available
-Linked Data Basic Profile -IBM, DERI, EMC, Oracle, Red Hat, SemanticWeb.com, Tasktop-Supporters: Siemens, Cambridge Semantics-Over forty participants from over twenty organizations
LINKED DATA PLATFORM WORKING GROUP
10
Eclipse Lyo 1.0 makes OSLC integrations easierEclipse Lyo 1.0 is an Eclipse project created with the goal
of providing tools to enable adoption of OSLC specifications.
Content includes– Code libraries (Java, Perl, others under development)– Give developers tools to ease OSLC implementations
– Reference implementations of specifications– Provide a starting point for new integrations
– Test suites and test reporting. Covers OSLC Core, CM, QM, RM and Asset today.– Accelerate and assess development
– Samples, tutorials and documentation– Working samples of OSLC integrations with Bugzilla,
Excel, Jazz tools and more.
Eclipse Lyo 1.0: http://www.eclipse.org/lyo/Eclipse Lyo download: http://eclipse.org/lyo/download.phpEclipse Lyo 1.0 podcast: http://open-services.net/resources/podcasts/
11
What’s next
The OSLC communityLinked data and RDFAn exampleThe OSLC specification
12
OSLC turns data into...
Requirements Validation Tests Design Implementation
Tool A Tool B Tool D
R1
R2
T1
T2
D1
D2
I1
I2
Tool C
13
...connected information...
validates validates
satisfy
validates
satisfy
validates
implements
implements
Requirements Validation Tests Design Implementation
Tool A Tool B Tool D
R1
R2
T1
T2
D1
D2
I1
I2
Tool C
Does every requirement have a test to validate it?
Does every requirement have a test to validate it?
Which requirements for the UI are related to test cases that failed on their last run?
Which requirements for the UI are related to test cases that failed on their last run?
Does every requirement have a test to validate it?
Does every requirement have a test to validate it?
Which requirements for the UI are related to test cases that failed on their last run?
Which requirements for the UI are related to test cases that failed on their last run?
Does every requirement have a test to validate it?
Does every requirement have a test to validate it?
Which requirements for the UI are related to test cases that failed on their last run?
Which requirements for the UI are related to test cases that failed on their last run?
Does every requirement have a test to validate it?
Does every requirement have a test to validate it?
14
...that can facilitate applied knowledge
User Interface
Processing Engine
Release
validates validates
satisfy
validates
satisfy
validates
implements
implements
Requirements Validation Tests Design Implementation
Tool A Tool B Tool D
R1
R2
T1
T2
D1
D2
I1
I2
Tool C
Why is the number of failed test cases for the UI increasing in each iteration?
Why is the number of failed test cases for the UI increasing in each iteration?
How much faster is work progressing on the UI versus the Processing Engine?
How much faster is work progressing on the UI versus the Processing Engine?
15
OSLC links lifecycle data
16
“Instead of defining a new data model, OSLC’s resource and property-value approach is based on industry standard Resource Description Framework (RDF) data model.”
Adapted from: http://open-services.net/bin/view/Main/ OslcCoreSpecification
Linked Data and RDF
Tim Berners-Lee’s four principles for linking data: Use URIs as names for things Use HTTP URIs so that people can look up those names. When someone looks up a URI, provide useful information
using the standards (RDF, SPARQL) Include links to other URIs so that they can discover more
things.
17
RDF Concepts
OSLC applies some RDF key concepts:
1. Graph data model
2. URI-based vocabulary
3. Format - Serialization syntaxes (RDF/XML, Turtle, JSON)
4. Datatypes
5. Literals
6. Expression of simple facts
7. Entailment
We’ll briefly look at some of them.
18
1. OSLC uses an RDF graph data model
Adapted from:
http://www.w3.org/TR/2004/REC-rdf-concepts-20040210/#section-data-model
The predicate provides the property or relationship between the subject and object.
Subject ObjectPredicate
Test Case 1 Requirement 1
Amanda Carowns
validates
19
2. OSLC uses a URI-based vocabulary
When there is a need to identify anything in OSLC, use a URI (there are a few exceptions).
Using URIs allows everything to be linked together. It also allows common agreed-upon meaning for relationships and for resource types
<http://...Test Case 1> <http://...validates> <http://...Requirement 1>
OSLC Core URI Naming Guidance:
http://open-services.net/wiki/core/OSLC-Core-URI-Naming-Guidance/
20
3. OSLC allows different RDF format
The RDF model provides for describing RDF triples. There are various supported formats. Some are specialized for RDF (Turtle) and others are derived from existing formats (XML, JSON). These formats can be exchanged between different applications (tools).
OSLC allows different types of format: RDF/XML Turtle JSON
OSLC Core Specification:
http://open-services.net/bin/view/Main/OslcCoreSpecification
21
Examples of different OSLC notations
<http://example.com/TestCases/1> a oslc_qm:TestCase ;
oslc_qm:validatesRequirement <http://example.com/Requirements/1>
{
"rdf:about": "http:\/\/example.com\/TestCases\/1",
"rdf:type": [ {
"rdf:resource": "http:\/\/open-services.net\/ns\/qm#TestPlan"
} ],
"oslc_qm:validatesRequirement": {
"rdf:resource": "http:\/\/example.com\/Requirements\/1"
}
}
<oslc_qm:TestCase rdf:about="http://example.com/TestCases/1">
<oslc_qm:validatesRequirement rdf:resource="http://example.com/Requirements/1"/>
</oslc_qm:TestCase>
ObjectPredicate
<http://...Test Case 1> <http://...validates> <http://...Requirement 1>
Subject
Turtle
JSON
RDF/XML
22
What’s next
The OSLC communityLinked data and RDFAn exampleThe OSLC specification
This example is adapted from http://3roundstones.com/linked-data-101/linked-data-tutorial/ [David Wood, 3RoundStonesInc. November2011]
23
Here’s a fictional project
Existing product: Lunar Rover 3.0
New Release: Lunar Rover 3.1
Main goal is to improve remote steering
Release to orbit date: September 20, 2014
24
Let’s look at the requirements domain
Bob
High
Implemented
owner
priority
state
created onNovember 24, 2011
Requirement 28465 Improve Remote Steering
Lunar Rover 3.1release
September 20, 2014
release to orbit date
owned byIris
25
The same information as before, as a graphRequirement Owner Priority Created on State Release
Requirement 28464 Add rear FIDO mast
Linda Low October 18, 2012 New Lunar Rover 3.1
Requirement 28465 Improve Remote Steering
Bob High November 24, 2011 Implemented Lunar Rover 3.1
Requirement 28466 Rebuild wheels for soil excavation
Tanuj Medium September 9, 2012 Reviewed Lunar Rover 3.1
Rover Release Owned by Release to orbit date
Lunar Rover 3.0 Cheng August 16, 2011
Lunar Rover 3.1 Iris Sept 14, 2014
26
Let’s look at the quality domain
Janet
High
Executed
pass
owner
priority
state
result
created onDecember 7, 2011
Test Case 35645: Test Steering
Lunar Rover 3.1release
September 20, 2014
release to orbit date
ownerIris
27
Let’s add more relationships
Bob
High
Implemented
owner
priority
state
created onNovember 24, 2011
Requirement 28465 Improve Remote Steering
Lunar Rover 3.1
release
September 20, 2014
release to orbit date
ownerIris
Janet
High
Executed
pass
owner
priority
state
result
created onDecember 7, 2011
Test Case 35645: Test Steering
release
validated by
28
The same information as before, as a graphRequirement Owner Priority Created
onState Release Validated by
Requirement 28464 Add rear FIDO mast
Linda Low October 18, 2012
New Lunar Rover 3.1
Requirement 28465 Improve Remote Steering
Bob High November 24, 2011
Implemented Lunar Rover 3.1
Test Case 35645: Test Steering
Requirement 28466 Rebuild wheels for soil excavation
Tanuj Medium September 9, 2012
Reviewed Lunar Rover 3.1
Lunar Rover 3.1
Rover Release
Owner Release to orbit date
Lunar Rover 3.0
Cheng August 16, 2011
Lunar Rover 3.1
Iris Sept 14, 2014
Test Case Owner Priority ...
Test Case 35645 Test Steering
Janet High ...
Lunar Rover 3.1 Iris ...
29
OSLC triple (subject-predicate-object)
validated by
Triple
Requirement 28465 Improve
Remote Steering
Test Case 35645: Test
Steering
priorityHigh
Subject = Resource = always a URI
Predicate = Relationship or
property = Always a URI
Object = Could be a URI (which could refer
to a resource) or a literal value (value to work with and show
users)
30
OSLC triple (subject-predicate-object)
<http://...validatedby>
Triple
<http://...requirement28465_
improve_remote steering>
<http://...testcase35645_test_ste
ering>
<http://...priority>“High”
Subject = Resource = always a URI
Predicate = Relationship or
property = Always a URI
Object = Could be a URI (which could refer
to a resource) or a literal value (value to work with and show
users)
31
Let’s add more relationships
Bob
High
Implemented
owner
priority
state
created on
November 24, 2011
Requirement 28465 Improve Remote
Steering
Lunar Rover 3.1
release
September 20, 2014
release to orbit date
owner
Iris
Janet
High
Executed
pass
owner
priority
state
result
created on
December 7, 2011
Test Case 35645: Test Steeringrelease
validated by
Work Item 38759
implements
32
There is a web of URIs around a development effort
<http://.../test case>
<http://.../req>
<http://.../workitem>
<http://.../test case>
<http://.../test case>
<http://.../test case>
<http://.../release><http://.../bug>
<http://.../req>
<http://.../req>
<http://.../req>
<http://.../req>
<http://.../workitem>
<http://.../workitem>
<http://.../workitem>
<http://.../workitem>
<http://.../test case>
<http://.../change request>
<http://.../build>
<http://.../change request>
<http://.../change request>
<http://.../change request>
<http://.../change request>
<http://.../build>
<http://.../build>
<http://.../build>
<http://.../build>
<http://.../build>
<http://.../build>
<http://.../build>
<http://.../build>
<http://.../build>
<http://.../build>
<http://.../build>
<http://.../build>
<http://.../build>
<http://.../build>
<http://.../bug>
<http://.../build>
<http://.../build>
<http://.../build>
<http://.../testresult>
<http://.../testresult>
<http://.../testresult>
<http://.../build>
<http://.../change request>
<http://.../bug>
<http://.../testresult>
<http://.../testresult>
validate
33
Tim Berners-Lee’s four principles applied to OSLC: Use URIs as names for things – In OSLC, each artifact in the lifecycle (for example, requirements,
change requests, test cases...) is identified by a URI. Use HTTP URIs so that people can look up those names. – In OSLC, each artifact in the lifecycle is an HTTP resource.
Standard HTTP methods (GET, PUT, POST, DELETE) are used to interact with them.
When someone looks up a URI, provide useful information using the standards (RDF*, SPARQL) – Each OSLC resource has an RDF representation. RDF/XML is
mandatory and other representations such as JSON or HTML are common.
Include links to other URIs so that they can discover more things.– OSLC lifecycle artifacts are linked by relationships (for example,
validatesRequirement or testedByTestCase) which are defined by URIs.
OSLC principles
34
What’s next
The OSLC communityLinked data and RDFAn exampleThe OSLC specification
35
Anatomy of a specification
OSLC Core Specification
http://open-services.net/bin/view/Main/OslcCoreSpecification
OSLC Change Mgt Specification
OSLC Requirements Specification
OSLC Domain X Specification
Core: Specifies the primary integration techniques for integrating lifecycle tools – the standard rules and patterns for using HTTP and RDF that all the domain workgroups must adopt in their specifications
Domain: Defines integration scenarios for a given lifecycle topic and specifies a common vocabulary for the lifecycle artifacts needed to support the scenarios.
Example: The Core specification describes Delegated UIs and Creation Factories and states that OSLC service providers MAY provide them. The Change Management specification states that CM service providers MUST provide them.
36
OSLC defines the following technical areas:
Discovery of capabilities
Discovery of capabilities
Delegated UI for Create and SelectDelegated UI for
Create and Select
HTTP C.R.U.D. for resources
HTTP C.R.U.D. for resources
Querying for resources
Querying for resources
UI Previews for Resource LinksUI Previews for Resource Links
Standard resource representations
Standard resource representations
37
First, some terminology
OSLC Resource
OSLC Service
manages
OSLC Service Provider
example: IBM Rational Team Concert project area
example: Change Management capability
example: work item (bug, defect, enhancement request)
provides an implementation of
A product or online service offering that provides an implementation of one or more
OSLC Services, which may themselves implement different OSLC Domain
specifications
Set of capabilities that enable a web client to create, retrieve, update and delete resources
managed by an ALM or PLM product or online service offering and associated with
one OSLC Domain
Managed by an OSLC Service, may have properties and may link to other resources including those provided by other OSLC
Services.
OSLC Service Provider catalog
These catalogs are used in the discovery of OSLC service providers. They help to
simplify the configuration of tools that will integrate with providers of OSLC-defined
services. example: IBM Rational Team Concert
provides
38
Starting from the catalog you can discover services and their capabilities. This is a common pattern in OSLC.
OSLC capabilities:Delegated UI Dialog allows you to create or find resources using a UI provided by the OSLC toolCreation Factory allows you to create resources programmaticallyQuery Capability allows you to query for resources
1. Discovery of capabilities
39
2. HTTP C.R.U.D
OSLC allows manipulation of resources using standard HTTP C.R.U.D
Create = POSTRequest = GETUpdate = PUTDelete = DELETE
40
Create a resource using HTTP POST, with the resource body in format of choice
URI for doing the POST is defined in the oslc:ServiceProvider in the oslc:creationFactory service
Response is a 201-Created with Location HTTP header indicating URI for resourceRequest may be rejected for any number of reasons
Insufficient permissions Missing required values Invalid data choices ...and … and ...
Valid resource formats for creation are defined by: domain specifications service provider may define its own resources and formats optionally, by resource shape associated with creation factory
Resource creation
41
Resource retrievalUse HTTP GET and standard HTTP content negotiation
Client uses HTTP Accept request header to specify desired resource formats
Use standard content(MIME) types
Partial representations can be requested via HTTP URL key=value pair as ?oslc.properties=
Allows for minimal retrieval of properties Get Defect 123 (all properties)
Get Defect 123 (just title and status)
Accept: application/json, application/xml
GET http://bugs/123
GET http://bugs/123?oslc.properties=dcterms:title,oslc_cm:status
42
Resource modificationUse HTTP GET to get resource properties to be updated
You’ll get an ETag back
Change only the property values you need to change Clients must preserve unknown content
Use HTTP PUT to send updated resource Use If-Match HTTP request header with ETag, services may reject
your request without it HTTP PUT will completely replace the resource representation We are moving towards PATCH – new HTTP verb
http://tools.ietf.org/html/rfc5789
It is possible to update only selected properties
43
Resource linking
Links are properties where the property values are URIs
Don't make assumptions about the target of linksOSLC supports an open modelNeeded to achieve goal of “loosely coupled” integrationsClients need to be flexible and expect anything
Sometimes we need to provide additional data about links: label, owners, and so on.
Special cases where links need more representation
Turtle format for a bug resource (abbreviated)
<http://example.com/bugs/2314>
a oslc_cm:ChangeRequest ;
dcterms:relation <http://server/app/bugs/1235> ;
44
3. Resource representationsOSLC services should handle any type of resource
Not just those defined by OSLC
Resources defined by OSLC use RDF data model therefore are simply defined by their set of properties
OSLC services MUST produce and consume RDF/XML representationsClients and services MUST NOT assume any subset of RDF/XML
Other representations are allowed such as:XML: OSLC defined format that allows for consistent formats and
is RDF/XML validJSON: Rules for representing namespaces and QName propertiesTurtle: No constraints, use as isAtom Syndication Format: <atom:content> SHOULD be RDF/XML
45
4. Querying for resources
Query capability has base URI
Clients form query URI and HTTP GET the results
OSLC services MAY support OSLC Query Syntax http://open-services.net/bin/view/Main/OSLCCoreSpecQuery
46
Query syntax overview Filter results by appending “oslc.where=”
with query clause to query base URI
Only boolean operation allowed is “and” which represents conjunction
“or” for disjunction is not defined in the interests of keeping the syntax simple.
Retrieve just what you want with “oslc.select=”
Defined ordering using “oslc.orderBy=” Full-text search via “oslc.searchTerms=”
Comparison Operators
= test for equality
!= test for inequality
< test less-than
> test greater-than
<= test less-than or equal
>= test greater-than or equal
'in' operator:
Test for equality to any of the values in a list. The list is a comma-separated sequence of values, enclosed in square brackets: in [“high”,”critical”]
47
Query syntax example
Find high severity bugs created after April fools day
Find bugs related to test case 31459
Find all bugs created by John Smith
http://example.com/bugs?oslc.where=
cm:severity="high" and dcterms:created>"2010-04-01"
http://example.com/bugs?oslc.where=
dcterms:creator{foaf:givenName="John" and foaf:familyName="Smith"}
http://example.com/bugs?oslc.prefix=qm=<http://qm.example.com/ns>&
oslc.where=qm:testcase=<http://example.com/tests/31459>
48
2. iframe's src set to delegated UI's URL
1. Click to launch delegated UI
3. Selection made
4. Click OK. Sends message (link+label) to parent window
A delegated UI renders the source application UI in the target application. This example shows the contributed/delegated Rational Team Concert Work Item search dialog being rendered in an OSLC Quality Management application.
5. Delegated UI renders the source app UI in the target app
49
Delegated UI key pointsDelegated UIs support both creation and selection of resources
Two communication protocols are supported for iframes: HTML5 postMessage() ← preferred method–Supported in most modern browers
Window object's window.name–Supported in older browsers and Eclipse embedded web widget
Consumer selects which protocol to use, informs provider via fragment identifier
Tremendous value for resource creation Traditionally most service logic was communicated to client and new
dialog built Now the rules for creation and dialog change as needed
Prefilling of creation dialog done by “creating” a dialog resource HTTP POST of resource format to creation dialog URL, response is URL
of dialog prefilled
50
6. UI PreviewScenario supported: hover over link to get in context preview of resourceSimple resource format defined and retrieved using HTTP content negotiation
Hover over link
51
OSLC specification also includes: Common property and resource definitions covering
Resource shapesResource typical properties: title, description, identification, …Leveraging Dublin Core and FOAFDiscussion/comments
OSLC services MAY offer OAuth 1.0aThree legged OAuth for webapp to webapp authenticationTwo legged OAuth for client to webapp authentication
OSLC services MAY offer HTTP BASIC AuthUser name and password sent “in the clear” with Base64 encodingShould be done via HTTPS only
52
Resources
OSLC Web Site http://open-services.net
OSLC Primer http://open-services.net/primer
OSLC Tutorial http://open-services.net/tutorial
Eclipse Lyo 1.0 http://www.eclipse.org/lyo/
Steve Speicher’s blog http://stevespeicher.blogspot.com/
OSLC Core and Domain specifications http://open-services.net/specifications/
53
Thank you.
Please email comments, questions and feedback about this presentation to [email protected]