WS-Agreement Tutorial

WS-Agreement Tutorial
Material
2004/09/13
Toshiyuki Nakata
NEC Corporation
1
Recent Status

Split the spec into two parts




WS-Agreement itself is sort of a frame-work for getting
agreements on several different domains. The details of things
to be agreed are of course domain-specific and is out of the
scope of the WS-Agreement Spec.


Eg. Job-submission using JSDL is a candidate to be used within
the frame-work.
Relation to other specification


2
Basic Specification for agreement named Web Services Agreement
Specification and Advanced Web Services Agreement Negotiation
Specification (WS-AgreementNegotiation)
Graap-WG decided to put priority on discussing WS-Agreement
first.
On 25th August WS-Agreement specification was submitted to the
GGF editor, on track to enter public comment.
Relies on WS-Addressing
Also Relies on WS-ResourceProperties
Address Map summary ( Old to be
updated)
Prefix
Namespace
wsag
http://www.ggf.org/namespaces/ws-agreement (temporary)
wsa
http://schemas.xmlsoap.org/ws/2003/03/addressing
wsbf
http://www.ibm.com/xmlns/stdwip/web-services/WS-BaseFaults
wssg
http://www.ibm.com/xmlns/stdwip/web-services/WS-ServiceGroup
wsrp
http://www.ibm.com/xmlns/stdwip/web-services/WS-ResourceProperties
xs/xsd
http://www.w3.org/2001/XMLSchema
xsi
http://www.w3.org/2001/XMLSchema-instance
wsdl
http://schemas.xmlsoap.org/wsdl/
3
Two layer Model
create()
Factory
Agreement
Ops:
terminate(limits)
inspect(query)
...
SDEs:
inspect()
Terms
Manager
Status
Agreement
Layer
Related
Agrmts
Factory
create()
Service
Layer
Application Instance
foo()
Consumer


Provider
The service layer represents the application-specific layer of business service being
provided.
The agreement layer provides a Web service-based interface that can be used to
represent and monitor agreements with respect to provisioning of services implemented in
the service layer.


An agreement port type, without any operation other than getters for state and metadata of
the agreement such as the terms, the context, etc….
An agreement factory exposes an operation for creating an agreement out of an input set of
terms. It returns an EPR to an Agreement service. The agreement factory also exposes
4
resource
properties such as the templates of offers acceptable for creation of an agreement.
Simple Sequnce-1
Agreement Initiator
Agreement Provider
Query(wsag:template)
(templates)
Based on the
Template create
an offer
CreateAgreement(offer)
Decide to agree
To the offer
Create an agreement
(EPR to Agreement1)
At this moment the agreement is
Observed.
A-I cannot refuse to the
5
Created Agreement
Agreement1
Simple Sequnce-2
Agreement Initiator
Agreement Provider
Query(wsag:template)
(templates)
Based on the
Template create
an offer
CreateAgreement(offer)
Decide to refuse
(Return a Fault)
6
Organization of Agreement

Agreement Name

Context
Name: Optional Name
Context: Describes ‘meta-data’ of the
whole Agreement



Terms Compositor
Service Description Terms


Agreementterms

Guarantee Terms


7
Parites to Agreement
Agreement Life-time
Template Name
Related Agreements
Term Compositor Structure:A scheme to
compose an AND/OR/XOR relationship
of the following two elements
Service Description Term: Information
needed to instantiate or identify a
service to which this agreement pertains
Guarantee Term:Service Levels that the
parties are agreeing to.
Agreement Context

/wsag:AgreementContext/AgreementInitiator
Agreement

Context


Terms
Compositor
Service Description Terms

/wsag:AgreementContext/AgreementProvider

Provider

Can be an URI or wsa:EndpointReference(EPR)
/wsag:AgreementContext/ExpirationTime

Guarantee Terms

Specifies the time at which this agreement is no longer valid.
/wsag:AgreementContext/TemplateName


Agreement Initiator: (Requestor)
Can be an URI or wsa:EndpointReference(EPR)
Specifies the name of the template from which this agreement is created.
/wsag:AgreementContext/RelatedAgreements

This element defines a list of related agreements: (Example??)
<wsag:AgreementContext>
<wsag:AgreementInitiator>xs:anyURI</wsag:AgreementInitiator>
<wsag:AgreementProvider>xs:anyURI</wsag:AgreementProvider>
<wsag:ExpirationTime>xs:DateTime</wsag:ExpirationTime>
<wsag:TemplateName>xs:string</wsag:templateName>
<wsag:RelatedAgreements>...</wsag:RelatedAgreements>
</wsag:AgreementContext>
8
PS what is /wsp:Context in page 15?
Example of usage of related
Agreements:

Would really like to embed something like one shown
below, but I am not confident whether this is valid or not..
<wsag:context>
<wsag:RelatedAgreements>
<wsag:RelatedAgreement wsag:Name=“basic”>
(Contents/pointers for offer to agreement1)(cf.nextpage)
r
<wsag:AgreementEPR>
ff e
<empty>
O
t
t1
</wsag:AgreementEPR>
en
en
m
</wsag:RelatedAgreement>
m
ee
r
e
Ag
<wsag:RelatedAgreement “ wsag:Name=“ext1”>
re
of
Ag
R
(Contents / pointers for offer to agreement2)(cf. nex page)
P
2)
E
<wsag:AgreementEPR>
3)
<empty>
2)Agreement Offer
</wsag:AgreementEPR>
</wsag:RelatedAgreement>
3)Fault
</wsag:RelatedAgreements>
4)A
</wsag:context>
g
Site A
ASP
Provider
GGJM
1)Agreement Offer
5)EPR of Agreement3
EPR
reem
ent
of A
gre
em
ent1
2
Offe
Accept & Create
Agreement1
Site B
r
Site C
Accept & Create
Create
Agreement2
Agreement3
9
<wsag:RelatedAgreements>
<wsag:RelatedAgreement >
(Contents/pointers for offer to agreement1)(cf. next page)
<wsag:AgreementEPR>
<EPR of Agreement1>
</wsag:AgreementEPR>
</wsag:RelatedAgreement>
<wsag:RelatedAgreement >
(Contents/pointers for offer to agreement2) (cf. next page)
<wsag:AgreementEPR>
<EPR of Agreement2 >
</wsag:AgreementEPR>
</wsag:RelatedAgreement>
</wsag:AgreementEPR>
</wsag:RelatedAgreements>
Site D
Site E
Term Composite Structure

/wsag:Terms/wsag:All (or
wsag:OneOrMore, or
wsag:ExactlyOne)


This is a logical AND (or OR, or
XOR) operator of type
wsag:TermCompositorType
The rest see next page
10
<wsag:Terms>
<wsag:All>
wsag:TermCompositorType
</wsag:All>
|
<wsag:OneOrMore>
wsag:TermCompositorType
</wsag:OneOrMore> |
<wsag:ExactlyOne>
wsag:TermCompositorType
</wsag:ExactlyOne> |
{
<wsag:ServiceDescriptionTerm>
wsag:ServiceDescriptionTermType
</wsag:ServiceDescriptionTerm> |
<wsag:ServiceReference>
wsag:ServiceReferenceType
</wsag:ServiceReference> |
<wsag:ServiceProperties>
wsag:ServicePropertiesType
</wsag:ServiceProperties> |
<wsag:GuaranteeTerm>
wsag:GuaranteeTermType
</wsag:GuaranteeTerm> } *
</wsag:Terms>
Individual types

Service description terms

{
<wsag:ServiceDescriptionTerm>
wsag:ServiceDescriptionTermType
 |
</wsag:ServiceDescriptionTerm>
<wsag:ServiceReference>
wsag:ServiceReferenceType
</wsag:ServiceReference> |
<wsag:ServiceProperties>
wsag:ServicePropertiesType 
</wsag:ServiceProperties> |
<wsag:GuaranteeTerm>
wsag:GuaranteeTermType
</wsag:GuaranteeTerm>
}*

ServiceReference

provides means for an agreement to
simply refer to the existing service
instance
ServiceProperties

are used to define measurable and
exposed properties associated with a
service, such as response time and
throughput.
GuaranteeTerm

11
are a fundamental component of an
agreement: the agreement is about the
service(s) - existing or not - described
by the service description terms.
define the assurance on service quality,
associated with the service described
by the service definition terms.
Service Description Terms

Agreement
Context
Service description terms (SDTs) are a fundamental
component of an agreement: the agreement is about the
service(s) - existing or not - described by the service
description terms.


Terms Compositor
Service Description Terms
Guarantee Terms
May be domain specific
Contains three parts
• The name of the ServiceDescriptionTerm.
• The name of the service being described partially or fully by the
domain-specific part of this service description term. This allows
for semantic grouping of service description terms that may not be
structurally grouped together in the agreement.
• A domain-specific description of the offered or required
functionality. This element MAY completely describe the service it
is about, or it MAY do so only partially.
<wsag:ServiceDescriptionTerm
wsag:Name=”xs:NCName” wsag:ServiceName=”xs:NCName”>
<xsd:any> … </xsd:any>
</wsag:ServiceDescriptionTerm>
12
Example of a Service description Term
<wsag:All>
<wsag:ServiceDescriptionTerm wsag:Name=“executable1"
wsag:ServiceName=“a1>
<job:executable> /usr/local/job1 </job:executable>
</wsag:ServiceDescriptionTerm>
<wsag:ServiceDescriptionTerm wsag:Name="numberOfCPUs1"
wsag:ServiceName=“a1">
<job:numberOfCPUs>32</job:numberOfCPUs>
</wsag:ServiceDescriptionTerm>
<wsag:ServiceDescriptionTerm
wsag:Name="memoryPerCPU1“ wsag:ServiceName=“a1">
<job:realMemorySize>200</job:realMemorySize>
</wsag:ServiceDescriptionTerm>
</wsag:All>
Specifies a job whose executable is /usr/local/job1 with 32 CPUs
and Memory size of 200 (MB?)
13
Please
note the usage of Service Name to aggregate several SDT’s.
Service reference: To be added

Any good examples?
Extracted from Page 58
Should change ServiceDescriptionTerm
To ServiceReference??
<wsag:All>
<wsag:ServiceDescriptionTerm
wsag:Name="WSDLInterface"
wsag:ServiceName="BankingService">
<sdtc:WSDLReference>
http://www.foo.org/interfaces/bank.wsdl
</sdtc:WSDLReference>
</wsag:ServiceDescriptionTerm>
<wsag:ServiceDescriptionTerm
wsag:Name="WebAccess"
wsag:ServiceName="BankingService">
<sdtc:URLPrefixDefinition>
http://www.foo.org/bank
</sdtc:URLPrefixDefinition>
</wsag:ServiceDescriptionTerm>
</wsag:All>
14
Service Properties
Sorry ran out of time will translate/update the rest tomorrow.
15
変数宣言:
<wsag:Variable name=”xsd:NCName” metric=”xsd:QName”>
…
</wsag:Variable>
例えば
<wsag:Variable name=”numberOfNodes”>
/wsag:Agreement/job:JobDescription
</wsag:Variable>
16
Guarantee Term

サービス品質の規定に関する記述

Agreement
Context

以下の3項からなるものの繰り返し

Terms Compositor
Service Description Terms
Guarantee Terms
最小のCPU数、メモリ容量、実行時間保証する終了
時間など
QualifyingCondition: サービスレベルを保障するため
の前提条件
• 例:サービスを提供する時間(月ー金の定時内)

ServiceLevelObjective: 満たすべきサービスレベル
• 応答時間何秒以内とか

BusinessValueList:保障に関するより高度なビジネス
レベルの項目
• 費用
• 罰則規定 など
<wsag:GuaranteeTerm>
<wsag:QualityingCondition>…</wsag:QualifyingCondition>?
<wsag:ServiceLevelObjective>…</wsag:ServiceLevelObjective>
<wsag:BusinessValueList>…</wsag:BusinessValueList>
</wsag:GuaranteeTerm>
17
Business Value..
<wsag:BusinessValueList>
<wsag:Importance> xsd:integer </wsag:Importance>?
<wsag:Penalty> </wsag:Penalty>?
<wsag:Reward> </wsag:Reward>?
<wsag:BusinessValue> … </wsag:BusinessValue>*
</wsag:BusinessValue>
<wsag:Penalty>
<wsag:AssesmentInterval>
<wsag:TimeInterval>xsd:duration</wsag:TimeInterval> |
<wsag:Count>xsd:positiveInteger</wsag:Count>
</wsag:AssesmentInterval>
<wsag:ValueUnit>xsd:string</wsag:ValueUnit>?
<wsag:ValueExpr>xsd:any</wsag:ValueExpr>
</wsag:Penalty>
18
Agreement Template
Agreement Template

Context
Terms Compositor

Service Description Terms

Guarantee Terms
Agreement Creation Constraints
19
Agreementを生成するためにクライ
エントはAgreement Factoryに、
Agreement Templateに基づいた
Agreement生成提案を行う。
Agreement TemplateはAgreement
Factoryにより予め、周知されている。
Agreement templateはAgreement
と同じような構造を有するが、更に
Agreement Creation Constraintを
付加して、合意を得るための条件を
指定することが可能である。
Agreement Constraintの構成

Agreement Template
<wsag:template>
…
<wsag:CreationConstraints> ?
<wsag:Item>…</wsag:Item> *
<wsag:Constraint>…</wsag:Constraint> *
</wsag:CreationConstraints>
Conte
xt
Terms
Compositor
Service
Description
Terms
Guarantee
Terms
Agreement
Constraints
任意個のoffer ItemとConstraintからなる。

Offer Item :名前、指定するItemの場所、制限値で指定する
<wsag:Item
name=”xsd:NCName”
location=”xsd:string”>
<restriction>
xsd:simpleRestrictionModel
<restriction> ?
</wsag:Item>
Creation

Constraint: 任意の制限条件が記述可能 Xqueryを使うこ
とも
<wsag:Constraint/>
20
<wsag:XQueryXConstraint>
<wsag:Expression> … </wsag:Expression>
</wsag:XQueryXConstraint>
PortType
<wsag:createAgreementInput>
<initiatorAgreementEPR>
EPR1
</initiatorAgreementEPR> ?
<offer>
...
</offer>
</wsag:createAgreementInput>
<wsag:createAgreementResponse>
<createdAgreementEPR>
EPR2
</createdAgreementEPR>
</wsag:createAgreementResponse>
生成時のInput
21
テンプレートを元に指定されたoffer
結果