Looking into the Past: Looking into the Past: Enhancing Enhancing Mobile Publish/Subscribe Mobile Publish/Subscribe Middleware Middleware Exponent: Exponent: Pablo E. Guerrero Pablo E. Guerrero Thesis Supervisor: Thesis Supervisor: Mariano A. Cilia Mariano A. Cilia Universidad Nacional del Centro de la Provincia de Buenos Universidad Nacional del Centro de la Provincia de Buenos Aires Aires Facultad de Ciencias Exactas Facultad de Ciencias Exactas Tandil, Argentina, Tandil, Argentina, October October , 2004 , 2004
36
Embed
Looking into the Past: Enhancing Mobile Publish/Subscribe Middleware Exponent: Pablo E. Guerrero Thesis Supervisor: Mariano A. Cilia Universidad Nacional.
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Looking into the Past: EnhancingLooking into the Past: EnhancingMobile Publish/Subscribe MiddlewareMobile Publish/Subscribe Middleware
Exponent:Exponent:Pablo E. GuerreroPablo E. Guerrero
Thesis Supervisor:Thesis Supervisor:Mariano A. CiliaMariano A. Cilia
Universidad Nacional del Centro de la Provincia de Buenos Universidad Nacional del Centro de la Provincia de Buenos AiresAires
Facultad de Ciencias ExactasFacultad de Ciencias Exactas
Convergence of TechnologiesConvergence of Technologies Usage of Large-Scale Distributed SystemsUsage of Large-Scale Distributed Systems Mobile Devices & Wireless TechnologiesMobile Devices & Wireless Technologies Client/Server (Request/Reply) PredominanceClient/Server (Request/Reply) Predominance
New Paradigm for Information-Driven ApplicationsNew Paradigm for Information-Driven Applications WWW, Sensor Networks, Enterprise StrategiesWWW, Sensor Networks, Enterprise Strategies Pull-based (Request/Reply) Does Not FitPull-based (Request/Reply) Does Not Fit
Polling implies resource wastePolling implies resource waste Leads to Network Saturation or Server Breakdown!Leads to Network Saturation or Server Breakdown! Not Suitable for Mobile DevicesNot Suitable for Mobile Devices
Publish/Subscribe Middleware providesPublish/Subscribe Middleware provides Asynchronous communicationAsynchronous communication Loose couplingLoose coupling Producers don’t know who is subscribedProducers don’t know who is subscribed Clients can “dynamically” join and leaveClients can “dynamically” join and leave Doesn’t require publishers and subscribersDoesn’t require publishers and subscribers
at the same timeat the same time Reflects intrinsic behavior of Information-Reflects intrinsic behavior of Information-
driven Applicationdriven Application Support for roaming clientsSupport for roaming clients Notion of LocationNotion of Location Location TransparencyLocation Transparency
Pub/Sub needs an Intermediator Pub/Sub needs an Intermediator
55
Publish/Subscribe Systems StructurePublish/Subscribe Systems Structure
Independent Process Data Flow StyleIndependent Process Data Flow Style Message Manager or Notification ServiceMessage Manager or Notification Service Clients (producers/consumers/both)Clients (producers/consumers/both) Communication linksCommunication links
Service SemanticsService Semantics ImplementationImplementation
Problem Found Problem Found @@ Applications Startup Applications Startup Initial Bootstrapping Sequence phaseInitial Bootstrapping Sequence phase Getting a Consistent State Getting a Consistent State
Cannot assume how long will it takeCannot assume how long will it take
Meaningful Event
EvntEvntEvntEvntEvnt:anEventBasedApp Sub Evnt:aNotificationService
77
Problem Statement (II)Problem Statement (II)
Problem Aggravated in Mobile Problem Aggravated in Mobile EnvironmentsEnvironments DisconnectionsDisconnections Context Changes (new location)Context Changes (new location) Pervasive environment’s dynamic behaviorPervasive environment’s dynamic behavior
A new bootstrapping phase must be initiated!A new bootstrapping phase must be initiated!
System responsiveness degradedSystem responsiveness degraded
88
Proposed ApproachProposed Approach
Goal:Goal: Reduce bootstrapping latencyReduce bootstrapping latency Use already published (past) notificationsUse already published (past) notifications
Extend an existing pub/sub system, RExtend an existing pub/sub system, REBECAEBECA Store notifications in its InfrastructureStore notifications in its Infrastructure Caches Distributed in the NetworkCaches Distributed in the Network Minimize underlying system changesMinimize underlying system changes
Meaningful Event
Sub EvntEvnt Evnt Evnt Evnt Evnt:aNotificationService:anEventBasedApp
99
The RThe REBECAEBECA Notification Service Notification Service:aConsumer
Separation of ConcernsSeparation of Concerns Specification of the RequirementsSpecification of the Requirements
from the Infrastructurefrom the Infrastructure
1616
Caching in Event-Based SystemsCaching in Event-Based Systems
Caching applied in a different fashion Caching applied in a different fashion than traditional systemsthan traditional systems
Main differences:Main differences: Cache Coherency and ConsistencyCache Coherency and Consistency Cache SizesCache Sizes Information LifetimeInformation Lifetime Caching vs. BufferingCaching vs. Buffering
1717
Notifications StorageNotifications Storage
When? Locality Principle not Applicable!When? Locality Principle not Applicable! Distributed decision based on:Distributed decision based on:
Subscriptions and UnsubscriptionsSubscriptions and Unsubscriptions Advertisements and UnadvertisementsAdvertisements and Unadvertisements NotificationsNotifications
How? Behaving as FIFO queuesHow? Behaving as FIFO queues Circular Ring BufferCircular Ring Buffer
1818
Notifications Storage (II)Notifications Storage (II)
Parallel Circular Ring BuffersParallel Circular Ring Buffers
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
F1
F2
F5
F4
F3
Take advantage of Content-based NSTake advantage of Content-based NS Filter Identity, Covering and MergingFilter Identity, Covering and Merging
A Combination, whichA Combination, which avoids Replicating Notificationsavoids Replicating Notifications allows Ordering Notificationsallows Ordering Notifications
F1
F2
- -
F3
01
00
01
02
0001 000000000000000101020101020101010101
MaxGlobalBuffers
MaxFilterBuffers
Ma
xInd
exed
Filt
ers
F1
F2
- -
F3
01
00
01
02
0001 000000000000000101020101020101010101
MaxGlobalBuffers
MaxFilterBuffers
Ma
xInd
exed
Filt
ers
MaxGlobalBuffers
MaxFilterBuffers
Ma
xInd
exed
Filt
ers
MaxGlobalBuffers
MaxFilterBuffers
Ma
xInd
exed
Filt
ers
MaxGlobalBuffers
MaxFilterBuffers
Ma
xInd
exed
Filt
ers
MaxGlobalBuffers
MaxFilterBuffers
Ma
xInd
exed
Filt
ers
MaxGlobalBuffers
MaxFilterBuffers
Ma
xInd
exed
Filt
ers
MaxGlobalBuffers
MaxFilterBuffers
Ma
xInd
exed
Filt
ers
MaxGlobalBuffers
MaxFilterBuffers
Ma
xInd
exed
Filt
ers
MaxGlobalBuffers
MaxFilterBuffers
Ma
xInd
exed
Filt
ers
2020
Cache QueryingCache Querying
NS is an Undirected Acyclic GraphNS is an Undirected Acyclic Graph How deep to search? (i.e. How many levels How deep to search? (i.e. How many levels kk?)?) Link traversals involve costs similar to RPC’s:Link traversals involve costs similar to RPC’s:
De / Serialization, Un / MarshallingDe / Serialization, Un / Marshalling RPC Runtime Costs, Physical Network TransferRPC Runtime Costs, Physical Network Transfer
RPC requires 10RPC requires 10..000~15000~15..000 machine instructions000 machine instructions LPC 100 times faster than RPCLPC 100 times faster than RPC
Strategies Classification:Strategies Classification: k k = 1 = 1 Restricted to Local Event Brokers Restricted to Local Event Brokers 1 < k 1 < k m m Restricted to maximum depth ‘m’ Restricted to maximum depth ‘m’ k k = = Allowed to perform exhaustive search Allowed to perform exhaustive search
Avoid asking every peer by usingAvoid asking every peer by usingadvertisements informationadvertisements information
Considering the Time DimensionConsidering the Time Dimension Border Brokers’ clocks synchronizationBorder Brokers’ clocks synchronization Attach a Timestamp to notificationsAttach a Timestamp to notifications
Notification Service was ExtendedNotification Service was Extended Reduced Bootstrap LatencyReduced Bootstrap Latency Used a pure pub/sub ApproachUsed a pure pub/sub Approach Minimal Changes on the pub/sub Minimal Changes on the pub/sub