Service-Orientation as a Paradigm of...
Transcript of Service-Orientation as a Paradigm of...
Theory of Programming
Prof. Dr. W. Reisig
Service-Orientation as a Paradigm of Computing
Wolfgang ReisigHumboldt-Universität zu Berlin
ICTERIKiev, June 24, 2016
2
2012celebrated as the greatest computer scientist of the 20th century.
Basics of theoretical informatics:Turing Machines (1936)
What is the Basic Paradigmof Informatics ?
alphabet Σ; finitely many symbols a, b, c, … ,zwords Σ*; countably many ab, ca, aca, …functions f: Σ* Σ*; uncountably many
Some of those functions are “computable” (countably many).
Each computable function can effectively be computed • by a computer (with unbounded store)• by an amazingly simple kind of machine, a Turing machine.
Yet, no computer can compute more functions.
3
Theoretical Informatics in a nutshell
→---
useful, undisputed:
equivalence, abstraction/refinementcompositioncomplexitylogical characterizations
The computable functions pinpoint deep theoretical results and famous open problems.
So, the theory of computable functionsis frequently considered THE theory of informatics.
4
… lots of concepts
This talk:
1. Aspects that exceed classical Theoretical Informatics2. A conceptual view on SOC3. Towards a Theory of Services4. Important aspect: Associative Composition
5
This talk:
1. Aspects that exceed classical Theoretical Informatics2. A conceptual view on SOC3. Towards a Theory of Services4. Important aspect: Associative Composition
6
How establish reliable communication?By sending acknowledgements, copies, etc. ,i.e. by means of distributed algorithms (“protocols”).
Informatics comprises communication
Complexity is not in computation but in communication.
7
Informatics comprisesnon-ending behavior
SOC “always on”
cloud
elevator control
business informatics “24/7”
classical view: terminating behavior is intended, infinite behavior is mistaken.
new view: infinite behavior is intended.terminating behavior is mistaken.
8
c
a b
c
a b
c
a b
Informatics comprisescausal independence
a b a b a ac c cb …
d e d e d df f fe …
c
a b
9
f
ed
e
d
f e
d
f e
d
f
e
a
ab
c
b
Informatics comprisescausal independence
de
d
a
d
f
cbe
……
……
……
…
+ fairness assumption
b…
motivated by “observation”
10
c
a b
c
a b
c
a b
e
d
f e
d
f e
d
fc
a b
f
ed
11
Distributed Systems and Distributed Runs
a b a b a ac c cb …
d e d e d df f fe …
c
a b
f
ed
a b a b a ac c cb …
d e d e d df f fe …
12
a variant: i-th b before i-th f
Avoid a naïve notion of “time”and of “observation”.
Causality structures the world
a deterministic systemno alternativesone behavior (run, execution)
c
a b
f
ed
This talk:
1. Aspects that exceed classical Theoretical Informatics2. A conceptual view on SOC3. Towards a Theory of Services4. Important aspect: Associative Composition
13
14
Paradigms of programming:1. Conventional (procedural) programs
follows the IPO model: input-process-output theoretical foundation/ expressive power: the computable functions
2. Object orientationattributes and methodstheoretical foundation: abstract data types / algebraic specifications / signatures and structures (as for 1st order logic)
3. Service orientationself contained components (reactive systems)loosely coupledtheoretical foundation: missing
… intuitively …
imperative programing
Object Orientation
15
Service Oriented Computing
… intuitively …
16
The Cloud
… intuitively …
17
18
What is a Service?
… an algorithmic component, frequently software.
a person’s role:• booking a journey, • buying a ticket, • withdrawing cash
from an ATM.
software to • book a journey, • sell a ticket, • offer cash at
an ATM.
a technical system:• elevator • self driving vehicle• mobile phone
an organization, providing • insurance• medical surgery
19
Services interact loosely coupled.In general: message passing; not handshaking.Interacting services (instantiations) jointly pursue a goal.They reach their goal
Services interact goal oriented
A frequent goal of composed services:to reach a final state together.
Often: Two services play the role of a provider and a requester, together with a broker.
, or miss it.
20
InstantiationsA service may spawn many instantiations.Input as last timedoes NOT yield output as last time
Two instantiations may• temporally overlap, • interact,• behave differently. • Different instantiation may
start in different states.
21
A formal foundation is a base to ...• describe semantics of implementations
• characterize expressivity of formalisms
• relate representations (equivalence, simulation)
• clarify the elementary notions of the area
• derive properties from structural and behavioral descriptions
• teach the area systematically
22
Structure of textbooks on SOAFirst part:in plain English:“… SOA is an implementation independent concept …”,using many notions, poorly related.
Second part:examples of implementations,confusing conceptual aspects and language dependent aspects
Missing bridge:implementation independent models.
This talk:
1. Aspects that exceed classical Theoretical Informatics2. A conceptual view on SOC3. Towards a Theory of Services4. Important aspect: Associative Composition
23
24
Semantics of Services We should do it in analogy to programming languages:
The semantics of a service is a mathematical object!
True, this is presently not the case.
BUT WE SHOULD spend effort into this!
towards a generic modeling language
aim of ageneric Mod. language
expressive power (L)
all modeling languages Lfor services
aim of, e.g.BPMN:
expressive power (L)
all modeling languages Lfor services
25
26
... a transition system with channelsfor asynchronous communicationwith its environment.
Semantics of S:During a computation, each channel funnels a stream of data.
technically:a relation on – infinite – streams
S
a
b
c
Models of services
27
Requirements:
The – elementary – notion of composition of services is a (simple!) mathematical (or logical!) operation.
For services S and T,the composition S ⊕ Tis a service again.
Frequently, S ⊕ T does not interact any more.
ticketing =def
sell_ticket ⊕ buy_ticket
Interaction is represented as composition
How to compose services?
28
Composition S ⊕ T has pending channels.… is a service again.
Tb
e
dS ⊕ T
S
a
b
c
Requirements at composed services
29
S and T communicate boundedlyS and T communicate responsively
With target states:S ⊕ T weakly terminates S ⊕ T is deadlock freeS ⊕ T is lifelock free
… as CTL* formulas:S ⊕ T AG n-boundedS ⊕ T AGEF responsive
S ⊕ T AGEF terminalS ⊕ T AG (terminal target)S ⊕ T AGEF target
Tb
e
dS ⊕ T
S
a
b
c
Together, services may accomplish a requirement, ρ.
For a requirement ρ …
30
S and T communicate boundedlyS and T communicate responsively
With target states:S ⊕ T weakly terminates S ⊕ T is deadlock freeS ⊕ T is lifelock free
Def.: Let ρ be a requirement on services.
(i) S and T are ρ -partnersiff S ⊕ T ρ
(ii) S is substitutable by Tiff for all U,S ⊕ U ρ implies T ⊕ U ρ
(iii) U is a ρ -adapter for S and Tiff S ⊕ U ⊕ T ρ
Tb
e
dS ⊕ T
S
a
b
c
31
properties of services Quests at the partners of a service, S ,w.r.t a requirement ρ :
Does S have ρ -partners at all ? Is T a ρ -partner of S ?How construct a canonical ρ -partner of S ?How characterize all ρ -partners of S ?
ControllabilityComposability“most liberal”
Operating Guideline
32
Given:• a set S of services,• a composition operator ⊕ : S × S S,• a set Q of requirements ρ1, ... , ρn ⊆ S.This yields the algebraic structure
(S; ⊕ , Q ).
For S, T ∈ S, ρ∈Q,T is a ρ - partner of S,iff S ⊕ T ρ.
Let semρ(S) =def the set of all ρ - partners of S.
The algebraic structure of servicesthe “classical” requirement
ρ : weak termination
derived notions(w.r.t some ρ ):
S may be substituted by S‘ : semρ(S) ⊆ semρ(S‘ )
S and T are equivalent: semρ(S) = semρ(T)
U adapts S and T: S ⊕ U ⊕ T ρ
S ⊕ T ∈ ρρ ( S ⊕ T )
This talk:
1. Aspects that exceed classical Theoretical Informatics2. A conceptual view on SOC3. Towards a Theory of Services4. Important aspect: Associative Composition
33
Composing many services
34
Tb
e
dS ⊕ T
S
a
b
c
e.g. a supply chain
a simple idea
35
(S ⊕ T)
S
a
b
c
Tb
e
d
b
e
f
⊕ U
Ub
e
d
b
e
f
a simple idea
36
S
a
b
c
Tb
e
d
b
e
f
Ub
e
d
b
e
f
associativity: inevitable for composition!… and universally feasible:Identify two sets of channels: left port, right port.
S ⊕ (T ⊕ U)
Tb
e
d
b
e
f
leftport
rightport
(S ⊕ T) ⊕ U =
Example: vending machinedad pays, mom selects,
tea!
juice!
momdad
coin coin
tea!
juice!
beverage
vend. mach
37
coin
tea!
juice!
beverage
beverage
kid
tea!
juice!
momdad
coin
Example: vending machinedad pays, mom selects, kid drinks.
vend. mach
38
juice!
tea!
mom
coin
juice!
tea!
beverage
dad
coin
kid
A variant of the vending machinedad pays, mom selects, kid drinks.
beverage
vend. mach
39
N2requester
R1
exclusive requester
N1provider
40
N2requester
R1
exclusive requester
N1provider
41
N2requester
R1
sharing requester
N1provider
42
N2requester
R1
sharing requester
N1provider
43
N2‘ requester
N2requester
second sharing requester
N1provider
44
N2‘ requester
N2requester
second sharing requester
N1provider
45
N2‘ requester
N2requester
third sharing requesterN2‘‘
requester
skip the primes:N1 N2 N2 N2N1
provider
46
generic sharing requesters
P provider
Qrequester
D
D
D
D
M
Qrequester
Qrequester
P Q Q
P Q Q Q
P Q
genericreques-ter Q : Q
requester
D
M
RL
47
prefer this variant?
P provider
Qrequester
D
D
D
D
M
Qrequester
Qrequester
P Q Q Q
P Q
A
A
A
A
A
A
48
P Q Q
genericrequester Q : Q
requester
D
M
RL
prefer this variant?
P provider
Qrequester
D
D
D
D
M
Qrequester
Qrequester
P Q Q
P Q Q Q
P Q
A
49
A
genericrequester Q : Q
requester
D
M
RL just make
a member of L
21
Cyclic composition: The philosophers
A
32 B 43 C 54 D 15 E
This is A B C D EThe problem: How glue ?Construct the closure (A B C D E)c
50
2 32 B 43 C 54 D 15 E1
Cyclic composition: The philosophers
A
This is A B C D EThe problem: How glue ?Construct the closure (A B C D E)c
51
... with a generic philosopher
rl p
algebraic form: (p p p p p)c
52
rp rp rp rp
53
Given:• a set S of services,• a composition operator ⊕ : S × S S,• a set Q of requirements ρ1, ... , ρn ⊆ S.This yields the algebraic structure
(S; ⊕ , Q , ).
For S, T ∈ S, ρ∈QT is a ρ - partner of S,iff S ⊕ T ρ.
Let semρ(S) =def the set of all ρ - partners of S.
The algebraic structure of services
c
The algebraic structure of clouds
54
Theory of Programming
Prof. Dr. W. Reisig
Service Orientation as a paradigm of computing
Wolfgang ReisigHumboldt-Universität zu Berlin
ICTERIKiev, June 24, 2016