450 likes | 550 Views
SEFM 2005, Koblenz, Germany, 6-9 September 2005. SHReQ: Coordinating Application Level QoS. Authors: Dan Hirsch & Emilio Tuosto Dipartimento di Informatica Università di Pisa. Speaker: Ivan Lanese Dipartimento di Informatica Università di Pisa. Roadmap. Motivations
E N D
SEFM 2005, Koblenz, Germany, 6-9 September 2005 SHReQ: Coordinating Application Level QoS Authors: Dan Hirsch & Emilio Tuosto Dipartimento di Informatica Università di Pisa Speaker: Ivan Lanese Dipartimento di Informatica Università di Pisa
Roadmap • Motivations • Background: c-semiring • Background: SHR • SHReQ • An application • Final remarks SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Roadmap • Motivations • Background: c-semiring • Background: SHR • SHReQ • An application • Final remarks SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Global computing • Programming global systemsis hard because: • absence of centralised control • client-server not enough: P2P • different administrative domains (security) • interoperability • different platforms, devices (e.g. PDAs, laptops, mobile phones...) • mobility • network awareness • applications are location dependent • different locations have different features SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Service oriented computing (SOC) • Applications are made by gluing services • interconnected • but independent (local choices, independently built) • Interactions governed by programmable coordination policies • Services are searched and bound ... offline • can search/bind be dynamic and at run-time? • Search and bind depend on application level QoS • not low-level performance (e.g., throughput, response time) • but application-related • price of services • payment mode • data available in a given format SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Our approach • SOC modelling is not just normal programming + primitives for mobility or synchronization • Lifting QoS issues to application level • proof techniques and tools are also needed • First steps extending Klaim [see biblio] • We present SHReQ, an (hyper)graph model which exploits c-semiring for • expressing application level QoS • coordinating activities by synchronisation on c-semiring values SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Roadmap • Motivations • Background: c-semiring • Background: SHR • SHReQ • An application • Final remarks SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Constraint semirings • C-semirings for abstracting application level QoS • <A ,+ , ⋆, 0, 1> where • A is a set (containing 0 and 1), • +, ⋆ : A × A A SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Constraint semirings • Implicit partial order: a ≤ b a + b = b “b is better than a” SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Example: priority semiring • P = <N, max, min, 0, ∞> • N is the set of natural numbers with infinity • ≤ is the standard order on N SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Example: broadcast semiring • B = <AA{1, 0,}, +, ⋆, 0, 1> • A is a set of actions • A = {a | a A} are the coactions • a⋆b obeys the axioms for 0 and 1 and • a⋆a = a • a⋆a = a • a⋆b = otherwise • a + b obeys the axioms for 0 and 1 and • a + a = a • a + b = otherwise SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Other semirings • <{true,false}, or, and,false,true> (boolean): Availability • <Real+, min, +, +, 0> (optimization): Price, propagation delay • <Real+, max,min, 0, +> (max/min): Bandwidth • <[0, 1], max, * , 0, 1> (probabilistic): Performance and rates • <2N, , , , N> with N set (set-based): Capabilities and access rights SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
A key property • Cartesian product of c-semirings is a c-semiring • Allows to use multiple QoS dimensions at the same time SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Roadmap • Motivations • Background: c-semiring • Background: SHR • SHReQ • An application • Final remarks SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
The hypergraph model • We aim at modeling new non-functional computational phenomena • The metaphor is: • “Global computers as hypergraphs” • “Global computing as SHR” • Components are represented by (hyper)edges • Systems are bunches of edges connected through common nodes • some nodes are declared as local • Computing means to synchronously rewrite edges according to a synchronisation policy SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
The SHR approach • Productions to describe the behaviour of single edges • local effects • edges rewritten into generic graphs • constraints on surrounding nodes • Global constraint-solving algorithm to derive transitions • to select which productions can be applied • allows to define complex transformations • Finally transitions are applied SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
L R H 3 3 4 4 2 2 1 1 Edge Replacement Systems • A production describes how the edge L is transformed into the graph R SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
L R H 3 3 4 4 2 2 1 1 1 1 2 2 3 3 R’ L’ Edge Replacement Systems • A production describes how the edge L is transformed into the graph R Many productions can be applied concurrently SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Adding synchronization • We associate actions to nodes attached to the rewritten edges • Actions performed on the same node are composed according to a synchronization algebra • A transition is allowed iff the synchronization constraints expressed by actions are satisfied (i.e., composition is defined) • Many synchronization models are possible (point-to-point, broadcast, …) SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Adding mobility • We use synchronization algebras with mobility [see biblio] • Each action is equipped with a tuple of node references • During synchronization we • compute a fusion among nodes • merging corresponding nodes from synchronized actions • mobility in the Fusion Calculus style • apply the fusion to the graph and to the references of the resulting action SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Roadmap • Motivations • Background: c-semiring • Background: SHR • SHReQ • An application • Final remarks SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
From SHR to SHReQ • Graphs have weights associated to nodes • values of the semiring • Productions have an applicability condition • the minimum (w.r.t. ≤) value of resources required on each node • Actions are values of the semiring • ⋆is action composition SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
L R R Sample production a<z> x x z y y:v 1 Rewritten edge Final graph SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Sample production a<z> x x z L R R y y:v 1 Action Action sending node Applicability condition SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
SHReQ synchronization • Semiring set has the following structure Sync NoSync 1 0 Fin Completed synchronizations Synchronization errors SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Quasiproductions • Obtained from productions by renaming nodes from the LHS • If nodes are merged, + is used to compute the resulting applicability condition SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Synchronizing rules • We select a quasiproduction matching each edge • same label and attachment nodes • we check that the applicability condition is satisfied • We compute the product of the actions performed on each node • we check that it is not in NoSync • On local nodes • we check that the resulting action is in Fin • We compute the substitution on nodes • we check that no old nodes are merged SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
The result • Each edge is replaced by the RHS of the corresponding quasiproduction • The new values on nodes are • the result of the synchronization for old nodes • 1 for new nodes • We apply the induced substitution • since no old nodes are merged, values from old nodes can be used • We hide nodes if the environment is not aware of them • not free before and not extruded • as names in -calculus SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
There is some math behind • Graphs as terms in an algebra • Productions and transitions as labelled rules • Inference rules to derive transitions from productions Math considered harmful SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Roadmap • Motivations • Background: c-semiring • Background: SHR • SHReQ • An application • Final remarks SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
TRMCS case study • We apply SHReQ to Teleservice and Remote Medical Care System (TRMCS) • studied by Parco Scientifico e Tecnologico d’Abruzzo and University of L’Aquila • Hierarchical system with a server S, routers R connected to S and users U connected to routers • Functionalities • users send requests for assistance (remote or ambulance) to routers • routers forward alarms to server • server provides the required assistance • Aimed at showing the rewriting mechanism • for the use of c-semirings for multidimensional QoS see the bibliography SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
S R1 R2 U1 U3 U2 Modelling the system • The cartesian product of priority and broadcast is used • All nodes are local (result must be a coaction) SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
(amb,n)<z> x x 1 x x:(amb,n) waUn waUn uaUn Un z User productions (amb,n) x x Un waUn SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
(amb,∞)<z> x x raR R y y:(amb,0) (amb,∞)<z> Router productions (amb,∞)<z> x x R raR y y (amb,∞) SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
(amb,∞) (rem,∞) S S Server production x y x y (amb,∞)<x> w w SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
S R1 R2 U1 U3 U2 Sample computation (amb,∞) (rem,∞) x y (amb,∞)<x> (amb,∞)<z> w (amb,∞) s r (amb,1) (amb,3) SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
S R1 R2 waU1 waU3 U2 Sample computation (amb,∞) (rem,∞) x y (amb,∞) w s r (amb,1) 1 SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
S R1 R2 (amb,1)<z> waU1 waU3 U2 Sample computation (amb,∞) (rem,∞) x y (amb,∞)<x> (amb,∞)<z> w (amb,∞)<z> s r SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Sample computation S x y w R1 R2 s r uaU1 U3 U2 SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Roadmap • Motivations • Background: c-semiring • Background: SHR • SHReQ • An application • Final remarks SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Final remarks • We have presented the idea and an application of SHReQ • The main features are • general multiparty synchronisations based on c-semirings • support for application level QoS • Surprisingly, SHReQ fits the design principles for a good calculus from Milner [see biblio] SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Future work • We plan to develop formal methods based on SHReQ • for specifying distributed applications • and their non-functional requirements • Hopefully, develop verification techniques (e.g., model checking) on SHReQ • logic for SHReQ already exists [see biblio] SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Bibliography • On extending KLAIM with QoS: • “A formal basis for reasoning on programmable QoS”, De Nicola et al., International Symposium on Verification, LNCS 2772 • “A basic calculus for modelling service level agreements”, De Nicola et al., Coordination 2005, LNCS 3454 • On c-semiring: • “Semiring-based constraint satisfaction and optimization”, Bistarelli, Montanari, Rossi, JACM 44(2) • On SHR: • “A model of distributed systems based on graph rewriting”, Degano, Montanari, JACM 34 • “Reconfiguration of software architecture styles with name mobility”, Hirsch, Inverardi, Montanari, Coordination 2000, LNCS 1906 • Ph.D. thesis of Dan Hirsch and Emilio Tuosto SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Bibliography • On synchronization algebras with mobility: • “Synchronization algebras with mobility for graph transformations”, Lanese, Montanari, FGUC 2004, ENTCS, to appear • On verification techniques for QoS: • “A logic for graphs with QoS”, Ferrari, Lluch-Lafuente, VODCA 2004, ENTCS, to appear • On a logic for SHReQ: • “A logic for application level QoS”, Hirsch, Lluch-Lafuente, Tuosto, submitted to QAPL 2005 • On design principles for calculi: • “Process constructors and interpretations”, Milner, Information Processing, Elsevier SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)
Thanks! Questions? I will try to answer SEFM 2005, 5-9 September, Koblenz, Germany Hirsch, Tuosto (presented by Lanese)