19
Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

Embed Size (px)

Citation preview

Page 1: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

Real Time Event Based Communication

TeamAbhishekh PadmanabhanCIS 798 Final Presentation

Page 2: 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 LamportProblem Statement –“Provide a feature in Distributed System design automation enforcing causality in the primitives executed and simulate real time temporal constraints”

Page 3: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

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,

Page 4: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

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 PE i, for i = 1, 2, …, n

• How can we derive systematically specifications of the local protocol entities (protocol specifications) which provide a desired service

SERVICE

SPECIFICATION

PE1 PE2 PEn

Reliable Medium

a1 a2 an a1 a2 an

Page 5: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

Finite state machine dissected…Behavior of a Distributes System

States:

1. Idle

2. Button pushed

3. Brakes Applied

Transitions:

1. T1 on push button

2. T2 on actuate Brake Assembly

Transitions occur on the execution of a primitives (example push button). Note that these primitives occur at distributed nodes.

1

2

3

T1 : push button

T2: actuate Brake Assembly

Behavior of DS

Idle

Button pushed

Brakes Applied

Page 6: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

Implementation Scope…..

Modules to be developed would do the protocol synthesisgiven 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.

1

2

3

Behavior of DS

1

2

3

1

2

3

Behavior at individual nodesProtocol Synthesis

Page 7: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

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

2

3

4

T1

T2

T3

T4 FSA SS

Page 8: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

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

2

3

4

T1

T2

T3

T4 SS

Page 9: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

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

Page 10: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

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

1

4

5

6

7

2

3

T4

T1

S12

R21T2

T3

S21

R12

GPS

Page 11: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

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)

a

b

c

d

T1

T4

e

f

g

h

T2

T3

S12

R12

R21

S21

PS 1 PS 2

Page 12: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

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

(a) [q, E, r] represents a transition as in the FSA SS

(b) C = (I1, I2 …, Im) m > 0

(c) 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

Page 13: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

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–resetbutton

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

2

3

4

Tr1

Tr2

Tr3

Tr4SST

Page 14: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

Real Time Protocol Synthesis

Given SST as the inputDerivation 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

Page 15: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

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.

Trrbasab

Trk

ts tm trk

tk

Page 16: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

Current System…

A component assembly framework supporting a variety of visualization and programming tools for developing

component connections.

Page 17: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

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.

Page 18: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

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

Model Checking for Timing Constraints

XML Dump

ApplicationSpecific

Code generationHard wired

Code GenerationEvent Service

Based Impl

SS in XML

Page 19: Real Time Event Based Communication Team Abhishekh Padmanabhan CIS 798 Final Presentation

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.