190 likes | 312 Views
RealECom. Real Time E vent Based Com munication. Team Abhishekh Padmanabhan CIS 798 Final Presentation. Introduction. A Distributed system is one in which the failure of a computer you didn't even know existed can render your own computer unusable . - Leslie Lamport
E N D
RealECom Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation
Introduction A Distributed system is one in which the failure of a computer you didn't even know existed can render your own computer unusable . - Leslie Lamport Problem Statement – “Provide a feature in Distributed System design automation enforcing causality in the primitives executed and simulate real time temporal constraints”
Distributed System (DS) • Consists of several sites interconnected through a reliable communication medium • Environment can interact with the DS at different sites through Service Access Points (SAP) • Interactions correspond to executions of service primitives • Each site identified by a number i and denoted Sitei, correspond a Protocol Entity denoted PEi • Intuitively, PEi denotes the local behavior of DS in Sitei,
Protocol Synthesis • In the user’s viewpoint the DS is a black box which provides a service where only execution of primitives are visible • The aim of the designer is then to derive specifications of the local protocol entities PEi, for i = 1, 2, …, n • How can we derive systematically specifications of the local protocol entities (protocol specifications) which provide a desired service a1 a2 an a1 a2 an PE1 PE2 PEn SERVICE SPECIFICATION Reliable Medium
Behavior of a Distributes System States: Idle Button pushed Brakes Applied Transitions: T1 on push button T2 on actuate Brake Assembly Transitions occur on the execution of a primitives (example push button). Note that these primitives occur at distributed nodes. Idle 1 T1 : push button Button pushed 2 T2: actuate Brake Assembly Brakes Applied 3 Behavior of DS Finite state machine dissected…
1 1 1 2 2 2 3 3 3 Implementation Scope….. Modules to be developed would do the protocol synthesis given system specification. • This would suffice for a non real time systems. • For real time we need to consider the temporal constraints. Reference : “Protocol Synthesis for Real-Time Applications” A. Khoumsi, Gregor v. Bochmann and Rachida Dssouli. Behavior at individual nodes Protocol Synthesis Behavior of DS
Example • Distributed System for emergency braking mechanism in a vehicle • Dashboard with an emergency brake push button which when pushed(T1) communicates to a Braking System which triggers the application of brakes(T2) in the brake assembly of the vehicle and resets the braking system(T3) and sends message to dashboard to reset the dashboard button (T4) 1 T1 2 FSA SS T2 T4 3 T3 4
SS for our Example 1 – Dashboard , 2 – Brake System T1 – [1, A1, 2], T2 – [2, B2, 3], T3 – [3, C2, 4], T4 – [4, D1, 1] In general Tp – [q, Ea, r] reads a transition p from state q to r on execution of entity E at site a A1-push button B2–apply brakes C2–reset brakes D1–reset button 1 T1 2 SS T2 T4 3 T3 4
Non Real-time Synthesis Given SS as the input Derivation Procedure 1 Implement causal ordering of primitives executed at various sites from the point of view of the DS to get the GPS (Global Protocol Specification) 2 From GPS, we compute the Protocol Specification (PS) of each PEi that must be implemented in Sitei by projecting GPS into events occurring in Sitei
GPS for our Example (Step 1) Here Tp represents transaction p and Sij means message sent from site i to j and Rij means message received by i from j 8 R12 T4 1 7 T1 S21 GPS 2 6 S12 T3 3 5 4 T2 R21
GPS to PS (Step 2) Here we derive the Protocol Specification for each individual site which is a FSM with primitives on that site and the nodes now representing the states in DS where the primitives can happen from the point of view of each individual site. for e.g. a(1) b(2) c(3-7) d(8) e(1-3, 7-8) f(4) g(5) h(6) PS 1 PS 2 a e T1 R21 b f S12 T4 T2 S21 c g R12 T3 d h
Real-time Synthesis Notations Timed transition and Timed automaton Let I = [a; b] be an interval, where b > a >= 0 We define a timed transition Tr – [q, E, r; C, v] where • [q, E, r] represents a transition as in the FSA SS • C = (I1, I2 …, Im) m > 0 • v is a variable with value identifying a transition For a timed transition the definition of v necessitates to know the incoming transitions of r and the definition of C necessitates to know the incoming transitions of q
Back to our Example ( with TA) 1 – Dashboard , 2 – Brake System Tr1 – [1, A1, 2; c1, 1], T2 – [2, B2, 3; c2, 1] Tr3 – [3, C2, 4; c3, 1], T4 – [4, D1, 1; c4, 1] A1-push button B2–apply brakes C2–reset brakes D1–reset button Tr4 Tr1 - I1 [0; X] Tr1 Tr2 - I2 [0; 0.25] Tr2 Tr3 - I3 [0; 0.25] Tr3 Tr4 - I4 [0; 0.5] SS described by TA – SST PSi described by TA - PSTi 1 Tr1 2 SST Tr2 Tr4 3 Tr3 4
Real Time Protocol Synthesis Given SST as the input Derivation Procedure 1 Implement causal ordering of primitives executed at various sites from the point of view of the DS to get the GPST (Global Protocol Specification in Real Time) 2 Insert into GPST temporal constraints and message delays to obtain GST 3 Compute the Protocol Specification in Real Time (PST) of each PEi that must be implemented in Sitei by projecting GST into events occurring in Sitei omitting medium delay
Temporal Constraints • From requirements tm ε Ma,b = [µa,b; ρa,b] and tk ε Ik = [γk, δk ] ( k = 1, 2, …, n) we must compute constraints on ts and trk (k = 1, 2, …, n) which ensure that requirements tk ε Ik on the service will be respected. These derived constraints are written in the form ts ε S = [θk;φk], and trk ε Rk = [τk;ωk] for k = 1,2, …, n. This computation must be made for each occurrence of the structure in the GPST. Tr Trk sab rba tk ts tm trk
Current System… A component assembly framework supporting a variety of visualization and programming tools for developing component connections.
Feature Addition… • Apply causality constraints to the primitives being executed. • Check for temporal constraints required for real time event based communication. • Simulate temporal constraints exhibited by the communication medium.
System OverviewThere are two ways of constructing a software design; one way is to make it so simple that there are obviously no deficiencies, and the other way is to make it so complicated that there are no obvious deficiencies. The first method is far more difficult. C. A. R. Hoare SS XML parser Protocol Synthesis SS in XML Application Specific Model Checking for Timing Constraints XML Dump Code generation Hard wired Code Generation Event Service Based Impl
Tools and Technologies… • XML for input and output specification of the system. • Java to develop modules for protocol synthesis. XML is being used at various levels to provide flexibility in the system and to make the module easily pluggable in any environment.