Presentation is loading. Please wait.

Presentation is loading. Please wait.

Event Processing with the PADRES Publish/Subscribe System Hans-Arno Jacobsen Bell University Laboratory Chair Middleware Systems Research Group University.

Similar presentations


Presentation on theme: "Event Processing with the PADRES Publish/Subscribe System Hans-Arno Jacobsen Bell University Laboratory Chair Middleware Systems Research Group University."— Presentation transcript:

1 Event Processing with the PADRES Publish/Subscribe System Hans-Arno Jacobsen Bell University Laboratory Chair Middleware Systems Research Group University of Toronto MIDDLEWARE SYSTEMS RESEARCH GROUP http://www.padres.msrg.utoronto.ca The PADRES Team

2 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Current PADRES Team Chen Chen Alex Cheung Alton Chiu Amer Farroukh Patrick Lee Guoli Li Bala Maniymaran Serge Mankovskii, CA Vinod Muthusamy Reza Sherafat Naweed Tajuddin Chunyang Ye Young Yoon Countless alumni (see our web site.) PADRES started around 2004 2 CANOE Summer School, Norway, 2009

3 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Try it out: Java Kick Start PADRES! http://www.padres.msrg.utoronto.ca 3 CANOE Summer School, Norway, 2009

4 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Querying the Future 4 CANOE Summer School, Norway, 2009

5 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Amazon to Chapters to You.... Monday, October 10th in Cyberspace Your book “...” is available at.... $10 off Thursday, November 15th, in Toronto 5 CANOE Summer School, Norway, 2009

6 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Border Security Scenario [class,manifest],[shipID,ACME123],[firm,ACME] [class,audit], [firm,ACME], [trust, 0] [class, reading],[shipID,ACME123],[level, 4] 6 CANOE Summer School, Norway, 2009

7 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen 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 Request Submission Request Approval Check Completion 7 CANOE Summer School, Norway, 2009

8 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen 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 8 CANOE Summer School, Norway, 2009

9 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen 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. 9 CANOE Summer School, Norway, 2009

10 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen 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  Radioactivity is detected Abstractly speaking events are disseminated and filtered against expressions or queries events queries 10 CANOE Summer School, Norway, 2009

11 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen What Event Processing Support is Required ? De-coupled & loosely coupled many-to-many interactions Fine-grained filtering In-network processing Composite event detection and event correlation Event dissemination 11 CANOE Summer School, Norway, 2009

12 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen 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 12 CANOE Summer School, Norway, 2009

13 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen What is an event? Etymology  Latin: eventus; evenire to happen; e- + venire to come 13 CANOE Summer School, Norway, 2009

14 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Various Interpretations A postulated outcome, something that follows as a result or consequence, condition, or eventuality; “in the event that I am not there, you may …” Any of the contests in a program of sports, a social occasion or activity, a world event The fundamental entity of observed physical reality represented by a point designated by three coordinates of place and one of time in the space-time continuum postulated by the theory of relativity A subset of the possible outcomes of an experiment (probabilities) Something that happens, a noteworthy happening, an occurrence 14 CANOE Summer School, Norway, 2009

15 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Event – My Working Definition An event is an instantaneous and asynchronous state transition in the environment of interest to applications, systems, users. Event versus event occurrence  Like type or class versus instance In my definition events do not extend over time  Interval events are defined by starting and ending events (a.k.a. composite events) My definition does not capture world events  Maybe important for a theory of events, but less so for the effective processing of events My definition does not capture interval events  Events associated with a time span, but those can be modeled as composite events 15 CANOE Summer School, Norway, 2009

16 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Synonymously Used The terms Event Event occurrence (Event) message Event object are often used synonymously in practice. Also the pattern for detecting an event is often simply referred to as event. 16 CANOE Summer School, Norway, 2009

17 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Similarly, … Event source Event producer Event generation Event publisher … sink … consumer … capture … subscriber 17 CANOE Summer School, Norway, 2009

18 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Event Processing Event Processing is an emerging area and discipline that aims to define and develop  Abstractions  Architectures  Systems  Languages  Patterns  Models  Standards for the processing of events in systems, applications, and by end users. 18 CANOE Summer School, Norway, 2009

19 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen A Note on CEP Complex Event Processing (CEP) Event processing must not be complex  Or else, a marketing nightmare, I suspect  Meant was probably Complex-event Processing  Or maybe the processing of complex events Not the complex processing of events Let’s just keep to Event Processing and try to make it as simple as possible, 19 CANOE Summer School, Norway, 2009

20 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Events Many applications are inherently event- based. An event is an instantaneous and asynchronous state transition in the environment of interest to applications, systems, users. 20 CANOE Summer School, Norway, 2009

21 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Agenda What is the right abstractions for processing events? Our point of view PADRES Event & Services Bus (ESB ) Innovative & Advanced Features Building Applications with PADRES 21 CANOE Summer School, Norway, 2009

22 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen What Abstractions Do Not Work? Databases  Great for managing historic data  But what about future data (e.g., events) Data streams  Great for managing structured streams of tuples  But what about un-structured, multi-typed, sporadic, un- ordered 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 environments Cum gran salis 22 CANOE Summer School, Norway, 2009

23 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen 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. 23 CANOE Summer School, Norway, 2009

24 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen 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 24 CANOE Summer School, Norway, 2009

25 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen 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) 25 CANOE Summer School, Norway, 2009

26 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen 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 26 CANOE Summer School, Norway, 2009

27 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen The Content-based Model Language and data model  Boolean functions over predicates  Predicates are attribute-operator-value triples [class = reading]  Subscriptions are conjunctions of predicates [class = reading],[level > 3]  Publications are sets of attribute-value pairs [class,reading],[level,3],[id,5637] P/S events notifications 27 CANOE Summer School, Norway, 2009

28 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Publish/Subscribe Matching Problem Given a set of subscriptions, S, and a publication, e, return all s in S matched by e. e is referred to as event or publication Splitting hairs  The Event is the state transition of interest in the environment  The Publication is the information about the event submitted to the publish/subscribe system Simple problem statement, widely applicable, and lots of open questions 28 CANOE Summer School, Norway, 2009

29 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Scope of the Content-based Model Matching semantic  A subscription matches if all its predicates match  Approximate semantic (e.g., close to, cheap, sunny)  Semantic and similarity-based matching  Probabilistic …  Top-k matches 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 29 CANOE Summer School, Norway, 2009

30 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] [class,=,stock],[symbol,=,MSFT],[price,>,50] [class,=,stock],[symbol,=,YHOO] [class,=,stock],[price,>,40] A2 S1 [class, stock],[symbol, YHOO],[price,25] [class, stock],[symbol, YHOO],[price,45] [class, stock],[symbol, MSFT],[price, 55] 30 CANOE Summer School, Norway, 2009

31 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] 31 CANOE Summer School, Norway, 2009

32 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Publish/Subscribe in Industry Standards  CORBA Event Service  CORBA Notification Service  OMG Data Dissemination Service  Java Messaging Service  WS Eventing  WS Notification, WS Topics, WS Brokered Notifications  INFO-D (Grid Forum)  AMQP Emerging technologies  RSS aggregators PubSub.com, FeedTree  Real-time data dissemination TIBCO, RTI Inc., Mantara Software  Application integration Softwired  Hardware-based brokers Sarvega (Intel), Solace Systems, DataPower (IBM) 32 CANOE Summer School, Norway, 2009

33 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Publish/Subscribe in Academia Research projects  Elvin (Australia)  Gryphon (IBM)  Hermes (Cambridge)  LeSubscribe (INRIA)  PADRES (Toronto)  REBECA (Darmstadt)  SIENA (Boulder)  ToPSS (Toronto) … many more 33 CANOE Summer School, Norway, 2009

34 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen 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) 34 CANOE Summer School, Norway, 2009

35 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Publish/Subscribe Decoupling and interaction among many sources & many sinks Event filtering & matching Event & data dissemination Query the future (relaxed later) Service orchestration and choreography 35 CANOE Summer School, Norway, 2009

36 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Agenda PADRES Event & Services Bus (ESB )  PADRES ESB & Vision  PADRES Event Language  PADRES Internals Innovative & Advanced Features Building Applications with PADRES 36 CANOE Summer School, Norway, 2009

37 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen PADRES Events & Services 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 37 CANOE Summer School, Norway, 2009

38 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen 2015-10-19 38 PADRES Vision 38 CANOE Summer School, Norway, 2009

39 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen PADRES Events & Services 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 development Available under the Eclipse Public License (EPL) – a BSD-like open (source) license model http://padres.msrg.utoronto.ca ! 39 CANOE Summer School, Norway, 2009

40 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen PADRES EVENT LANGUAGE 40 CANOE Summer School, Norway, 2009

41 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen PADRES Event Language Event schema Event instances (a.k.a., publications or events) Subscriptions (a.k.a., atomic subscriptions) Composite subscriptions Historic event queries (a.k.a., historic subscriptions) Combinations of the former The above are unified in the PADRES SQL (PSQL), not covered today. 41 CANOE Summer School, Norway, 2009

42 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen PADRES Event Language Event schema: Advertisements  A1: [class,=,reading], [shipID,=,*], [level,<,10]  A2: [class,=,manifest], [shipID,=,*], [firm,=,*], [content,=,*]  A3: [class,=,audit], [firm,=,*], [trust,>=,0] Source: Publications / events  P1: [class, reading],[shipID,ACME123],[level, 4](induced from A1)  P2: [class, manifest],[shipID,ACME123],[firm,ACME](induced from A2)  P3: [class, reading],[shipID,ACME123],[level, 12] (not induced from A1) Sink: Atomic & (composite) subscriptions  S1: [class,=,reading], [level,>,3]  S2: [class,=,audit], [firm,=,*],[trust, >=, 3] 42 CANOE Summer School, Norway, 2009

43 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Composite Subscription I AND OR S1S2 OR S3S4 AND S5 CS={ {S 1 OR S 2 } AND {S 3 OR S 4 } AND S 5 } A composite event is the constellation of events being detected by the composite subscription. S i are atomic subscriptions. I.e., they are satisfied by a single, multi-attribute publication / event. Composite subscriptions (CS) are used for event correlation, in-network filtering, and the detection of composite events (complex event). Use of composite subscriptions: Event correlation Business process management (shown later) Business activity monitoring (shown later) 43 CANOE Summer School, Norway, 2009

44 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Composite Subscription II A composite subscription consists of atomic subscriptions connected by operators  AND, OR  Variable join Examples: [class,=,reading], [level,>,3] OR [class,=,audit], [firm,=,*], [trust, <=, 3] [class,=,reading], [shipID,=,$X], [level,>,3] AND [class,=,manifest], [shipID,=,$X], [firm,=,$Y], [content,!=,fertilizer] AND [class,=,audit], [firm,=,$Y], [trust,>,7] AND S1S2 S3 shipID firm 44 CANOE Summer School, Norway, 2009

45 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Atomic Historic Event Query Future atomic subscription Historic atomic subscription Hybrid atomic subscription now time # of events per match PastFuture [class,=,reading], [level,>,3] [class,=,reading], [level,>,3], [start_time,<,NOW] [class,=,reading], [level,>,3], [start_time,=,NOW-1h], [end_time,=,NOW+4h] 45 CANOE Summer School, Norway, 2009

46 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Composite Historic Event Query Future composite subscription Historic composite subscription Hybrid composite subscription now time PastFuture [class,=,manifest],[firm,=,$X],[start_time,<,NOW] AND [class,=,audit],[firm,=,$X],[trust,>,7],[start_time,<,NOW] # of events per match [class,=,reading],[level,>,3],[shipID,=,$X] AND [class,=, manifest], [shipID,=,$X],[content,!=fertilizer] [class,=,reading],[shipID,=,$X],[level,>,3] AND [class,=,manifest],[shipID,=,$X],[firm,=,$Y], [content,!=,fertilizer] AND [class,=,audit],[firm,=,$Y],[trust,>,7], [start_time,=,now-2 months] 46 CANOE Summer School, Norway, 2009

47 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen PADRES Event Language Queries about future events Queries about past events Queries that express composite events over past and future 47 CANOE Summer School, Norway, 2009

48 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen PADRES INTERNALS 48 CANOE Summer School, Norway, 2009

49 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen B B B S S P B P B input queue output queue B2 output queue B3 B1 B2 B3 P S = publisher = subscriber subscriptiondest Matching Engine Routing Table + temperature > 37 B2 temperature > 40 B3 Publications temperature = 38temperature = 42temperature = 36 PADRES Broker 49 CANOE Summer School, Norway, 2009

50 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Broker Internals & Routing Tables the International CANOE Summer School, Norway, 2009 Queue Handler Pre Processor Post Processor Forwarder PADRES Broker Matcher Input Queue Output Queues PRT SRT Pub/Sub Messages If sub intersectsSend to [class,=,foo],[attr,>,17] B2 If pub matchesSend to [class,=,foo],[attr,>,20] B3 B1 B2 B3 B4 AdvertisementSubscriptionPublication If sub intersectsSend to [class,=,foo],[attr,>,17] B2 [class,=,foo],[attr,>,5]B3 s S1 [class,=,foo],[attr,>,30] If sub intersects Send to [class,=,foo],[attr,>,20]B2 [class,=,foo],[attr,>,30]B1 S1 S2 [class,=,foo],[attr,<,4] [class,foo],[attr,24][class,foo],[attr,11] s S1S2 S S1 S2 50 CANOE Summer School, Norway, 2009

51 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Algorithm: Subscription Insertion Root class,=,reading AND class,=,manifest level,>,3content,!=,fertilizer S1S2 AND shipID,=,$X firm,=,$Y trust,>,7 class,=,audit CS S1: [class,=,reading],[level,>,3]S2: [class,=,manifest],[content,!=,fertilizer] CS: [class,=,reading],[level,>,3],[shipID,=,$X] AND [class,=,manifest],[content,!=,fertilizer],[shipID,=,$X],[firm,=,$Y] AND [class,=,audit],[firm,=,$Y],[trust,>,7] AND S1S2 S3 shipID firm 51 CANOE Summer School, Norway, 2009

52 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Algorithm: Event Matching Root class,=,reading AND class,=,manifest level,>,3content,!=,fertilizer S1S2 AND shipID,=,$X firm,=,$Y trust,>,7 class,=,audit CS [class, reading],[level,6],[shipID,ACME123][class, manifest],[content,stone],[firm,ACME],[shipID,ACME123][class, audit], [firm,ACME],[trust,10] AND S1S2 S3 shipID firm 52 CANOE Summer School, Norway, 2009

53 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Routing & Matching Content-based matching Can emulate topic-based model Built-in composite subscription processing Initially based on JESS expert system shell Replaced by our own Rete-like matching due to limited control over JESS engine 53 CANOE Summer School, Norway, 2009

54 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Agenda PADRES Event & Services Bus Innovative & Advanced Features  Composite Event Detection  Historic Event Query  Robustness and Resilience  Cost-based Event Routing & Detection Building applications with PADRES 54 CANOE Summer School, Norway, 2009

55 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Innovative & Advanced Features A BC D E F Composite Events Historic Access Management Robustness Load Balancing Security 55 CANOE Summer School, Norway, 2009

56 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen COMPOSITE EVENT DETECTION 56 CANOE Summer School, Norway, 2009

57 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Composite Event Detection Simple CS routing 1 43 2 P P P AND S1S2 AND S3 6 S p2p2 p3p3 5 cs cs’ cs s1s1 s2s2 p 123 s3s3 p1p1 57 CANOE Summer School, Norway, 2009

58 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Composite Event Detection p1p1 1 43 2 P P P AND S1S2 AND S3 6 S Topology-based CS routing p2p2 p3p3 5 cs cs’ cs cs’ s1s1 s3s3 s2s2 p 12 p 123 cs 58 CANOE Summer School, Norway, 2009

59 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen HISTORIC EVENT QUERY 59 CANOE Summer School, Norway, 2009

60 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Historic Event Query DB Admin Publisher Subscriber P1P2 P3 P4P5 Publication space P(A) 1 3 2 4 6 5 P S Partition the publication space Assign partitions Partition 1 2 3 45 60 CANOE Summer School, Norway, 2009

61 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Assigning A Partition AdvertisementSubscriptionPublication DB Admin Publisher Subscriber [class,DB_CONTROL],[command,STORE],[db,B3-DB],[partition_spec,`[class,=,reading],[level,>,0]`][class,=,reading],[level,>,0] Partition 1 2 3 4 5 11 2 Partitioning Partial replication Full replication 1 2 34 6 5 P S [class,DB_CONTROL],[command,STORE],[db,B3-DB], [partition_spec,” [class,=,reading],[level,>,0] ”] 61 CANOE Summer School, Norway, 2009

62 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen ROBUSTNESS, RESILIENCE & COST-BASED ROUTING 62 CANOE Summer School, Norway, 2009

63 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen PPP P Robust Self-healing Adaptive Flexible Congested Link General Overlay Network P S P P 63 CANOE Summer School, Norway, 2009

64 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Challenges With General Overlays Subscriptions are routed in loops Brokers receive duplicate subscriptions Subscription copies exacerbate the problem Same problem for publications 2 34 5 1 6 Adv 1 Adv 2 S X S S 64 CANOE Summer School, Norway, 2009

65 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen TID-based Routing Approach Each advertisement is assigned a unique tree identifier (TID) Each subscription has a TID predicate with a variable 2 34 5 1 6 Adv 1 Adv 2 X S 65 CANOE Summer School, Norway, 2009

66 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Subscription Routing 2 34 5 1 6 Adv 1 Adv 2 X S: [class=stock][symbol=*] [TID=$Z] At Broker 1: Adv1: [class=stock][symbol=IBM] [TID=Adv1] Adv2: [class=stock][symbol=HP] [TID=Adv2] S matching Adv1: [class=stock][symbol=*][TID=Adv1] S matching Adv2: [class=stock][symbol=*] [TID=Adv2] S A2 S A1 S 66 CANOE Summer School, Norway, 2009

67 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Publication Routing Each publication is assigned the TID of its matching advertisement  e.g., p [class, stock][symbol,HP][TID, adv_msg_id] Publications are routed:  Fixed TID routing: a publication is routed to subscribers along its advertisement tree.  Dynamic publication routing: a publication may be routed to subscribers across advertisement trees. 67 CANOE Summer School, Norway, 2009

68 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Fixed TID Routing Property  No broker receives duplicate publication messages 2 34 5 1 6 Adv 1 Adv 2 Sub X P P 68 CANOE Summer School, Norway, 2009

69 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Dynamic Publication Routing Publication’s TID is changeable Routing heuristic  Util = R output / R sending Property  Changing a publication’s TID while in transit will not change the set of notified subscribers. 2 34 5 1 6 Adv 1 Adv 2 Sub X P 69 CANOE Summer School, Norway, 2009

70 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Side Effect: Faster Matching 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. 70 CANOE Summer School, Norway, 2009

71 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Evaluation 32 overlay brokers, 20 publishers, 30 subscribers 20 machines & PlanetLab Workload  http://research.msrg.utoronto.ca/Padres/DataSets http://research.msrg.utoronto.ca/Padres/DataSets  Yahoo!Finance stock quote traces 71 CANOE Summer School, Norway, 2009

72 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Dense vs. Sparser Topologies 20% 4% Note: The benefit is not proportional to the connection degree. 72 CANOE Summer School, Norway, 2009

73 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen On PlanetLab 73 CANOE Summer School, Norway, 2009

74 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen High Publication Rate stabilized 74 CANOE Summer School, Norway, 2009

75 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Publication Burst Burst 1500msg/min 75 CANOE Summer School, Norway, 2009

76 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen With Broker Failures 1 st failure 2 nd failure 76 CANOE Summer School, Norway, 2009

77 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Advantages of TID-based Routing Retains the publish/subscribe client interface Speeds up subscription and publication matching Avoids duplicate subscriptions and publications Routes publications dynamically across multiple alternative paths Enables routing around failures, congestion and load imbalances 77 CANOE Summer School, Norway, 2009

78 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen COST-BASED EVENT ROUTING & DETECTION 78 CANOE Summer School, Norway, 2009

79 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Implications for CS Routing CS may be routed 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) 79 CANOE Summer School, Norway, 2009

80 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} ANDS3} CS S2 S3 S1 CS’ Adv 3 Broker 4 and 8 are the join point brokers 80 CANOE Summer School, Norway, 2009

81 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Dynamic CS Routing (DCSR) 2 34 5 1 6 Adv 1 Adv 2 7 8 9 CS={{S1 AND S2} ANDS3} CS S2 S3 S1 CS’ Adv 3 Broker 5 and 8 are the join point brokers 81 CANOE Summer School, Norway, 2009

82 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Dynamic Join Point Movement 2 34 5 1 6 Adv 1 Adv 2 7 8 9 CS={{S1 AND S2} ANDS3} CS S1 CS’ Adv 3 Broker 1 and 8 are the join point brokers 82 CANOE Summer School, Norway, 2009

83 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Composite Event Detection 83 CANOE Summer School, Norway, 2009

84 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen BUILDING APPLICATIONS WITH PADRES 84 CANOE Summer School, Norway, 2009

85 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Applications Built with PADRES Semantic data fusion in sensor networks (DEBS’07) Service selection (DEBS’08) Resource discovery (DEBS’09) Job scheduling (Middleware’04) Business process execution Business activity monitoring SLA monitoring & control (CASCON’08 & ’09) … 85 CANOE Summer School, Norway, 2009

86 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen sub/advs Job D sub/advs Job C sub/advs Job B Business Process Deployment PADRES Broker Overlay sub/advs Reply sub/advs Receive sub/advs Assign sub/advs Invoke sub/advs Receive 1 2 34 6 5 BPEL Receive Assign Flow InvokeWait Reply Deployer Activity Agent Process Deployer 86 CANOE Summer School, Norway, 2009

87 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Distributed BPEL Execution PADRES Broker Overlay 1 34 5 BPEL Receive Assign Flow InvokeWait Reply 2 WS Gateway Agent 6 END WS Client Web Service HTTP/SOAP Pub/Sub 87 CANOE Summer School, Norway, 2009

88 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Evaluation Setup  Cluster with 20 nodes  Different approaches Centralized Clustered Distributed  Workloads BPEL process with 2 external Web services Parallel: BPEL process with 10 parallel branches Sequential: BPEL process with 2 parallel branches 88 CANOE Summer School, Norway, 2009

89 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Changing Request Rate 89 CANOE Summer School, Norway, 2009

90 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Sequential vs. Parallel (a) Sequence Process (b) Parallel Process 90 CANOE Summer School, Norway, 2009

91 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Publish/Subscribe Not just message dissemination Viable solution for building event processing networks and event-based applications Besides dissemination and decoupling, pub/sub offers efficient  Event filtering  Event correlation  In-network event processing 91 CANOE Summer School, Norway, 2009

92 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Summary: 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 92 CANOE Summer School, Norway, 2009

93 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Conclusions The right abstraction for event processing is content-based publish/subscribe - IMHO Event processing & publish/subscribe are interesting research areas. ToPSS and PADRES explore many aspects of these areas. http://padres.msrg.utoronto.ca 93 CANOE Summer School, Norway, 2009

94 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen 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 94 CANOE Summer School, Norway, 2009

95 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Questions? A D R E S P 95 CANOE Summer School, Norway, 2009

96 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Cost Model input queue output queue B1 output queue B2 subscriptiondest Matchin g Engine Routing Table + temperature > 37 B1 temperature > 40 B2 Routing cost of CS  RC(CS)) = + + Subscription cardinality  |P(S)| : The number of matching publications per unit of time.  |P(S)| =  |P(CS)| = |P(Sl)| + |P(Sr)| if op = OR 96 CANOE Summer School, Norway, 2009

97 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 97 CANOE Summer School, Norway, 2009

98 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Sparser Topology 98 CANOE Summer School, Norway, 2009

99 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% 99 CANOE Summer School, Norway, 2009

100 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen More Publishers 100 CANOE Summer School, Norway, 2009

101 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Publication Burst 101 CANOE Summer School, Norway, 2009

102 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 102 CANOE Summer School, Norway, 2009

103 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen CS Routing Traffic 103 CANOE Summer School, Norway, 2009

104 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 104 CANOE Summer School, Norway, 2009

105 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 105 CANOE Summer School, Norway, 2009

106 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. 106 CANOE Summer School, Norway, 2009

107 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen CS Routing Traffic 1. CS Subscriber 3. Join point broker of topology-based routing Msgs Simple routing Topology-based routing DCSR 2. Publisher with a higher publication rate 107 CANOE Summer School, Norway, 2009

108 MIDDLEWARE SYSTEMS RESEARCH GROUP Copyright © 2008 - Hans-Arno Jacobsen Dynamic Join Point Movement Msgs DCSR (static) DCSR (changing) Join Point Movement Publisher with a higher publication rate CS subscriber 108 CANOE Summer School, Norway, 2009


Download ppt "Event Processing with the PADRES Publish/Subscribe System Hans-Arno Jacobsen Bell University Laboratory Chair Middleware Systems Research Group University."

Similar presentations


Ads by Google