Download presentation
Presentation is loading. Please wait.
Published byBrent Griffith Modified over 9 years ago
1
Data-centric Networking Through Adaptive Content-based Routing Hans-Arno Jacobsen Bell University Laboratory Chair Middleware Systems Research Group University of Toronto MIDDLEWARE SYSTEMS RESEARCH GROUP http://www.padres.msrg.utoronto.ca University of Oslo, February 2009
2
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 Querying the Future
3
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 Amazon to Chapters to You.... Monday, October 10th in Cyberspace Your book “...” is available at.... $10 off Thursday, November 15th, in Toronto
4
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 else Business Process Example Check score Credit check Credit check 2 Check score 2 Reject Approve Send to officer Store in DB … … Loan Application Processing
5
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 Large-scale Business Processes Vendor Sale Manufactory Finance Dispatch B Out-stock B Pick-up goods Packaging Marketing Design Out-stock B Target price Prototype OutTake Control Assign Confirm Determinate plan Check stock Raw materials Audit Raw Determinate plan Execute plan Process control Monitor Process Pay Check Signature Print receipt Warehouse Delivery FedEx Pick up Monitoring Statistic Chart Strategy Design Marketing Order Manufactory Payment Requirement collection Feature selection Goods selection Confirm features Material Make plan Feedback Check order Fill order Check dealerCheck credit Approval Validate Affirm order Sale prediction Sign Contract CCC administrate Goods delivery Fill dispatch bill Fill out-stock bill Credit card
6
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 What is the Common Denominator? Many applications are driven by asynchronous state transitions. Something happens, … an appropriate reaction is expected and required. Asynchronous state transitions represent events. A process is triggered, a request submitted, … Many applications require event management and processing capabilities to run effectively.
7
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 In Terms of the Examples These applications are driven by events Information matching the query is found and indexed Person walks by a bookstore Loan request is submitted online Abstractly speaking events are disseminated and filtered against queries events queries
8
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 What Event Processing Support is Required ? De-coupling and loose coupling Fine-grained event filtering In-network event processing Composite event detection Event correlation
9
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 Many Applications are Event-based A BC D E F RFID and sensor networksService oriented architectures Workflows, business processes and job scheduling Supply chain and logistics Event-Based Light Callback Razor SKU Transform Fault Temperature Invoke Loan Order Delivered In flight Job A done Trigger
10
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Agenda What is the right abstractions? My point of view The PADRES project Some details & results University of Oslo, February 2009
11
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 What Abstractions Do Not Work? Databases Great for managing historic data But what about future data Data streams Great for managing structured streams of tuples But what about un-structured, multi-typed, sporadic events from many sources Rule-based expert systems Great for inference and reasoning But what about managing large numbers of fined-grained filters in distributed envrionments Take this cum gran salis
12
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 What Abstractions Enable Event Processing? The afore-mentioned points can best be addressed by The content-based publish/subscribe model Realized by content-based message routing Events are conveyed as publications. Event listening, filtering and correlating is based on content-based subscriptions managed by the pub/sub system.
13
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 Publish/Subscribe 101 Not all publish/subscribe is equal Publish/Subscribe models and evolution Channel-based OMG CORBA Event Service, … Topic-based WS Notifications, OMG Data Dissemination Service … Type-based OMG Data Dissemination Service (partially), … Content-based The PADRES ESB (see below), … State-based Subject Spaces
14
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 Content-based Publish/Subscribe Publisher Subscriber Subscriptions Publications Notification IBM=84 MSFT=27 INTC=19 JNJ=58 ORCL=12 HON=24 AMGN=58 Stock markets NYSE NASDAQ TSX Subscriptions: IBM > 85 ORCL < 10 JNJ > 60 Broker(s)
15
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 The Content-based Pub/Sub Model Language and data model Boolean functions over predicates Subscriptions are conjunctions of predicates Publications are sets of attribute-value pairs Matching semantic A subscription matches if all its predicates match Example Tree- structured data Graph- structured data Un-structured data Regular languages Relational model Subscription XPathRDF QueryKeywordsRegular expressions SQL Publication XMLRSS feedsText, documentsSentences over some alphabet DBs, i.e., tables
16
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 data tuples subscriptions query publication Query and subscription are very similar. Data tuples and publication are very similar. However, the two problem statements are inverse. That’s Like Data Base Querying !! sets of tuples About past About future sets of tuples
17
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Content-based Message Routing Event-Based Decoupled Flexible Responsive Content Routing Declarative A1 S2 P1 S1 P2 S2 [class,=,stock],[symbol,=,YHOO],[price,>,20.0] [class,=,stock],[symbol,=,MSFT],[price,>,50.0] [class,=,stock],[symbol,=,YHOO] [class,=,stock],[price,>,40.0] A2 S1 [class, stock],[symbol, YHOO],[price,25.0] [class, stock],[symbol, YHOO],[price,45.0] [class, stock],[symbol, MSFT],[price, 55.0] University of Oslo, February 2009
18
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Publication Space weight height Adv: [height > 70],[weight > 25] Sub: [height > 75],[weight > 20] 70 75 Sub intersecting Adv 2025 weight height Sub: [height > 75],[weight > 20] 70 90 Pub matching Sub 2032 Pub: [height, 90],[weight, 32] University of Oslo, February 2009
19
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 ToPSS - The Toronto Publish/Subscribe System Family [2000 – present] Matching algorithms Language expressiveness vs. efficient matching Routing protocols Network architectures & scalability Higher level abstractions Workflow execution Monitoring S-ToPSS (semantic) X-ToPSS (XML matching) A-ToPSS (approximate) persistent-ToPSS (subject spaces) L-ToPSS (location-based) ToPSS (matching) M-ToPSS (mobile) Ad hoc-ToPSS (ad hoc networking) Federated-ToPSS (federation of ToPSS brokers) Rb-ToPSS (rule-based) P2P-ToPSS (peer-to-peer) LB-ToPSS (load balancing) FT-ToPSS (fault tolerance) Historic-ToPSS (historic data) CS-ToPSS (composite subs) BPEL-ToPSS (BPEL execution) JS-ToPSS (job scheduling)
20
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen PADRES Data-centric Event Bus First generation of students, when I looked away Peng Alex David aRno Eli Serge PADRES is Publish/subscribe Applied to Distributed Resource Scheduling PAdres is Distributed REsource Scheduling http://www.padres.msrg.utoronto.ca Acknowledgements http://padres.msrg.utoronto.ca University of Oslo, February 2009
21
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 2015-11-15 21 PADRES Architecture
22
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 PADRES Event Bus Consists of pub/sub message brokers Content-based publish/subscribe interface Content-based message routing Store-and-forward message queuing Comprised of a federation of brokers deployed as overlay Offers a slim client library for applications Soon available under an open (source) license model and as Apache Poloka incubation project
23
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 B B B S S P B P B input queue output queue dest2 output queue dest3 dest1 dest2 dest3 P S = publisher = subscriber subscriptiondest Matching Engine Routing Table + temperature > 37 dest2 temperature > 40 dest3 Publications temperature = 38temperature = 42temperature = 36 PADRES Event Broker
24
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Queue Handler Pre Processor Post Processor Forwarder PADRES Broker Matcher Input Queue Output Queues PRT SRT Pub/Sub Messages Event Broker Architecture If sub intersectsSend to [class,=,foo],[attr,>,17]B1 If pub matchesSend to [class,=,foo],[attr,>,20]B2 Adv Sub Pub Sub Pub University of Oslo, February 2009
25
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 Innovative PADRES Features A BC D E F Composite Events Historic Access Management Robustness Load Balancing Security
26
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Limitations of Acyclic Overlays Sensitive to Congestion Imbalanced workloads Broker failures Overlay changes Broker Publisher Subscriber P University of Oslo, February 2009
27
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen PPP P Robust Self-healing Adaptive Flexible Publisher Subscriber Congested Link General Overlay Network University of Oslo, February 2009
28
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Challenges with General Overlays Subscriptions route in loops Brokers receive duplicate subscriptions Multiple copies of message maybe created Same problem for publications 2 34 5 1 6 Adv 1 Adv 2 S X S S University of Oslo, February 2009
29
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Number of Redundant Messages University of Oslo, February 2009
30
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Content-based Routing in General Overlays Maintain the same interface to pub/sub clients Develop content-based routing protocols for Advertisement Subscription Publication University of Oslo, February 2009
31
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Advertisement Routing Each advertisement forms a spanning advertisement tree Duplicate advertisements are discarded by brokers Each advertisement is assigned a unique tree identifier (TID) e.g., A: [class,=,stock]……[TID,=,adv_msg_id] SRT (Subscription Routing Table) A set of [advertisement, last hop] pairs University of Oslo, February 2009
32
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Subscription Routing I Each subscription is augmented with a TID- predicate with a variable e.g., S: [class,=,stock] … [TID,=,$X] The variable is bound to the TID of matching advertisements PRT (Publication Routing Table) A set of [subscription, { (TID, last hop of subscription), … } ] pairs University of Oslo, February 2009
33
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen S: [class,=,stock],[name,=,*],[price,>,50], [TID,=,$Z] At Broker 1: Adv1: [class,=,stock],[name,=,IBM], [price,>,60],[TID,=,Adv1] Adv2: [class,=,stock],[name,=,HP], [price,>,50],[TID,=,Adv2] S matching Adv1: [class,=,stock],[name,=,*], [price,>,50],[TID,=,Adv1] S matching Adv2: [class,=,stock],[name,=,*],[price,>,50], [TID,=,Adv2] Subscription Routing II 2 34 5 1 6 Adv 1 Adv 2 S X S University of Oslo, February 2009
34
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Publication Routing Each publication is assigned the TID of its inducing advertisement e.g., P [class, stock]……[TID, adv_msg_id] Publication routing protocols: Fixed TID routing: a publication is routed to subscribers along its advertisement tree. Dynamic publication routing: a publication may be routed to subscribers across branches of different advertisement trees. University of Oslo, February 2009
35
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Fixed TID Routing 2 34 5 1 6 Adv 1 Adv 2 X P Sub P Property 1: No broker receives duplicate publication messages. University of Oslo, February 2009
36
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Dynamic Publication Routing Publication’s TID can be changed in transit. ``Best`` path algorithms Property 2: Changing a publication P’s TID while in transit will not change the set of subscribers notified of P. 2 34 5 1 6 Adv 1 Adv 2 X Sub P University of Oslo, February 2009
37
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Faster Matching with TIDs Subscriptions are augmented with TIDs only once at the first broker. Other brokers can route the subscription based on the TID alone. Similar argument applies to publication routing. University of Oslo, February 2009
38
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Advantages Simple and powerful concept Retain the publish/subscribe client interface Speed up subscription and publication propagation Generate duplicated messages only at advertisement level Build multiple subscription routing paths for publications Route publications dynamically University of Oslo, February 2009
39
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 Composite Subscription AND OR S1S2 OR S3S4 AND S5 CS={ {S1 OR S2} AND {S3 OR S4} AND S5 } A composite event is the constellation of events being detected by the composite subscription. S are atomic subscriptions. I.e., they are satisfied by a single, multi-attribute event. Composite subscriptions (CS) are used for event correlation, in network filtering, and the detection of composite events (complex event). Applications: Business process management, Business activity monitoring
40
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Topology-based CS Routing 2 34 5 1 6 Adv 1 Adv 2 7 8 9 CS={ {S1 AND S2} AND S3 } CS S2 S3 S1 CS’ Adv 3 University of Oslo, February 2009
41
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Adaptive CS Routing CSs may be split according to potential publication traffic, bandwidth, latency etc. 2 13 Adv 1 Adv 2 CS={S1 AND S2} 2 13 Adv 1 Adv 2 CS={S1 AND S2} (a) (b) University of Oslo, February 2009
42
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Adaptive CS Routing 2 34 5 1 6 Adv 1 Adv 2 7 8 9 CS={{S1 AND S2} AND S3} CS S2 S3 S1 Adv 3 5 CS’ University of Oslo, February 2009
43
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Evaluation 32 overlay brokers, 20 publishers, 30 subscribers, initially 20 machine vs. PlanetLab Workload http://research.msrg.utoronto.ca/Padres/DataSets Yahoo!Finance stock quote traces University of Oslo, February 2009
44
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Dense Topology University of Oslo, February 2009
45
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen On PlanetLab University of Oslo, February 2009
46
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Increased Publication Rate University of Oslo, February 2009
47
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen With Broker Failures University of Oslo, February 2009
48
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Composite Event Detection University of Oslo, February 2009
49
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Conclusions The right abstraction for event processing is content-based publish/subscribe. Event processing & publish/subscribe are interesting research areas. ToPSS and PADRES explore many aspects of these areas. University of Oslo, February 2009 http://padres.msrg.utoronto.ca
50
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Acknowledgements Graduate students, visitors, and PDFs currently working on PADRES. Alex Cheung Chen Chen Amer Farroukh Patrick Lee Guoli Li Bala Maniymaran Vinod Muthusamy Reza Sherafat Naweed Tajuddin Chunyang Ye Young Yoon Partners from CA Serge Mankovskii & Kirk Wilson Partners from IBM Phil Coultard & Allen Chan Partners from Bell Bell Systems & Technology Plus many PADRES alumni
51
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 References The PADRES ESB project home http://padres.msrg.utoronto.ca http://padres.msrg.utoronto.ca An eQoSystem for declarative distributed applications with SLAs http://research.msrg.utoronto.ca/Eqosystem/ http://research.msrg.utoronto.ca/Eqosystem The Micro-ToPSS event processing middleware for sensor networks http://microToPSS.msrg.utoronto.ca/ http://microToPSS.msrg.utoronto.ca/ Mobile-ToPSS – publish/subscribe for mobile and location-based applications http://research.msrg.utoronto.ca/Mobile/ http://research.msrg.utoronto.ca/Mobile/ ToPSS - the Toronto Publish/Subscribe System Family Portal http://www.ToPSS.biz (coming soon ) http://www.ToPSS.biz Quantifying events in software to increase modularity & customization in C- based systems and software-based product lines http://www.AspeCtC.net (ACC - the AspeCt-oriented C compiler) http://www.AspeCtC.net The Middleware Systems Research Group http://www.msrg.utoronto.ca http://www.msrg.utoronto.ca My web site http://www.eecg.toronto.edu/~jacobsen http://www.eecg.toronto.edu/~jacobsen @ the University of Toronto The DEBS Conference http://www.debs.org July 2009 at Vanderbilt U. Everything events Portal http://www.event-based.org
52
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 Questions? A D R E S P
53
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen University of Oslo, February 2009 Benefits of Content-based Publish/Subscribe Simplifies IT development and maintenance by decoupling enterprise components Supports sophisticated interactions among components using expressive subscription languages – going beyond the limits of topics Allows fine-grained queries and event management Achieves scalability with in-network filtering and processing
54
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Faster Matching with TIDs Subscriptions are augmented with TIDs only once at the first broker. Other brokers can route the subscription based on the TID alone. Similar argument applies to publication routing. 2 34 5 1 6 Adv 1 Adv 2 S X S Adv1 S Adv2 University of Oslo, February 2009
55
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Sparser Topology University of Oslo, February 2009
56
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Effect of Subscriber Distance DistanceFixed(ms)Dynamic(ms)Improvement 6 Hops47.20247.568-0.78% 10 Hops64.47752.89517.96% 12 Hops74.41660.59818.57% Max Diff57.65%27.39% University of Oslo, February 2009
57
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen More Publishers University of Oslo, February 2009
58
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Publication Burst University of Oslo, February 2009
59
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen More Results Faster matching 1926 publications cause 16997 times of matching operations in the “Dense Topology” experiment. About 89% of the matching operations can be saved if we apply the TID-based faster matching. Overhead of dynamic publication routing Average CPU usage: 6.3% more than the Fixed routing Average memory usage: 8.9% more than the Fixed routing University of Oslo, February 2009
60
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen CS Routing Traffic University of Oslo, February 2009
61
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Summary Minimize redundant traffic induced by cycles Improve scalability and robustness of pub/sub systems by offering routing path alternatives Enable flexible composite subscription routing Simplify solutions for failure recovery and load balancing University of Oslo, February 2009
62
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Cost Model Routing cost of CS RC B (CS)) = Σ i T in *|P(CS Bi )| + Σ i T matching *|P(CS Bi )| + Σ i T out_i *|P(CS)| Selection factor (SF) SF A (S) = |σ S P(A)| / |P(A)| e.g., SF A (a = v) = 1 / (max - min) Subscription cardinality |P(S)| = Σ i r i * SF Ai (S) |P(S l )| + |P(S r )| if op = or |P(CS)| = min (|P(S l )|, |P(S r )|) if op = and Rete input output s University of Oslo, February 2009
63
MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Fast Matching 1926 publications cause 16997 matching operations in the “Dense Topology” experiment. 89% of the matching operations can be saved with TID-based fast matching. University of Oslo, February 2009
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.