180 likes | 347 Views
A Modular Approach to Build Structured Event-based Systems. Ludger Fiege Dep. of Computer Science TU Darmstadt, Germany fiege@acm.org. Agenda. Publish/subscribe and Event-based systems Current deficiencies and a solution… Scoping constrains visibility
E N D
A Modular Approach to Build Structured Event-based Systems Ludger Fiege Dep. of Computer Science TU Darmstadt, Germany fiege@acm.org Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 1
Agenda • Publish/subscribe and Event-based systems • Current deficiencies and a solution… • Scoping constrains visibility • Event mappings cope with heterogeneity • Modular implementation • Conclusion Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 2
n n n Publish/Subscribe Systemsaka Event-based Systems • Set of clients • Communicate with notificatitons • Producers publish notifications • Consumers subscribe to kinds of notifications • Notification service transmits notifications Notification “/Weather/London” Producer 1. P/S Consumer subscribed “/Weather/Berlin” 2. 2. Consumer subscribed to “/Weather/London” “/Weather/*” Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 3
Event-based Systems • Pub/Sub and messaging are implementation techniques • Characteristics of Event-based cooperation: • Initiator of communication: Producer • Addressee: Not specified • No explicit dependencies, loose coupling Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 4
Notification Service Simple Event-based System • Black box specification • Interface description • Interface operations: • Sub(X,F), Unsub(X,F) • Pub(Y,n) • Notify(X,n) Clients X Y F n Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 5
Simple Event-based System Specification • Basedon LTL: • Safety: Notify(X,n) previously [Pub(Y,n) Sub(X,F)], n F • Liveness: Sub(X,F) eventually (Pub(Y,n) n F Notify(X,n)) Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 6
Notification Service Simple Event-based SystemPossible Implementation • Implementation: • Network of brokers • Floodingor content-based filtering, etc. Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 7
Deficiencies of Event-based Systems • Concentration on efficiency, but… • Complexity of large system design and administration disregarded • Flat address space • No information hiding • Lacking module concept Side effects ! Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 8
n n Scopes • Scopes constrain the visibility of notifications • External control of delivery destinations • Visibilityas first-class concept • Structure not only induced by namespaces or filters • Clients are not aware of the scoping structure Scope 1 Scope 2 F F X Y Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 9
n n n n n n Scope Graphs • Clients and scopes are arranged in a DAG • Visibility: v(X,Y) X=Y v(Y,X) X‘ super(X): v(X‘,Y) • v(1,2) v(1,3) v(3,4) • Visibility roots determinerecipients v(X,Y) Roots(X) Roots(Y) {} Vis. roots 2 1 3 4 Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 10
Event System with Scopes • Safety Notify(X,n) prev. Pub(Y,n) Sub(X,F) v(X,Y), n F • Liveness Sub(X,F) [v(X,Y) (Pub(Y,n) n F Notify(X,n))] Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 11
Event System with ScopesImplementation • Build on top of a simple system • Client code • Scoped system API • Manages list of vis. roots • Add list of vis. roots to notifications and filters • Simple system API Simple system Scoped system Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 12
Event Mappings • Event mappings • Discard or transform events at scope boundaries • Can be bound to any edge in the scope graph • Scope interfaces • Map notification to • Constrain Sub() and Pub() of scopes • Heterogeneous environments • Varying event syntax and semantics • Internal vs. external representations Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 13
Scope Interface Example • Assume clients 2,3,4 subscribed to “n” • Visibility is refined: e.g. v(1,4) n n n n 4 3 3 n n 1 2 Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 14
Heterogeneity Example n n´ n n´ n´ 3 n n 1 2 Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 15
Scoped System with Mappings • Implementation idea: • Graph transformation • Mapping clients n n´ n n´ 3 n n´ n n´ 3 1 2 1 2 Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 16
Contributions • Scoping in event-based systems • First-class structuring mechanism • Event mappings: Heterogeneity of • Application environment • Event service semantics / implementation • Modular implementation, modularity support • Formal specification of • Simple Publish/subscribe • scoping, mapping extensions Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 17
Questions? Ludger Fiege Dep. of Computer Science TU Darmstadt, Germany fiege@acm.org Ludger Fiege, fiege@acm.orgTU Darmstadt, Germany Slide 18