community on the move coordination in distributed and mobile systems josé luiz fiadeiro joint work...

Post on 30-Mar-2015

216 Views

Category:

Documents

2 Downloads

Preview:

Click to see full reader

TRANSCRIPT

CommUnity on the Move Coordination in Distributed and Mobile

Systems

José Luiz Fiadeiro

joint work with Antónia LopesUniversity of Lisbon

Architectures for Mobility

University of Munich

University of Pisa

University of Florence

University of Lisbon

ISTI-CNR

ATX Software SA

IST-2001-32747Architectures for Mobility

Jan 02 – Apr 05

        

Motivation

Mobility A new factor of complexity in the development of software systems

Software ArchitecturesHave contributed to the taming of the complexity of developing software systems by separating Coordination from Computation and promoting Connectors as first-class citizens.

Motivation

Architecture-based approaches

A Y Y AB

B

C

Computation

Coordination

A

Y

X

Compositionality wrt refinement

Y’

Y’

⊆ B’

B’

XC

C

wrt evolution

Architectural Descriptions in

Example. A simple sender-receiver system

bsender Sync breceiver

design bsender is out ob:bitprv w:array(N,bit), k:nat, rd:booldo neww:k=Nw:array(N,bit)k:=0[] newb:rdk<Nrd:=trueob:=word[k] k:=k+1[] send:rdrd:=false

ob

sendnewbneww

design breceiver is in ib:bitout w:array(N,bit), k:natprv recw:array(N,bit), rd:booldo rec:k<Nrecw[k]: ib k:=k+1rd:=false[] savew:rdk=Nrd:=truew:=recw[] neww:rdk=Nrd:=falsek:=0

ib

recsavewneww

Categorical semantics in

Example. A simple sender-receiver system

design sync is in i:bitdo ac:trueskip

breceiverbsender

cable

ob•isend•ac

cable

i•ibac•rec

Diagram in a category of designs

Semantics givenby the colimit

Colimit semantics

design sync-send-rec is out b:bit, wr:array(N,bit), kr:natprv rdr,rds: bool, recwr, ws:array(N,bit), ks:nat

do sendrec:rdskr<N rds:=false wordr[kr]: b kr:=kr+1rdr:=false

[] savew:rdrkr=Nrdr:=truewr:=word[] rneww:rdrkr=Nrdr:=falsekr:=0

[] sneww:ks=Nws:array(N,bit)ks:=0[] newb:rdsks<Nrds:=trueb:=ws[ks] ks:=ks+1

Key ideas for Mobility

New forms of coordination that have emerged in mobile computing sa transient interaction and remote evaluation can be modelled through connectors

Distribution can be separated from Coordination and Computation

Distribution connectors can be offered as architectural primitives

Location-aware architectural models can be developed incrementally through the refinement of higher-level descriptions that abstract from mobility

Motivation

Architecture-based approaches

A Y

XC

C

Y AB

B

C

Computation

Coordination

A

Y

X

Distribution

G

F

F

G

F

Architectural Approach to Mobility

: Goal

Making designs location-aware

Designs are defined in terms of extended signatures

—channels and action names

—location variables (input, output) typed over Loc with a distinguished

and located actions

x@l

Position where the value is available

Position where code is executed

enabling condition

state changes

g@l : G(g) R(g)

g@{l1,l2,...}

On the move…

Making designs location-aware

Example. A mobile bit receiver that once a word defining a location is received, moves to that location

design mobreceiver is outloc l in ib:bitout w@l:array(N,bit), k@l:natprv recw@l:array(N,bit), rd@l:booldo rec@l:k<Nrecw[k]: ib k:=k+1rd:=false[] savew@l:rdk=Nrd:=truew:=recw[] neww@l:rdk=Nrd:=falsek:=0l:=if(loc?(w),loc(w),l)

Making designs location-aware

Example. A fixed sender i.e. placed at a fixed position

design mobsender is outloc l out ob@l:bitprv w@l:array(N,bit), k@l:nat, rd@l:booldo neww@l:k=Nw:array(N,bit)k:=0[] newb@l:rdk<Nrd:=trueob:=w[k] k:=k+1[] send@l:rdrd:=true

Making architectures location-aware

Example. A location-aware version of the sender-receiver system with the previous mobile receiver and a fixed sender

mobreceivermobsender

cable cable

ob•isend•ac

i•ibac•rec

Categorical Diagram

design sync is in i:bitdo ac:trueskip

Making architectures location-aware

design mobsys is outloc ls, lr out b@ls:bit, wr@lr:array(N,bit), kr@lr:natprv rdr@lr,rds@ls: bool, recwr@lr, ws@ls:array(N,bit), ks@ls:nat

do sendrec@ls:rdsrds:=false @lr:kr<Nwordr[kr]: b kr:=kr+1rdr:=false

[] savew@lr:rdrkr=Nrdr:=truewr:=word[] rneww@lr:rdrkr=Nrdr:=falsekr:=0lr:=if(loc?(wr),loc(wr),lr)

[] sneww@ls:ks=Nws:array(N,bit)ks:=0[] newb@ls:rdsks<Nrds:=trueb:=ws[ks] ks:=ks+1

CommUnity with Distribution: The Space of Mobility

Explicit representation, but we do not assume any specific notion:

— Location variables have sort Loc, a special data type

— The space is constituted by the set of possible values of Loc

Mobility is associated to the movement of channels and actions (unit of mobility)

CommUnity with Distribution: Semantics

The semantics of CommUnity designs is defined in terms of

An algebra U for the data types

An infinite sequence of pairs of binary relations over ULoc  

(bti,reachi)iN

—n bt m : n and m are positions “in touch” with each other

—n reach m : position n is reachable from m

Coordination among components takes place only when they are in touch with each other

Movement of a component to a new position is possible only when this position is reachable from the current one

addition of mobility aspects…

Superposition of distribution/mobility concerns is intrusive

Distribution and mobility aspects of the system are not explicitely represented in the architecture; they cannot be refined or evolved independently of the architectural elements

mobsender Sync mobreceiver

Making designs location-aware

design mobsender is outloc l out ob@l:bitprv w@l:array(N,bit), k@l:nat, rd@l:booldo neww@l:k=Nw:array(N,bit)k:=0[] newb@l:rdk<Nrd:=trueob:=w[k] k:=k+1[] send@l:rdrd:=true

design bsender is out ob:bitprv w:array(N,bit), k:nat, rd:booldo neww:k=Nw:array(N,bit)k:=0[] newb:rdk<Nrd:=trueob:=word[k] k:=k+1[] send:rdrd:=false

design fixed is outloc l

cable2

Making designs location-aware

design mobreceiver is outloc l in ib:bitout w@l:array(N,bit), k@l:natprv recw@l:array(N,bit), rd@l:booldo rec@l:k<Nrecw[k]: ib k:=k+1rd:=false[] savew@l:rdk=Nrd:=truew:=recw[] neww@l:rdk=Nrd:=falsek:=0l:=if(loc?(w),loc(w),l)

design breceiver is in ib:bitout w:array(N,bit), k:natprv recw:array(N,bit), rd:booldo rec:k<Nrecw[k]: ib k:=k+1rd:=false[] savew:rdk=Nrd:=truew:=recw[] neww:rdk=Nrd:=falsek:=0

design move_to is outloc lin w:array(bit,N)do move@l: l:=if(loc?(w),loc(w),l)

cable3

move•neww l•lw•w

Externalisation of distribution

breceiverbsender

cable cable

ob•isend•ac

i•ibitac•rec

design sync is in i:bitdo ac:trueskip

cable2

design fixed is outloc l

l•l

cable3

move•neww l•lw•w

design move_to is outloc lin w:array(bit,N)do move@l: l:=if(loc?(w),loc(w),l)

Conclusions

Architecture-based approaches

A Y

XC

C

Y AB

B

C

Computation

Coordination

A

Y

X

Compositionality wrt refinement wrt evolution

Distribution

G

F

F

G

F

Architectural Approach to Mobility

Conclusions

Furthermore, our approach

- supports an incremental development (associativity) of location-aware architectural models ; this makes it easier to cope with the increase of complexity and promotes reuse

- there are principled-ways of making models location-aware; in this process designers can be assisted through libraries with location and distribution connectors modelling standard solutions

Other Work within

Making primitives for mobility available in the UML

Operational semantics in KLAIM

Reconfiguration with Hypergraph Rewriting

Refinement in Tyle Logic

Model-checking

        

www.fiadeiro.org/jose/CommUnity

top related