kaos: a klaim extension for reasoning on programmable qos · kaos: a klaim extension for reasoning...
TRANSCRIPT
KAOS: a KLAIM Extensionfor
Reasoning on Programmable QoSEmilio Tuosto
Dipartimento di Informatica
Universita di Pisa
In cooperation with:
R. De Nicola, G. Ferrari, U. Montanari and R. Pugliese
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.1/15
Plan of the talk
WAN Programming with QoS
A representation of QoS parameters
KAOS
KAOS & Hypergraphs: reasoning on QoS issues
Details in International Symposium on Verification - Theory andPractice (LNCS)
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.2/15
Plan of the talk
WAN Programming with QoS
A representation of QoS parameters
KAOS
KAOS & Hypergraphs: reasoning on QoS issues
Details in International Symposium on Verification - Theory andPractice (LNCS)
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.2/15
Plan of the talk
WAN Programming with QoS
A representation of QoS parameters
KAOS
KAOS & Hypergraphs: reasoning on QoS issues
Details in International Symposium on Verification - Theory andPractice (LNCS)
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.2/15
Plan of the talk
WAN Programming with QoS
A representation of QoS parameters
KAOS
KAOS & Hypergraphs: reasoning on QoS issues
Details in International Symposium on Verification - Theory andPractice (LNCS)
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.2/15
Plan of the talk
WAN Programming with QoS
A representation of QoS parameters
KAOS
KAOS & Hypergraphs: reasoning on QoS issues
Details in International Symposium on Verification - Theory andPractice (LNCS)
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.2/15
Plan of the talk
WAN Programming with QoS
A representation of QoS parameters
KAOS
KAOS & Hypergraphs: reasoning on QoS issues
Details in International Symposium on Verification - Theory andPractice (LNCS)
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.2/15
Wide Area Network Programming Issues
Absence of centralised control
Administrative domains
Interoperability
“Mobility” (of resources and computation)
Network Awareness
Applications are location dependent
Locations have different features
and allow multiple (security) policies
Independently programmed in a distributed environment
Service Level Agreement
Security
... KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.3/15
Klaim
Multiple TS
Localities: first class citizens
Process migration
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.4/15
Klaim
Multiple TS
Localities: first class citizens
Process migration
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.4/15
Klaim
Multiple TS
Localities: first class citizens
Process migration
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.4/15
Klaim
Multiple TS
Localities: first class citizens
Process migration
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.4/15
Klaim
Multiple TS
Localities: first class citizens
Process migration
site s’site s
a(t)@s’
eval(P’)@s’P’
R
P
Q Q’
R’
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.4/15
Klaim
Multiple TS
Localities: first class citizens
Process migration
site s’site s
eval(P’)@s’P’
R’
P
R
Q Q’
a(t)@s’
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.4/15
Klaim
Multiple TS
Localities: first class citizens
Process migration
site s’site s
eval(P’)@s’ R’
Q
R
Q’
a(t)@s’
P’P
P ::= nil
| α.P
| P1 | P2
α ::= a@s
a ::= ... // Klaim actions
| ε(P )
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.4/15
KAOS: Gateways
Coordinators (super processes)
Dynamic creation of sites
Gateway connection management
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.5/15
KAOS: Gateways
Coordinators (super processes)
Dynamic creation of sites
Gateway connection management
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.5/15
KAOS: Gateways
Coordinators (super processes)
Dynamic creation of sites
Gateway connection management
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.5/15
KAOS: Gateways
Coordinators (super processes)
Dynamic creation of sites
Gateway connection management
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.5/15
KAOS: Gateways
Coordinators (super processes)
Dynamic creation of sites
Gateway connection management
Q’
R’
|P’
site s’site s
R
Q
P
|P
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.5/15
KAOS: Gateways
Coordinators (super processes)
Dynamic creation of sites
Gateway connection management
site s’site s
R’
|P’
Q’
|P
Q
P
R
new(s’,|P’)
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.5/15
KAOS: Gateways
Coordinators (super processes)
Dynamic creation of sites
Gateway connection management
site s’site s
R’R
Q
|P
P
|P’
Q’
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.5/15
KAOS: Gateways
Coordinators (super processes)
Dynamic creation of sites
Gateway connection management
κ
site s’site s
R’
Q’Q
P
R
P ::= γ.P | P1 | P2
γ ::= α
| ν(s · κ)
|κ_ s
| sκ^
| δ l
Cost κ abstracts characteristics of connections according to many
“dimensions” (bandwidth, latency, distance, access rights ...)KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.5/15
Connection costs
Algebra on costs: c-semiring. 〈A,+,×,0,1〉 is a constraint semiringif A is a set (0,1 ∈ A), and + and × are binary operations on A thatsatisfy the following properties:
+ is commutative, associative, idempotent, 0 is its unit elementand 1 is its absorbing element;
× is commutative, associative, distributes over +, 1 is its unitelement, and 0 is its absorbing element.
The additive operation of a c-semiring induces a partial order on A
defined as a ≤A b ⇐⇒ ∃c : a + c = b. The minimal element is thus 0
and the maximal 1
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.6/15
Examples of connection costs
〈N,min,+,+∞, 0〉 , the c-semiring of natural numbers N where
the additive operation is min
the multiplicative operation is the sum over natural numbers
〈℘({A}),∪,∩, A,A}〉 , c-semiring of capabilities A where
the additive operation is ∪
the multiplicative operation is ∩
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.7/15
KAOS: Example
s
3. download message
2. check message
1. message on s
Send ’msg’ to t
t
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.8/15
KAOS: Example
s
3. download message
2. check message
1. message on s
Send ’msg’ to t
t
x
y
zt
<10,{i,o},2>
<10,{i},20> <150,{i,o},2>
<100,{i,o,n},2>
<300,{i,o},60> s
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.8/15
KAOS: Example
s
3. download message
2. check message
1. message on s
Send ’msg’ to t
t
x
y
zt
<10,{i,o},2>
<10,{i},20> <150,{i,o},2>
<100,{i,o,n},2>
<300,{i,o},60> s
Costs are triples κ = 〈d, C, p〉 where
1. d is the geographical distance (in Km);
2. C ⊆ {i, o, n} are the capabilities, where i, o and n stand forinput, output and creation of new nodes, respectively;
3. p is the price (in euros).
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.8/15
KAOS: Example
Costs are elements of the cartesian product of
1. (N,min,+,+∞, 0),
2. (℘({i, o, n}), glb,∩, {i, o, n}, {i, o, n}),
3. (Q,min,+,+∞, 0).
proved to be a c-semiring [BMR97]Operations × and + are
〈d, C, p〉 × 〈d′, C ′, p′〉 = 〈d + d′, C ∩ C ′, p + p′〉
〈d, C, p〉 + 〈d′, C ′, p′〉 = 〈min{d, d′}, glb{C,C ′},min{p, p′}〉.
Accordingly, the neutral elements of × and +, respectively are de-
fined as 1 = 〈0, {i, o, n}, 0〉 and 0 = 〈+∞, ∅,+∞〉.
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.9/15
Hypergraphs Programming model2
Tackling new non-functional computational phenomena of systemsusing SHR.The metaphor is
“WAN systems as Hypergraphs”
“WAN computations as SHR”
In other words:
Components are represented by hyperedges
Systems are bunches of (connected) hyperedges
Computing means to rewrite hyperedge...
...according to a synchronisation policy
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.10/15
Hyperedges and Hypergraphs Syntax
A hyperedge generalises edges: It connects more than two nodes
L : 3, L(y, z, x), •y
•x L3
1
2 •z
G ::= nil∣
∣ ν y.G∣
∣ L(~x)∣
∣ G|G
Syntactic Judgement Γ ` G, fn(G) ⊆ Γ
An example:
L : 3, M : 2
x, y ` ν z.(L(y, z, x)|M(y, z))
•y
L
���� CC
CCC M
CCCC
•x ◦z
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.11/15
Hyperedges and Hypergraphs Syntax
A hyperedge generalises edges: It connects more than two nodes
L : 3, L(y, z, x), •y
•x L3
1
2 •z
G ::= nil∣
∣ ν y.G∣
∣ L(~x)∣
∣ G|G
Syntactic Judgement Γ ` G, fn(G) ⊆ Γ
An example:
L : 3, M : 2
x, y ` ν z.(L(y, z, x)|M(y, z))
•y
L
���� CC
CCC M
CCCC
•x ◦z
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.11/15
Hyperedges and Hypergraphs Syntax
A hyperedge generalises edges: It connects more than two nodes
L : 3, L(y, z, x), •y
•x L3
1
2 •z
G ::= nil∣
∣ ν y.G∣
∣ L(~x)∣
∣ G|G
Syntactic Judgement Γ ` G, fn(G) ⊆ Γ
An example:
L : 3, M : 2
x, y ` ν z.(L(y, z, x)|M(y, z))
•y
L
���� CC
CCC M
CCCC
•x ◦z
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.11/15
Hyperedges and Hypergraphs Syntax
A hyperedge generalises edges: It connects more than two nodes
L : 3, L(y, z, x), •y
•x L3
1
2 •z
G ::= nil∣
∣ ν y.G∣
∣ L(~x)∣
∣ G|G
Syntactic Judgement Γ ` G, fn(G) ⊆ Γ
An example:
L : 3, M : 2
x, y ` ν z.(L(y, z, x)|M(y, z))
•y
L
���� CC
CCC M
CCCC
•x ◦z
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.11/15
Hyperedges and Hypergraphs Syntax
A hyperedge generalises edges: It connects more than two nodes
L : 3, L(y, z, x), •y
•x L3
1
2 •z
G ::= nil∣
∣ ν y.G∣
∣ L(~x)∣
∣ G|G
Syntactic Judgement Γ ` G, fn(G) ⊆ Γ
An example:
L : 3, M : 2
x, y ` ν z.(L(y, z, x)|M(y, z))
•y
L
���� CC
CCC M
CCCC
•x ◦z
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.11/15
Replacement of Hyperedges
L → G
Benefits:
Powerful model of system composition (π, π-I, fusion)
LTS for Ambient ...
...and for Klaim
and path reservation for KAOS
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.12/15
Replacement of Hyperedges
L → G
� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �
� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �
G1
5
4
2
1 G
L
3
G2’
���
���
����
������
��� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �
G2
Benefits:
Powerful model of system composition (π, π-I, fusion)
LTS for Ambient ...
...and for Klaim
and path reservation for KAOS
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.12/15
Replacement of Hyperedges
L → G
� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �
� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �
G2’G1
G
L
5
4
2
1
3
����
���
���
����
����
Benefits:
Powerful model of system composition (π, π-I, fusion)
LTS for Ambient ...
...and for Klaim
and path reservation for KAOS
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.12/15
Replacement of Hyperedges
L → G
� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �
� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �
G2’G1
G
L
5
4
2
1
3
����
���
���
����
����
Edge replacement: local
Synchronisation as distributedconstraint solving
New node creation
Node fusion: mobility model
Benefits:
Powerful model of system composition (π, π-I, fusion)
LTS for Ambient ...
...and for Klaim
and path reservation for KAOS
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.12/15
Replacement of Hyperedges
L → G
� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �� � � � � �
� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �� � � � �
G2’G1
G
L
5
4
2
1
3
����
���
���
����
����
Edge replacement: local
Synchronisation as distributedconstraint solving
New node creation
Node fusion: mobility model
Benefits:
Powerful model of system composition (π, π-I, fusion)
LTS for Ambient ...
...and for Klaim
and path reservation for KAOS
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.12/15
KAOS & Hypergraphs
[[ s ::L P ]] = Γ ` (ν ~x, p)([[ P ]]p |
� sm,n(~u, ~x, p) |
n∏
j=1
Gκj
tj(xj, vj))
ζ ζ
ζ
GG
.....
.....
.....
.....
.....
.....
G G
P
[[ nil ]]p = nil
[[ o〈t〉 ]]p = Lo〈t〉(p)
[[ γ.P ]]p = Lγ.P (p)
[[ ε(P )@s ]]p = (ν u)(εT (P )s (u, p) | SP (u))
[[ P1 | P2 ]]p = [[ P1 ]]p | [[ P2 ]]p
[[ rec X. P ]]p = [[ P [rec X. P /X ] ]]p.
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.13/15
KAOS & Hypergraphs
[[ s ::L P ]] = Γ ` (ν ~x, p)([[ P ]]p |
� sm,n(~u, ~x, p) |
n∏
j=1
Gκj
tj(xj, vj))
ζ ζ
ζ
GG
.....
.....
.....
.....
.....
.....
G G
P
[[ nil ]]p = nil
[[ o〈t〉 ]]p = Lo〈t〉(p)
[[ γ.P ]]p = Lγ.P (p)
[[ ε(P )@s ]]p = (ν u)(εT (P )s (u, p) | SP (u))
[[ P1 | P2 ]]p = [[ P1 ]]p | [[ P2 ]]p
[[ rec X. P ]]p = [[ P [rec X. P /X ] ]]p.
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.13/15
Graph for the message example
•x
Gκzxx
HHHH
Hoo
Gκtxx
ttttt
55kkkkkkkkkk?
� x
yyyy
y
OO
? ◦
◦ ◦ ◦ Gκxzz
##HHHH
H
� z
��
HHHHH
◦ Gκzss
// •s
� t
FFFF
F
wwwww// •t
Gκxt
t
wwwww
oo •z
Gκszz
oo ◦
� s
OO
? ◦ Gκty
y// •y
Gκyz
z
xxxx
x
;;wwwww
?
εTs
OO
?
� y
OO
◦ L〈“bigfile′′,file〉
OO
◦ SFf,too
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.14/15
KAOS Graph semantics: pros & cons
– Many productions (recently reduced :-)
+ Determines the “optimal” path (also KAOS)
+ Path reservation
+ Path routing
Theorem KAOS remote actions are routed on paths with minimal cost(wrt the c-semiring operations)
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.15/15
KAOS Graph semantics: pros & cons
– Many productions (recently reduced :-)
+ Determines the “optimal” path (also KAOS)
+ Path reservation
+ Path routing
Theorem KAOS remote actions are routed on paths with minimal cost(wrt the c-semiring operations)
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.15/15
KAOS Graph semantics: pros & cons
– Many productions (recently reduced :-)
+ Determines the “optimal” path (also KAOS)
+ Path reservation
+ Path routing
Theorem KAOS remote actions are routed on paths with minimal cost(wrt the c-semiring operations)
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.15/15
KAOS Graph semantics: pros & cons
– Many productions (recently reduced :-)
+ Determines the “optimal” path (also KAOS)
+ Path reservation
+ Path routing
Theorem KAOS remote actions are routed on paths with minimal cost(wrt the c-semiring operations)
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.15/15
KAOS Graph semantics: pros & cons
– Many productions (recently reduced :-)
+ Determines the “optimal” path (also KAOS)
+ Path reservation
+ Path routing
Theorem KAOS remote actions are routed on paths with minimal cost(wrt the c-semiring operations)
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.15/15
KAOS Graph semantics: pros & cons
– Many productions (recently reduced :-)
+ Determines the “optimal” path (also KAOS)
+ Path reservation
+ Path routing
Theorem KAOS remote actions are routed on paths with minimal cost(wrt the c-semiring operations)
KAOS: a KLAIM ExtensionforReasoning on Programmable QoS – p.15/15