Ludger Fiege, [email protected] TU Darmstadt, Germany Slide 1 A Modular Approach to Build Structured...
-
Upload
scarlett-pope -
Category
Documents
-
view
213 -
download
1
Transcript of Ludger Fiege, [email protected] TU Darmstadt, Germany Slide 1 A Modular Approach to Build Structured...
Ludger Fiege, [email protected] Darmstadt, Germany Slide 1
A Modular Approach to Build A Modular Approach to Build Structured Event-based SystemsStructured Event-based Systems
Ludger FiegeLudger Fiege
Dep. of Computer ScienceDep. of Computer Science
TU Darmstadt, GermanyTU Darmstadt, Germany
fiegefiege@@acmacm.org.org
Ludger Fiege, [email protected] Darmstadt, Germany Slide 2
AgendaAgenda
Publish/subscribe and Event-based systemsPublish/subscribe and Event-based systems Current deficiencies and a solution…Current deficiencies and a solution… Scoping Scoping constrains visibilityconstrains visibility Event mappingsEvent mappings cope with heterogeneity cope with heterogeneity Modular implementationModular implementation ConclusionConclusion
Ludger Fiege, [email protected] Darmstadt, Germany Slide 3
Publish/Subscribe SystemsPublish/Subscribe Systemsaka Event-based Systemsaka Event-based Systems
Set of clientsSet of clients– Communicate with Communicate with
notificatitonsnotificatitons– ProducersProducers publish publish
notificationsnotifications– Consumers Consumers subscribe to subscribe to
kinds of notificationskinds of notifications
Notification service Notification service transmits notificationstransmits notifications
P/S
n
n n
Producer1.
2.2.
Consumer subscribed to“/Weather/London”
Notification“/Weather/London”
Consumer subscribed“/Weather/Berlin”
“/Weather/*”
Ludger Fiege, [email protected] Darmstadt, Germany Slide 4
Event-based SystemsEvent-based Systems
Pub/Sub and messaging are implementation Pub/Sub and messaging are implementation techniquestechniques
Characteristics of Event-based cooperation:Characteristics of Event-based cooperation:– Initiator of communication: ProducerInitiator of communication: Producer– Addressee: Not specifiedAddressee: Not specified
No explicit dependencies, loose couplingNo explicit dependencies, loose coupling
Ludger Fiege, [email protected] Darmstadt, Germany Slide 5
Simple Event-based SystemSimple Event-based System
Black box specificationBlack box specification– Interface descriptionInterface description
Interface operations:Interface operations:– SubSub(X,F), (X,F), UnsubUnsub(X,F)(X,F)– PubPub(Y,n)(Y,n)– NotifyNotify(X,n)(X,n)
X Y
Notification Service
Clients
n
F
Ludger Fiege, [email protected] Darmstadt, Germany Slide 6
Simple Event-based System Simple Event-based System SpecificationSpecification
BasedBased on LTLon LTL::– SafetySafety::
NotifyNotify(X,n) (X,n) previously [ previously [PubPub(Y,n) (Y,n) SubSub(X,F)], n (X,F)], n F F
– Liveness:Liveness:SubSub(X,F) (X,F) eventually ( eventually (PubPub(Y,n) (Y,n) n n F F NotifyNotify(X,n)) (X,n))
Ludger Fiege, [email protected] Darmstadt, Germany Slide 7
Simple Event-based SystemSimple Event-based SystemPossiblePossible Implementation Implementation
Implementation:Implementation:– Network of brokersNetwork of brokers– FloodingFlooding
or content-based filtering, etc.or content-based filtering, etc.
Notification Service
Ludger Fiege, [email protected] Darmstadt, Germany Slide 8
Deficiencies of Event-based SystemsDeficiencies of Event-based Systems
Concentration on efficiency, but…Concentration on efficiency, but… Complexity of large system design and Complexity of large system design and
administration disregardedadministration disregarded Flat address spaceFlat address space No information hidingNo information hiding
Lacking module conceptLacking module concept
Side effects !Side effects !
Ludger Fiege, [email protected] Darmstadt, Germany Slide 9
ScopesScopes
Scopes constrain the visibility of notificationsScopes constrain the visibility of notifications– External control of delivery destinations External control of delivery destinations – VisibilityVisibility as first-class conceptas first-class concept
Structure not only induced by namespaces or filtersStructure not only induced by namespaces or filters Clients are not aware of the scoping structureClients are not aware of the scoping structure
n nX
F
Scope 1
Y F
Scope 2
Ludger Fiege, [email protected] Darmstadt, Germany Slide 10
Clients and scopes are arranged in a DAGClients and scopes are arranged in a DAG Visibility:Visibility:
v(X,Y) v(X,Y) X=Y X=Y v(Y,X) v(Y,X) X‘ X‘ supersuper(X): v(X‘,Y)(X): v(X‘,Y)
v(1,2) v(1,3) v(3,4)v(1,2) v(1,3) v(3,4) Visibility roots determineVisibility roots determine
recipientsrecipientsv(X,Y) v(X,Y) Roots(X) Roots(X) Roots(Y) Roots(Y) {} {}
Scope GraphsScope Graphs
31 42
Vis. roots
nn
n
n
n
n
Ludger Fiege, [email protected] Darmstadt, Germany Slide 11
Event System with ScopesEvent System with Scopes
SafetySafetyNotify(X,n) Notify(X,n) prev. Pub(Y,n) prev. Pub(Y,n) Sub(X,F) Sub(X,F)
v(X,Y) v(X,Y), n , n F F
LivenessLivenessSub(X,F) Sub(X,F) [ [v(X,Y) v(X,Y) (Pub(Y,n) (Pub(Y,n) n n F F
Notify(X,n))]Notify(X,n))]
Ludger Fiege, [email protected] Darmstadt, Germany Slide 12
Event System with ScopesEvent System with ScopesImplementationImplementation
Build on top of a simple systemBuild on top of a simple system– Client codeClient code– Scoped system APIScoped system API
Manages list of vis. rootsManages list of vis. roots Add list of vis. roots to Add list of vis. roots to
notifications and filtersnotifications and filters
– Simple system APISimple system API
Simple system
Scoped system
Ludger Fiege, [email protected] Darmstadt, Germany Slide 13
Event MappingsEvent Mappings
Event mappingsEvent mappings– Discard or transform events at scope boundariesDiscard or transform events at scope boundaries– Can be bound to any edge in the scope graphCan be bound to any edge in the scope graph
Scope interfacesScope interfaces– Map notification to Map notification to – Constrain Constrain SubSub() and () and PubPub() of scopes() of scopes
Heterogeneous environmentsHeterogeneous environments– Varying event syntax and semanticsVarying event syntax and semantics– Internal vs. external representationsInternal vs. external representations
Ludger Fiege, [email protected] Darmstadt, Germany Slide 14
Scope Interface ExampleScope Interface Example
Assume clients 2,3,4 subscribed to “n”Assume clients 2,3,4 subscribed to “n” Visibility is refined: e.g. v(1,4)Visibility is refined: e.g. v(1,4)
3
1 2
n n
n
n n
n3
4
Ludger Fiege, [email protected] Darmstadt, Germany Slide 15
Heterogeneity ExampleHeterogeneity Example
3
1 2
n n´
n n´
n
n´
n
Ludger Fiege, [email protected] Darmstadt, Germany Slide 16
Scoped System with MappingsScoped System with Mappings
Implementation idea:Implementation idea:– Graph transformationGraph transformation– Mapping clientsMapping clients
31 2
n n´
n n´
31 2 n n´n n´
Ludger Fiege, [email protected] Darmstadt, Germany Slide 17
ContributionsContributions
Scoping in event-based systemsScoping in event-based systems– First-class structuring mechanismFirst-class structuring mechanism
Event mappings: Heterogeneity ofEvent mappings: Heterogeneity of– Application environmentApplication environment– Event service semantics / implementationEvent service semantics / implementation
Modular implementation, modularity supportModular implementation, modularity support Formal specification ofFormal specification of
– Simple Publish/subscribe Simple Publish/subscribe – scoping, mapping extensionsscoping, mapping extensions
Ludger Fiege, [email protected] Darmstadt, Germany Slide 18
QuestionsQuestions??
Ludger FiegeLudger Fiege
Dep. of Computer ScienceDep. of Computer Science
TU Darmstadt, GermanyTU Darmstadt, Germany
fiegefiege@@acmacm..orgorg