Analysis of Timing Constraints in Heterogeneous Middleware - - PowerPoint PPT Presentation

analysis of timing constraints in heterogeneous
SMART_READER_LITE
LIVE PREVIEW

Analysis of Timing Constraints in Heterogeneous Middleware - - PowerPoint PPT Presentation

Analysis of Timing Constraints in Heterogeneous Middleware Interactions Ajay Kattepur 1 , Nikolaos Georgantas 2 , Georgios Bouloukakis 2 & Valrie Issarny 2 1 PERC, TCS Innovation Labs, Mumbai, India 2 MiMove Team, Inria Paris-Rocquencourt,


slide-1
SLIDE 1

Analysis of Timing Constraints in Heterogeneous Middleware Interactions

Ajay Kattepur1, Nikolaos Georgantas2, Georgios Bouloukakis2 & Valérie Issarny2

1PERC, TCS Innovation Labs, Mumbai, India 2MiMove Team, Inria Paris-Rocquencourt, France

ICSOC, Goa, November 2015

1

slide-2
SLIDE 2

Motivation

Crowd sourced Information Mobile Subscribers Connect/Disconnect Traffic Cameras Google “real time” traffic post post post get get get What is the current traffic congestion on Mahatma Gandhi Road ? (lease) (timeout) Storage with limited validity “latest report”

2

slide-3
SLIDE 3

Motivation

Future Internet Application Middleware:

Web Services – Client-Service (CS) Data Feeds, IoT – Publish-Subscribe (PS) Crowd-sourcing – Tuple Spaces (TS)

eXtensible Service Bus (XSB) Middleware – unifying connector for CS|PS|TS Timing Analysis of Interactions:

Data validity constraint with lease parameter Intermittent subscriber availability with timeout parameter

System designers can tune timing parameters for Transaction Success and Latency

3

slide-4
SLIDE 4

Outline

1

eXtensible Service Bus (XSB)

2

Timing Analysis

3

Timed Automata and Uppaal

4

Experimental Results

5

Conclusions

4

slide-5
SLIDE 5

Middleware Interaction Paradigms

Client Server send receive Publisher Broker Peer Peer publish subscribe retrieve retrieve Peer Tuple Space Peer Peer

  • ut
  • ut

read take/read

Client–Service (CS)

Tight Time Coupling Tight Space Coupling

Publish–Subscribe (PS)

Time Decoupling Space Decoupling

Tuple Space (TS)

Time Decoupling Space Decoupling

5

slide-6
SLIDE 6

XSB Model

eXtensible Service Bus (XSB) Middleware Connector1

Primitives Arguments post mainscope, subscope, data, lease get ↑mainscope, ↑subscope, ↑data, timeout

Functional and non-functional (timed) behavior of CS|PS|TS interactions 2

Native Primitives XSB Primitives CS send(destination, operation, message) post(destination, operation, message, lease(0)) receive(↑source, ↑operation, ↑message, timeout) get(↑source, ↑operation, ↑message, timeout) PS publish(broker, filter, event, lease) post(broker, filter, event, lease) retrieve(↑broker, ↑filter, ↑event, timeout) get(↑broker, ↑filter, ↑event, timeout) TS

  • ut(tspace, template, tuple, lease)

post(tspace, template, tuple, lease) take(↑tspace, ↑template, ↑tuple, timeout) get(↑tspace, ↑template, ↑tuple, timeout) read(↑tspace, ↑template, ↑tuple, timeout) get(↑tspace, ↑template, ↑tuple, timeout) 1http://xsb.inria.fr/

  • 2S. S. Lam, “Protocol Conversion”, IEEE Trans. on Software Engineering, v. 14, n. 3, 1988.

6

slide-7
SLIDE 7

XSB Model

eXtensible Service Bus (XSB) Middleware Connector1

Primitives Arguments post mainscope, subscope, data, lease get ↑mainscope, ↑subscope, ↑data, timeout

Functional and non-functional (timed) behavior of CS|PS|TS interactions 2

Native Primitives XSB Primitives CS send(destination, operation, message) post(destination, operation, message, lease(0)) receive(↑source, ↑operation, ↑message, timeout) get(↑source, ↑operation, ↑message, timeout) PS publish(broker, filter, event, lease) post(broker, filter, event, lease) retrieve(↑broker, ↑filter, ↑event, timeout) get(↑broker, ↑filter, ↑event, timeout) TS

  • ut(tspace, template, tuple, lease)

post(tspace, template, tuple, lease) take(↑tspace, ↑template, ↑tuple, timeout) get(↑tspace, ↑template, ↑tuple, timeout) read(↑tspace, ↑template, ↑tuple, timeout) get(↑tspace, ↑template, ↑tuple, timeout) 1http://xsb.inria.fr/

  • 2S. S. Lam, “Protocol Conversion”, IEEE Trans. on Software Engineering, v. 14, n. 3, 1988.

6

slide-8
SLIDE 8

XSB Model

Operations with active and inactive time interval constraints

1

lease: max active interval for post (data validity)

2

timeout: invariant active interval for get (subscriber availability)

3

lease ≈ 0 for CS (tight time coupling)

Models time-correlation between post and get operations for forming end-to-end XSB transactions (CS↔PS↔TS)3 Data processing, transmission and queueing times assumed negligible compared to lease/timeout intervals This corresponds to a G/G/∞/∞ queueing model

  • 3A. Kattepur, N. Georgantas & V. Issarny, “QoS Analysis in Heterogeneous Choreography Interactions”,

ICSOC, 2013. 7

slide-9
SLIDE 9

XSB Model

Operations with active and inactive time interval constraints

1

lease: max active interval for post (data validity)

2

timeout: invariant active interval for get (subscriber availability)

3

lease ≈ 0 for CS (tight time coupling)

Models time-correlation between post and get operations for forming end-to-end XSB transactions (CS↔PS↔TS)3 Data processing, transmission and queueing times assumed negligible compared to lease/timeout intervals This corresponds to a G/G/∞/∞ queueing model

  • 3A. Kattepur, N. Georgantas & V. Issarny, “QoS Analysis in Heterogeneous Choreography Interactions”,

ICSOC, 2013. 7

slide-10
SLIDE 10

Outline

1

eXtensible Service Bus (XSB)

2

Timing Analysis

3

Timed Automata and Uppaal

4

Experimental Results

5

Conclusions

8

slide-11
SLIDE 11

XSB Timing Model

tpost t'post t'' post tget get t' δget δ post δ' post timeout lease lease lease timeout

time time

9

slide-12
SLIDE 12

XSB Timing Model

Disjunctive conditions for Transaction Success:

1

If post occurs first (data posted): tpost < tget < tpost + lease (1)

get occurs before lease – transaction successful, or lease is reached – transaction is a failure

2

If get occurs first (subscriber connected): tget < tpost < tget + timeout (2)

post occurs before timeout – transaction successful, or timeout is reached – get operation yields no transaction

Represents individual CS|PS|TS interactions and heterogeneous interconnections between them

10

slide-13
SLIDE 13

XSB Timing Model

Disjunctive conditions for Transaction Success:

1

If post occurs first (data posted): tpost < tget < tpost + lease (1)

get occurs before lease – transaction successful, or lease is reached – transaction is a failure

2

If get occurs first (subscriber connected): tget < tpost < tget + timeout (2)

post occurs before timeout – transaction successful, or timeout is reached – get operation yields no transaction

Represents individual CS|PS|TS interactions and heterogeneous interconnections between them

10

slide-14
SLIDE 14

XSB Timing Model

Disjunctive conditions for Transaction Success:

1

If post occurs first (data posted): tpost < tget < tpost + lease (1)

get occurs before lease – transaction successful, or lease is reached – transaction is a failure

2

If get occurs first (subscriber connected): tget < tpost < tget + timeout (2)

post occurs before timeout – transaction successful, or timeout is reached – get operation yields no transaction

Represents individual CS|PS|TS interactions and heterogeneous interconnections between them

10

slide-15
SLIDE 15

Outline

1

eXtensible Service Bus (XSB)

2

Timing Analysis

3

Timed Automata and Uppaal

4

Experimental Results

5

Conclusions

11

slide-16
SLIDE 16

Timed Automata Model

A timed automaton4 is a finite automaton extended with real-valued clock variables. Clocks used to control post and get operations with active and inactive intervals Formal model on Uppaal5 allows verification Two role automata Poster/Getter interact via the Glue automaton c! (sending action) synchronizes with the transition of another automaton labeled with c? (receiving action)

  • 4R. Alur and D. L. Dill, “A Theory of Timed Automata”, Theoretical Computer Science, 1994.
  • 5G. Behrmann, A. David, and K. G. Larsen, “A tutorial on Uppaal4.0”, Aalborg University, Denmark, 2006.

12

slide-17
SLIDE 17

Poster - Timed Automata Model

post_end_event post_init post_event post_on post_off delta_post <= max_delta_post delta_post := lease post_end ? delta_post := lease post ! delta_post := 0

13

slide-18
SLIDE 18

Poster - Timed Automata Model

post_end_event post_init post_event post_on post_off delta_post <= max_delta_post delta_post := lease post_end ? delta_post := lease post ! delta_post := 0

Uniform distribution of inactive post intervals Disallows concurrent active posts via Glue feedback Arrival process for one of the infinite on-demand servers of G/G/∞/∞ model

14

slide-19
SLIDE 19

Getter - Timed Automata Model

get_end_event get_init get_event no_trans get_on delta_get <= timeout get_off delta_get <= max_delta_get get_ret == 0 get_ret == 1 delta_get >= timeout get_end ! delta_get := timeout get ! get_ret := 0, delta_get :=0 delta_get <= timeout get_return ? get_ret := 1

15

slide-20
SLIDE 20

Getter - Timed Automata Model

get_end_event get_init get_event no_trans get_on delta_get <= timeout get_off delta_get <= max_delta_get get_ret == 0 get_ret == 1 delta_get >= timeout get_end ! delta_get := timeout get ! get_ret := 0, delta_get :=0 delta_get <= timeout get_return ? get_ret := 1

Uniform distribution of inactive get intervals Controls active get intervals with a constant timeout Multiple posts may be received during an active interval Detects when no transaction is concluded (no_trans event)

16

slide-21
SLIDE 21

Glue - Timed Automata Model

trans_fail trans_succ glue_post delta_post_on <= lease glue_get_post glue_get glue_init post_end ! delta_post_on >= lease post_end ! get_return ! delta_post_on <= lease get ? post ? delta_post_on := 0 get_end ? post ? delta_post_on := 0 get ? 17

slide-22
SLIDE 22

Glue - Timed Automata Model

trans_fail trans_succ glue_post delta_post_on <= lease glue_get_post glue_get glue_init post_end ! delta_post_on >= lease post_end ! get_return ! delta_post_on <= lease get ? post ? delta_post_on := 0 get_end ? post ? delta_post_on := 0 get ?

Controls max active post intervals with a constant lease lifetime Synchronizes between concurrent post and get operations Detects when synchronization is successful, with the trans_succ and trans_fail events

18

slide-23
SLIDE 23

Verification

Reachability (E<>ϕ) and Safety (A[]ϕ) properties verified Successful transaction (overlap in time between active post and active get)

A[] glue.trans_succ imply (poster.post_on and getter.get_on and (delta_post==0 or delta_get==0)) (3)

Failed transaction (ongoing inactive get interval entirely includes a terminating active post interval)

A[] glue.trans_fail imply (poster.post_on and getter.get_off and delta_post==lease and delta_get-timeout>=lease) (4)

No transaction concluded (ongoing inactive post interval entirely includes a terminating active get interval)

A[] getter.no_trans imply (getter.get_on and poster.post_off and delta_get==timeout and delta_post-lease>=timeout) (5)

19

slide-24
SLIDE 24

Verification

Reachability (E<>ϕ) and Safety (A[]ϕ) properties verified Successful transaction (overlap in time between active post and active get)

A[] glue.trans_succ imply (poster.post_on and getter.get_on and (delta_post==0 or delta_get==0)) (3)

Failed transaction (ongoing inactive get interval entirely includes a terminating active post interval)

A[] glue.trans_fail imply (poster.post_on and getter.get_off and delta_post==lease and delta_get-timeout>=lease) (4)

No transaction concluded (ongoing inactive post interval entirely includes a terminating active get interval)

A[] getter.no_trans imply (getter.get_on and poster.post_off and delta_get==timeout and delta_post-lease>=timeout) (5)

19

slide-25
SLIDE 25

Verification

Reachability (E<>ϕ) and Safety (A[]ϕ) properties verified Successful transaction (overlap in time between active post and active get)

A[] glue.trans_succ imply (poster.post_on and getter.get_on and (delta_post==0 or delta_get==0)) (3)

Failed transaction (ongoing inactive get interval entirely includes a terminating active post interval)

A[] glue.trans_fail imply (poster.post_on and getter.get_off and delta_post==lease and delta_get-timeout>=lease) (4)

No transaction concluded (ongoing inactive post interval entirely includes a terminating active get interval)

A[] getter.no_trans imply (getter.get_on and poster.post_off and delta_get==timeout and delta_post-lease>=timeout) (5)

19

slide-26
SLIDE 26

Verification

Reachability (E<>ϕ) and Safety (A[]ϕ) properties verified Successful transaction (overlap in time between active post and active get)

A[] glue.trans_succ imply (poster.post_on and getter.get_on and (delta_post==0 or delta_get==0)) (3)

Failed transaction (ongoing inactive get interval entirely includes a terminating active post interval)

A[] glue.trans_fail imply (poster.post_on and getter.get_off and delta_post==lease and delta_get-timeout>=lease) (4)

No transaction concluded (ongoing inactive post interval entirely includes a terminating active get interval)

A[] getter.no_trans imply (getter.get_on and poster.post_off and delta_get==timeout and delta_post-lease>=timeout) (5)

19

slide-27
SLIDE 27

Verification

Successful transactions – durations and relative positions of active/inactive post and get Dependence on deterministic parameters lease, timeout and stochastic intervals δpost (on/off), δget (on/off) General formal conditions for successful XSB transactions – potentially tunable system parameters We perform experiments to quantify the effect of varying these parameters for successful transactions

20

slide-28
SLIDE 28

Outline

1

eXtensible Service Bus (XSB)

2

Timing Analysis

3

Timed Automata and Uppaal

4

Experimental Results

5

Conclusions

21

slide-29
SLIDE 29

Statistical Simulation: Transaction Success Rates

Test the effect of varying lease and timeout periods on transaction success rates Exponential distributions for intervals between successive post operations (δpost) and successive get operations (δget) No queueing effects included in the model This simulates an M/G/∞/∞ queueing model Simulation run for 10, 000 get operations to collect transaction statistics – transaction success conditions from formal analysis

22

slide-30
SLIDE 30

Statistical Simulation: Transaction Success Rates

Increasing timeout periods for individual lease values improves the success rate Success Rate is severely bounded by lease periods – evident in the CS case

23

slide-31
SLIDE 31

Statistical Simulation: Latency vs. Success Rate

Trade-off between end-to-end latency and transaction success rate Cumulative latency distributions for transactions All failed transactions are pegged to the max value lease Guidelines for system designers to set the lease and timeout periods for successful transactions with acceptable latency

24

slide-32
SLIDE 32

Statistical Simulation: Latency vs. Success Rate

Lower lease periods (e.g., CS case) produce markedly improved latency, however, with lower success rate With higher levels of lease periods (typically PS/TS), we notice high success rates, but also higher latency

25

slide-33
SLIDE 33

Experimental Comparison: XSB Implementation

Two middleware experimental setups:

lease = 0 transactions, experiment with the DPWS6 CS middleware lease > 0 transactions, experiment with the JMS7 PS middleware

Includes concurrent posts and queueing (queueing delays are negligible) This corresponds to an M/G/1/∞ queueing model Each experiment run for at least 2 hours to ensure close statistical samples for δpost and δget distributions

6http://ws4d.e-technik.uni-rostock.de/jmeds 7http://activemq.apache.org 26

slide-34
SLIDE 34

Experimental Comparison: XSB Implementation

lease (s) δget (s) Simulation Measurement exponential(20) 0.65 0.717 exponential(40) 0.35 0.42 10 exponential(20) 0.75 0.778 10 exponential(40) 0.48 0.554 40 exponential(20) 0.93 0.91 40 exponential(40) 0.75 0.81 Success Rate Comparison

Compare the results of simulated and measured success rates Absolute deviation between the two is no more than 10% Deviation may be due to network delays, buffering at each entity (poster, getter, intermediate entity) Designers can rely on our simulation model for tuning their system parameters

27

slide-35
SLIDE 35

Outline

1

eXtensible Service Bus (XSB)

2

Timing Analysis

3

Timed Automata and Uppaal

4

Experimental Results

5

Conclusions

28

slide-36
SLIDE 36

Conclusions

Crowd sourced Information Mobile Subscribers Connect/Disconnect Traffic Cameras Google “real time” traffic post post post get get get What is the current traffic congestion on Mahatma Gandhi Road ? (lease) (timeout) Storage with limited validity “latest report”

lease=10 seconds, timeout=10 seconds: Success Rate 65% and Latency within 8 sec. (P = 0.63) lease=10 seconds, timeout=20 seconds: Success Rate 80% and Latency within 4 sec. (P = 0.77)

29

slide-37
SLIDE 37

Conclusions

Unified timing analysis across heterogeneous middleware paradigms using XSB Demonstrated the effect of varying lease and timeout periods on success rates/latency By leveraging the timing analysis, designers can accurately set constraints to ensure high success rates for transactions Included stochastic behavior without more sophisticated formal notations (probabilistic timed automata) - future work

30

slide-38
SLIDE 38

Thank you

31