Publish/Subscribe Systems
on Node and Link Error-Prone
Mobile Environments
Sangyoon Oh, Sangmi Lee Pallickara,
Sunghoon Ko,
Jai-Hoon Kim, Geoffrey C. Fox
Community Grids Laboratory and Computer Science
Indiana University,
School of Information and Communication
Ajou University
Contents
z
Introduction
z
Cost model
z
Cost analysis
z
Performance comparison
z
Conclusion
Introduction
z
Advantages of
publish/subscribe systems in
mobile computing
•
Intermittent and high-latency
•
Decoupling publisher and
subscriber
•
Appropriate in mobile and
ubiquitous environments
•
Data dissemination services
•
Information sharing
•
Service discovery
ED
HHMS Proxy
ES
Wire d
W ired
ES (Event Source): Publisher ED (Event Displayer): Subscriber EBS (Event Brokering System): Server
Internet Cloud
ES
ES
EBS ES/ED
ES/ ED
Radio tower
Cel lula
r
W ire
Motivations
z
Mobile environments are
error prone
•
Wireless link disconnection,
Power Exhaustion
z
In the presentation, we
analyze the influence of error
•
Mobile link and node
•
Comparison pub/sub to
client-server
and polling models
ES
EBS ES/
ED
Radio tower
ES
Cellular W
ireless
Node Failure
Wir eless
LA N
Node Failure Link
Failure
System model
Event Source
Event Brokering
System Cpub
Event Displayer
Event Displayer
Event Displayer
Csub
C
sub
C
sub
publish data (event)
System parameters
α
(publish rate)
β
(request rate or process
(reference access) rate)
c
ps(
α
)
(publish/subscribe cost per event)
c
rr(
β
)
(cost per request and reply)
c
poll(
α
,T)
(cost of periodic publish or polling)
s(n)
(effect of sharing among n subscribers)
t
ps(time delay for publish/subscribe)
t
rr(time delay for request and reply)
λ, λ
s, λ
c(failure rate of
communication link, server, and client)
μ, μ
s, μ
c(recovery rate of
Considerations and Assumptions
z
Analyzing four models:
Disconnection (failure) and reconnection (recovery) of link and node failure
1. Publish/subscribe
2. Event (broker) based request/reply
3. Conventional request/reply
4. Periodic polling
z
Cost metric
Æ
time delay to transfer message and additional time required due
to failure of communication links and nodes of servers and clients
z
Persistent files
for events are sharable among servers. When a server fails, the another
server can take over the role and publish/server model can continue its
transactions.
z
Durable database
Characteristics on Failures
Depends on system Depends on system
Wait until link reconnection any
periodic polling
Lost event or data during client failure Transaction needs
to restart after recovery Wait until link
reconnection, transaction needs to restart request
/reply request/reply
(RPC)
After recovery, client can access events
occurred during failure using events log
on durable database Server is
replicated and transaction can be
continued with sharable persistent
file Wait until link
reconnection, transaction is preserved request /reply Event message based request/reply
After recovery, client can access events
occurred during failure using events log
on durable database Server is
replicated and transaction can be
continued with sharable persistent
file Wait until link
Cost Analysis I
Publish/subscribe model
z
Cost of message transfer =
(c
pub+ n s(n)c
sub)
, plus delay time from
link and/or node failure
z
Failure of communication link
1. Probability of disconnection during transaction (μ/(λ+μ)(1- )
2. Probability of communication link disconnection (λ/(λ+μ))
tpub + tsub + {μ/( λ+μ) (1- ) + λ/(λ+μ)} {β/(μ+β)}(1/μ).
z
Failure of server
•
Assumption: 1) Another server takes over the failed server, 2) ignores the costrequired for transaction from failed server to backup server
t
ps= t
pub+ t
subz
Failure of client
•
Assumption: Durable data Æ Client get any information after recovery (nlog)•
Probability of i event occurred between failure and recovery Æ•
If , i - nlogevents are lost due to exceeding limitation of capacity for event logThus, aver. number of lost events per client failure Æ
λ
ε−(tpub+ tsub)
λ
ε−(tpub+ tsub)
Aver. Delay time Probability of subscriber access
event before reconnection
Probability of disconnection
c c i
c α µ
µ µ α α + ⎟⎟ ⎠ ⎞ ⎜⎜ ⎝ ⎛ + c n c c c i n i c n i µ α µ α α µ α µ µ α α log log ) ( log
1 ⎟⎟⎠
Cost Analysis II
Event (broker)-based request/reply
z
Cost of message transfer = c
rr, plus delay time from link and/or node failure
z
Failure of communication link
1. Probability of disconnection during transaction (μ/(λ+μ)(1- )
2. Probability of communication link disconnection (λ/(λ+μ))
trr+ {μ/(λ+μ)(1- )+λ/(λ+μ)}(1/μ)
z
Failure of server
•
Assumption: 1) Another server takes over the failed server, 2) ignores the costrequired for transaction from failed server to backup server
t
rrz
Failure of client
•
Assumption: Durable data Æ Client gets any information after recovery•
Probability of i event occurred between failure and recoveryÆ
c c i
c α µ
µ µ
α α
+ ⎟⎟ ⎠ ⎞ ⎜⎜
⎝ ⎛
+
λ
ε
−trrλ
ε
−trrCost Analysis III
RPC Based Request/Reply model
z
Assumption
•
No-persistent, No-durable
•
Additional overhead
Æ
‘useless computation’ (re-generating
request/reply, which is < t
rr+ t
proc)
•
‘Server recovery overhead’ is ignored like other models.
z
Failure of communication link
1. Link doesn’t fail
probability is 1 - μ/(λ+μ)(1- ) - λ/(λ+μ) Ætrr
2. Link failed
probability is λ/(λ+μ) Ærecovery cost 1/μ + restart crr
3. Link failed during transaction
probability is μ/(λ+μ)(1- )
crr = [1 - { μ/(λ+μ) (1- ) + λ/(λ+μ)} ] trr
+ μ/(λ+μ) (1- ) { E(trr+tproc,λ) + 1/μ + crr} + λ/(λ+μ){(1/μ)+ crr}
Î crr = [ [1 - {μ /(λ+μ) (1- ) + λ/(λ+μ)}] trr
+ μ/(λ+μ) (1- ) {E(trr+tproc,λ) + 1/μ} + λ/(λ+μ)(1/μ)]
/ [ 1 - { μ/(λ+μ) (1- ) + λ/(λ+μ)]
λ
ε
−(tpub+ tsub)λ
ε
−(tpub+ tsub)λ
ε
−(tpub+ tsub)λ
ε
−(tpub+ tsub)λ
ε
−(tpub+ tsub)λ
ε
−(tpub+ tsub)λ
ε
−(tpub+ tsub)Useless Computation: E(trr+tproc,λ)
The function E denotes amount of
time, length x, and failure ratio of λ
E(trr+tproc,λ) =
x x x t t x dt t λ λ λ λ ε ε λ ε λε − − − − − − − = −
∫
1 1 1Cost Analysis III
RPC Based Request/Reply model
z
Failure of server
1. Server doesn’t fail
: probability is1 - μs/(λs+μs)(1- ) - λs/(λs+μs) Ætrr
2. Server failed
: probability isλs/(λs+μs) Æ recovery cost 1/μs+ restart crr
3. Server failed during transaction
: probability is μs/(λs+μs)(1- )
crr = [1 - { μs/(λs+μs) (1- ) + λs/(λs+μs)} ] trr
+ μs/(λs+μs) (1- ) { E(trr+tproc,λs) + 1/μs+ crr} + λs/(λs+μs){(1/μs)+crr}
Î crr = [ [1 - {μs /(λs+μs) (1- ) + λs/(λs+μs)}] trr
+ μs/(λs+μs) (1- ) {E(trr+tproc,λs) + 1/μs} + λs/(λs+μs)(1/μs)]
/ [ 1 - { μs/(λs+μs) (1- ) + λs/(λs+μs)]
z
Failure of client
•
Assumption
current data only and no-logging data
•
Only the data occurred during the failure will be lost.
s
λ
ε
−(tpub+ tsub)s
λ
ε
−(tpub+ tsub)s
λ
ε
−(tpub+ tsub)s
λ
ε
−(tpub+ tsub)s
λ
ε
−(tpub+ tsub) sλ
ε
−(tpub+ tsub)s
λ
ε
−(tpub+ tsub)Useless Computation: E(trr+tproc,λs)
The function E denotes amount of
time, length x, and failure ratio of λ
E(trr+tproc,λ)=
x x x t t x dt t λ λ λ λ ε ε λ ε λε − − − − − − − = −
∫
1 1 1Cost Analysis IV
Periodic (Polling) model
z
Assumption
•
Polling is delayed until communication link is recovered.•
the persistent file and durable databasez Link was disconnected or is disconnected during the transaction
•
Time delay =tpoll(α,T) + {μ/(λ+μ) + λ/(λ+μ)}(1/μ)
•
Conceptual cost =cpoll(α,T) + [1 – {μ/(λ+μ) + λ/(λ+μ)}] cdelay(α,T)
+ {μ/(λ+μ) + λ/(λ+μ)} cdelay(α,T+1/μ)
z
Failure of communication link
trr + {μ /(λ+μ)(1- )+λ/(λ+μ)}(1/μ)
z
Failure of server
t
rr zFailure of client
λ α
ε−tpoll( ,T)
c c i
c α µ
µ µ α α + ⎟⎟ ⎠ ⎞ ⎜⎜ ⎝ ⎛ + λ
ε
−trrλ α
ε−tpoll( ,T)
λ α
ε−tpoll( ,T)
Performance Comparisons
by parametric analysis
z
Publish/subscribe system requires
less communication delay.
z
Assumption
System parameters
1, T, or α T
tpoll(α, T)
1 or 5 tproc
1 tps , trr
0.05 - 0.1
μc
0.1
μ, μs
0.0001 – 0.5
λ , λs, λc
1/n - 1 s(n)
0, T, or α T
cdelay(α,T)
1 or α T
cpoll(α, T)
1 cpub , csub
2 cps, crr
0.5
α, β
Values Param.
Only need
communication delay
ÅBackup server
Publish/subscribe system & Event-based
request/reply
Need additional time delay and lost
communication
ÅServer failure
RPC-based request/reply system
Performance comparisons II
0 0.5 1 1.5 2 2.50.0001 0.0005 0.001 0.005 0.01
Failure rate of communication links
Ti m e d e la y pub/sub pub/sub2 req/reply 0 0.5 1 1.5 2 2.5 3 3.5
0.0001 0.0005 0.001 0.005 0.01 Failure rate of server
Ti me d e lay pub/sub req/reply rpc
(
α
=0.5, t
ps=1, t
rr=1,
β
=0.5, and
μ
s=0.1)
(
α
=0.5, s(n)=1, t
ps=1, t
rr=1,
μ
=0.1,
and
β
=0.5 for pub/sub and req/reply
and
β
=0.2 for pub/sub2)
Performance comparisons III
0 0.5 1 1.5 2 2.5 3 3.5 40.0001 0.0005 0.001 0.005 0.01
Failure rate of link and server
Ti
me
d
e
la
y pub/subreq/reply
rpc 0 2 4 6 8 10 12
0.05 0.1 0.2 0.5
Recovery rate of client
N u m b e r of l o s t e ve n ts n_log=0 n_log=10 n_log=20 n_log=30
(
α
=0.5, t
ps=1, t
rr=1, t
poll=1,
β
=0.5,
μ
=0.1,
μ
s=0.1)
Number of lost events per client
failure by varying recovery rate
of client
Experimental Setup
z
Using NaradaBrokering as message brokering system -- MOM
(Message Oriented Middleware)
for publish/subscribe
z
Using HHMS (Handheld Message Service) as primary
application level transport protocol
for publish/subscribe
between mobile device and conventional wired environment
z
Conventional RPC code using J2SE and J2ME MIDP 2.0
for
request/reply
z
Experimental Specifications
•
Treo600:
PalmOS 5.2 144MHz ARM, 32MB, Sprint PCS Service (
<14.4kbps)
NaradaBrokering
z
Developed by Community Grids Laboratory of
Indiana University
z
Message Oriented Middleware (MOM)
•
Multiple protocol transport support:
In publish-subscribe Paradigm with
different Protocols on each link
•
Subscription Formats
•
Reliable delivery
•
Ordered delivery
•
Recovery
and
Replay
•
Security
•
Message Payload
options
•
Messaging Related Compliance
•
Grid
Feature Support
NaradaBrokering
Stream
NB supports messages
and streams
NB role for Grid is
Similar to
Handheld Messaging Service
z
Light-weight publish/subscribe message
service framework for mobile devices
z
Optimized application level transport
protocol using byte message format
Experiment results
z
Simple server
Æ
sending 10 bytes messages
zEcho client
Æ
return the message back
z
Round Trip Time (RTT)
Å
median is chosen among 2000 iteration
z
It shows matching result with our parametric analysis
t
ps= t
rr= 1
Delay time of sending message
1538.1 (t
ps)
89.7 (EBS – ES) 1448.4 (ED – EBS)
Pub/Sub
1330.6 (t
rr)
39.9 (gateway – server) 1290.7 (client – gateway)
RPC
Total (msec.) Wired