Publisher Mobility in Distributed Publish/Subscribe SystemsVinod Muthusamy, Milenko Petrovic, Dapeng Gao, Hans-Arno Jacobsen
University of Toronto
June 10, 2005
4th International Workshop on Distributed Event-Based Systems (DEBS'05)
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 2
Motivation Explosion of information producers
Blogs, wikis, podcasting, photo sharing
Mobility of users Cell phones, PDAs, sensors
Mobile information producers Traditionally wired publishers can increasingly be mobile New types of publishers
SMS, camera phones, location based services
Pub/sub data dissemination Well suited to mobile clients
Decoupling, filtering
Mobility of information producer has not been studied in pub/sub Breaks common pub/sub assumption
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 3
Publisher Mobility Scenarios Journalists with blogs
Update blogs on location Upload pictures from camera
phone
Police patrol car Send status updates
Traffic, accidents, parts failures
Mail delivery Track delivery status, location
updates
Publisher
1 2
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 4
Agenda
Background Context Subscriber mobility
Publisher mobility Problem Solutions
Evaluation Setup Results
Conclusions
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 5
Context Part of Toronto Publish/Subscribe System (ToPSS)
Improve expressiveness Approximate matching, location queries, XML, RDF, composite
subscriptions, historic subscriptions, etc. Distributed issues
Fault tolerance, load balance, reliability New environments
MANETs, P2P overlays, sensor networks
Mobile-ToPSS project Subscriber mobility [MDM’04]
Based on JEDI, SIENA work Publisher mobility [DEBS’05] Effects of routing computations [Mobicom’05] Content based routing in MANET [Mobiquitous’05]
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 6
Distributed Publish/Subscribe Advertisements
flooded Create adv tree
Subscriptions along reverse adv path Create
multicast tree
Publications along reverse sub path
PublisherSubscriber Subscriber
. . .. . .
Advertisements Subscriptions Publications
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 7
Subscriber Mobility Problem Matching publications during
disconnection Stored by broker Replayed upon reconnection
“State” transfer is expensive Double message load with
only 10% of mobile subscribers [MDM’04]
No state lost when publishers are disconnected No problem with mobile
publishers?
1 2
SubscriberSubscriber SubscriberSubscriber
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 8
Publisher Mobility Problem Adv and sub trees Moveout: both trees torn down Movein: both trees rebuilt Expensive
Network load: May be # ads > # subs
No delivery until tree constructed Distinguish temporary disconnections
t1
At Old Broker
t3
Disconnected At New Broker
t5t4
Can publishnew events
Connect(movein)
Disconnect(moveout)
t2
moveout
Publisher
1 2
. . . . . .
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 9
Publisher Mobility Problem Adv and sub trees Moveout: both trees torn down Movein: both trees rebuilt Expensive
Network load: May be # ads > # subs
No delivery until tree constructed Distinguish temporary disconnections
t1
At Old Broker
t3
Disconnected At New Broker
t5t4
Can publishnew events
Connect(movein)
Disconnect(moveout)
t2
movein
Publisher
1 2
. . . . . .
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 10
Prefetching Optimization Exploits knowledge of future mobility
patterns Concurrent
Construction at new broker Teardown at old broker
Tree construction time hidden from user
t1
At Old Broker
t3
Disconnected At New Broker
t5t4
Can publishnew events
Connect(movein)
Disconnect(moveout)
t2
moveout
Publisher
1 2
. . . . . .
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 11
Prefetching Optimization Exploits knowledge of future mobility
patterns Concurrent
Construction at new broker Teardown at old broker
Tree construction time hidden from user
t1
At Old Broker
t3
Disconnected At New Broker
t5t4
Can publishnew events
Connect(movein)
Disconnect(moveout)
t2
movein
Publisher
1 2
. . . . . .
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 12
Proxy Optimization
Maintain trees from several brokers
Advantageous if restricted mobility region
t1
At Old Broker
t3
Disconnected At New Broker
t5t4
Can publishnew events
Connect(movein)
Disconnect(moveout)
t2
moveout
Publisher
1 2
. . . . . .
movein
Publisher
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 13
Delayed Optimization
Maintain trees at old broker for some time
Allow new tree to graft onto old tree
Remove extraneous portions of old tree
t1
At Old Broker
t3
Disconnected At New Broker
t5t4
Can publishnew events
Connect(movein)
Disconnect(moveout)
t2
moveout
Publisher
1 2
. . . . . .
movein
Publisher
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 14
Evaluation: Setup Simulation Environment
ns-2 network simulator Implemented mobility optimizations
Parameters Topology
Metropolitan Area Network 4 levels of degree 4 64 leaf brokers
Subscribers: 500 Publishers: 50 Locality: random, 30%, 60%, 90% Mobility
Static subscribers, mobile publishers Random speeds (5km/h, 50km/h, 100km/h)
Metrics Tree rebuild load Tree rebuild time, delivery ratio
• • •
64• • •
1
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 15
Publisher Scalability
Standard and Prefetching >>Proxy and Delayed
Prefetching worse due to extra control messages
Delayed better due to smaller tree deltas
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 16
Publisher Scalability Probe tree
completion
Prefetching is fastest Starts early
Standard is slowest Almost 4s
Delayed close to Prefetching
Note: time is not known to publisher
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 17
Publisher Scalability
Tree rebuilding cost Best: Delayed, Proxy Worst: Standard, Prefetching
Tree rebuilding time Best: Prefetching, Delayed Worst: Standard
Prefetching Good for the user Bad for the network
Delayed Good for user and network Practical
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 18
Publication Locality
250 publishers
Vary publication similarity
Standard and Prefetching approach Proxy and Delayed
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 19
Publication Locality
Time from publish to notification
Again, Standard and Prefetching approach Proxy and Delayed
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 20
Publication Locality
With sufficient publication similarity, optimizations have diminishing benefit Tree rebuilding cost Delivery latency
June 10, 2005 (DEBS ’05) Mobile-ToPSS (University of Toronto) 21
Conclusions
The publish/subscribe model is well suited to mobile applications But publisher mobility has not been evaluated
Publisher mobility is expensive Breaks conventional assumptions Tree rebuilding imposes large cost
Must distinguish temporary vs. permanent disconnection Delayed has best performance and is most practical
Future Work Other scenarios: realistic traces, mobile subscribers Develop more optimizations