dynamically evolving klaim nets lorenzo bettini [email protected] joint work with michele loreti,...
Post on 18-Dec-2015
223 views
TRANSCRIPT
![Page 1: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/1.jpg)
Dynamically EvolvingKlaim Nets
Lorenzo [email protected]
Joint work with
Michele Loreti, Rosario Pugliese
Dipartimento di Sistemi ed Informatica, Firenze
http://music.dsi.unifi.it
![Page 2: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/2.jpg)
Dynamic Infrastructure It evolves over time:
New nodes can get connected Existing nodes can disconnect
Connections and disconnections can be temporary and unexpected
A connection can be established on the fly with wireless devices
Ad-hoc paths to services can be establish to enable communication among components
![Page 3: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/3.jpg)
Dynamic Infrastructure The assumption that the underlying
network is always available may be too strong;
Permanent connection may not always be available;
The knowledge of the address of a remote host may be not sufficient to communicate with it;
Necessity of making Node Connectivity explicit in the language.
![Page 4: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/4.jpg)
Communication Layer in Klaim is based on nodes’ location
knowledge, is influenced by:
Allocation environments; Tuple and Process distribution.
![Page 5: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/5.jpg)
Connections and Disconnections
TS TSs1 s2
Two nodes are disconnected if one doesn’t know the locality of the other
![Page 6: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/6.jpg)
Connections and Disconnections
TS TSs1 s2
s2
There is a (re)connection when one gets to know
about the other
![Page 7: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/7.jpg)
Connections and Disconnections
TS TSs1 s2
Two nodes will be disconnected again when that knowledge is lost
s2
![Page 8: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/8.jpg)
Node “Mobility”
TS TSs1 s2
TS
s3
s3s3
Node mobility corresponds to mobility of (knowledge of) links
If a process, that knows a node,
moves, then the known
node moves too.
s3
![Page 9: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/9.jpg)
Clusters & SuperProcesses A Cluster is a collection of nodes There can be multiple clusters Two nodes can interact with each
other only if they stay in the same cluster
SuperProcesses are processes that: Can create new Clusters; Can add or remove their node to Clusters; Cannot move
![Page 10: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/10.jpg)
New Actions Create a new cluster: newc(w) Add a node to a cluster: add(c) Remove a node from a cluster: rm(c)
Not indexed with a locality They act on the node they are
executed on.
![Page 11: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/11.jpg)
sc2
s s
Example
c1newc(w)
add(c2)
rm(c1)
![Page 12: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/12.jpg)
SyntaxN ::= s :: P c :: {s} N | N
P ::= nil out(et) act.P P | P act.P + act.P X A<…>
SP ::= P sact.SP SP | SP
act ::= out(t)@l in(t)@l read(t)@l eval(P)@l newloc(SP,u)
sact ::= add(c) rm(c) newc(w)
![Page 13: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/13.jpg)
Connection Modes Tethered mode Disconnected mode Untethered mode
![Page 14: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/14.jpg)
Tethered mode WAN connectivity is available Information can be accessed from
any point at any time
Idealized situation that takes place only for a limitedcomputers in a network.
![Page 15: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/15.jpg)
Disconnected mode WAN connectivity is available Users can work offline When online a user works like in
Tethered Mode When a user goes online reconciliation
and/or notification can be needed.
Typical for a user that does not own a network access.The user works in isolation and, at some time, connectsto Internet (e.g. via a modem).
![Page 16: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/16.jpg)
Untethered mode WAN connectivity is unavailable Local-area connectivity may still be
available Communication:
is enabled by wireless devices is limited to those devices that are in a
communication range
Usual form for a mobile user, that from time to time entersdifferent areas where connectivity is constrained (e.g. byfirewalls).
![Page 17: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/17.jpg)
Tethered mode All nodes are in the same cluster
and there are no SuperProcesses.
![Page 18: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/18.jpg)
Disconnected mode All nodes are in the same cluster Occasionally some node can be
removed and added
![Page 19: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/19.jpg)
Untethered mode Multiple clusters are available Nodes can change cluster
![Page 20: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/20.jpg)
Scenarios Location dependent connection Ad-hoc networking Disconnection
![Page 21: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/21.jpg)
Location-dependent Connection A mechanical engineer visits a
plant in the Third World WAN connectivity is not available There is a single wireless access
point When connected engineer can
access plant’s resources (data and applications)
![Page 22: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/22.jpg)
Location-dependent Connection
0101
Plant-access point
0101
add(cap
) Private area
cap
rm(cap)
cp
![Page 23: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/23.jpg)
Ad hoc networking A team of experts meet in a site
where a new plant must be established
Experts can interact locally by using an ad hoc network, sharing data and resources
Occasionally connection to the headquarters might be needed to check additional information
![Page 24: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/24.jpg)
Local area
Ad hoc networking
Head
qu
arte
rs H
ead
qu
art
ers
Local area
![Page 25: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/25.jpg)
Disconnection A software engineer works in isolation At a given point she dials up and gets
reconnected to a virtual community server She downloads work updates She asks for help and goes offline
Later she reconnects to the virtual community: She contacts one of the connected experts She establishes a synchronous communication After acquiring enough information she logs off
Finally, when she ends her work, she logs on and uploads the artifacts
![Page 26: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/26.jpg)
Disconnection
s2
0100
s2
c
add(c)rm(c)
add(c)rm(c)
add(c)
![Page 27: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/27.jpg)
Remarks Proposed extensions can be
“expressed” in standard Klaim; Klaim’s Logical framework can be
automatically applied to extended Klaim;
Klaim’s Types for Access Control can be easily extended too.
Proposed extensions can be “expressed” in standard Klaim;
Klaim’s Logical framework can be automatically applied to extended Klaim;
Klaim’s Types for Access Control can be easily extended too.
![Page 28: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/28.jpg)
Comparison with Ambients Clusters do not move Can intersect Represent a communication
ability, not necessarily an environment
Still locality-aware More similar to channels
![Page 29: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/29.jpg)
Translation in standard Klaim A cluster c becomes a node sc
If s belongs to c then tuple (s) is in the TS of sc and (cluster, sc) in the TS of s
newc becomes newloc add(c) becomesout(self)@sc.out(cluster, sc)@self
rm(c) becomesin(self)@sc.in(cluster, sc)@self
![Page 30: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/30.jpg)
Translation in standard Klaim Communication and migration
operations are translated into sequences of operations that first test for the presence of a cluster and then perform the operation
A counter should be used in order to exhaustively examine all the clusters to which a node belongs
![Page 31: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/31.jpg)
Extending the implementation
![Page 32: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/32.jpg)
Connecting to a Klava Nethostnet.dsi.unifi.it
$> java client2 hostnet.dsi.unifi.it 9999Connecting to hostnet.dsi.unifi.it:9999 ...Login as client2 ...Login successful!
$> java Klava.NetStarting Net on port 9999
150.217.14.14
![Page 33: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/33.jpg)
Communication in Klava
Net
s1 s2
![Page 34: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/34.jpg)
Extending the implementation
s1
s2
Net Net
s1 s2
![Page 35: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/35.jpg)
Extending the implementation
s1
s2c1
c2
s3
c1
s1 s2
c2
s3
![Page 36: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/36.jpg)
Future work Extend the implementation Apply the extensions to our
existing frameworks Merge with Structured Nets
![Page 37: Dynamically Evolving Klaim Nets Lorenzo Bettini bettini@dsi.unifi.it Joint work with Michele Loreti, Rosario Pugliese Dipartimento di Sistemi ed Informatica,](https://reader036.vdocuments.mx/reader036/viewer/2022062421/56649d225503460f949f89c5/html5/thumbnails/37.jpg)
Structured Nets Ordering relation on nodes (<): is-
parent-of Routing function (): the nodes
that have to be crossed to reach a site
System operations (sys(t)): to access and modify the structure of the net