EE382N Distributed Systems PublishSubscribe Systems Ayis Ziotopoulos Srivatsan Sridharan - PowerPoint PPT Presentation

1 / 36
About This Presentation
Title:

EE382N Distributed Systems PublishSubscribe Systems Ayis Ziotopoulos Srivatsan Sridharan

Description:

Messaging Systems : an example. Motivating Example. Assume a car dealership for a large company ... of information is classified based on subjects: subject ... – PowerPoint PPT presentation

Number of Views:53
Avg rating:3.0/5.0
Slides: 37
Provided by: usersEc3
Category:

less

Transcript and Presenter's Notes

Title: EE382N Distributed Systems PublishSubscribe Systems Ayis Ziotopoulos Srivatsan Sridharan


1
EE382N Distributed SystemsPublish/Subscribe
SystemsAyis ZiotopoulosSrivatsan Sridharan
2
Contents
  • Introduction
  • Motivation
  • System overview
  • Research problems
  • Contributions
  • Conclusion

3
Introduction
  • Internetwide applications
  • Modern distributed systems
  • Messaging services

4
Messaging Systems an example
5
Motivating Example
  • Assume a car dealership for a large company
  • Sales representative sells a car
  • A request to manufacturing is sent
  • Payment done electronically
  • An update to sales department is sent
  • Various supporting software applications involved

6
Motivation
  • Lot's of small applications for different
    organizations combined due to e.g. vertical
    integration, merging, outsourcing etc.
  • Internet wide applications e.g. stock trading,
    sports event broadcasting
  • Loosely integrated distributed systems
  • Need for a 'glue' technology

7
Messaging Oriented Middleware
  • A new paradigm 'Message Oriented Middleware'
    (MOM)
  • Real-time events 'messages' available through
    Internet e.g. stock quotations, buy/sell offers,
    weather reports, etc.

8
Pub/Sub Architecture
  • Publishers
  • Subscribers
  • Brokers
  • Information flow graph

9
Pub/Sub Architecture
10
Alternatives to pub/sub systems
  • RMI
  • Database Systems
  • Group Communications Systems
  • Work-flow Systems

11
Issues with broker networks
  • Message Matching/Routing
  • match at the publisher/broadcast and match
    locally
  • main theme of this presentation!!!
  • Ordering
  • atomic broadcast / multicast
  • Optimistic Delivery
  • Reliability
  • Topology Changes
  • Security

12
Pub/Sub Systems
  • Subject based
  • Content based

13
Subject based pub/sub systems
  • A fixed set of subjects is predefined e.g. for a
    stock trading system define 'IBM', 'Microsoft'
    etc.
  • Each unit of information is classified based on
    subjects ltsubjectgt ltbodygt e.g. IBM some
    body

14
Subject based pub/sub systems advantages
  • Advantages
  • matching is trivial i.e. table lookup
  • multicast is trivial i.e. one multicast group per
    subject
  • simple, adopted by OMG for CORBA event channels
  • Key problems
  • 'coarse' resolution
  • scalability issues for large number of subscribers

15
Content based Pub/Sub systems
  • Define a number of
  • information spaces
  • and an associated event schema per space
  • e.g. an information space for stock quotes could
    contain the following event schema
    issuestring, pricedollar, volumeinteger
  • A subscription is a predicate against the event
    schema e.g. (issueIBM pricelt120 volumegt1000)

16
Content Based Pub/Sub Systems
  • Advantages
  • orthogonal criteria for searching.
  • No administrative overhead for defining and
    maintaining a large number of groups.
  • Key problems
  • Efficient matching of event against large number
    of subscribers on a single message broker.
  • Efficient multicast of messages within a network
    of message brokers.

17
Gryphon
  • A content-based distributed messaging system
  • Initiated in the spring of 1997 as a two-person
    exploratory project on publish/subscribe
    technology.
  • In fall 1997, it was identified as one of 5
    projects to receive exploratory research funding
    via the prestigious ASSR program at IBM's T. J.
    Watson research center.
  • The Gryphon system has been deployed over the
    Internet for real-time sports score distribution
    at the Grand Slam Tennis events, Ryder Cup, and
    for monitoring and statistics reporting at the
    Sydney Olympics.

18
Matching Events
  • 'Inverse' database problem
  • Matching-first
  • generate a matching list, O(N).
  • send message to all entries in this list.
  • impractical for large networks, with multiple
    copies of the same message on a link.
  • Flooding
  • message is multicast to all destinations, O(N).
  • perform matching at destination
  • unsuitable for many subscriptions with a small
    percentage of subscribers in each one

19
Key Idea
  • Use a more efficient data structure
  • Partial Search Tree
  • each subscription is a path from root to leaf of
    the tree.
  • follow all paths from root to leaves satisfying
    the event.
  • O(N) space, O(N(1-l)), 0 lt l lt 1, running time
  • Still non-distributed !!!

20
Matching Tree
21
Link Matching
  • Operate at broker level
  • Do not use destination lists (!!!)
  • On receiving an event, figure out which neighbour
    should receive it as well
  • Neighbours can be other brokers or subscribers
  • Use the PST to match the event

22
Trit Vector
  • How to keep track of which neighbour should
    receive an event?
  • Use a trit vector !!!
  • For each outgoing link store a value indicating
    whether to send matched events down that link
  • Possible values yes, no, maybe

23
Link Algorithm
  • Each broker has a copy of all the subscriptions
    organized in a PST
  • Each PST node in each broker is annotated with a
    trit vector
  • During start-up an initialization trit is
    computed at every broker.
  • At match time, the initialization mask for a
    broker is recursively refined until the broker
    has yes or no alone in its trits.

24
Updating the Trit Vector
  • Alternative combine
  • Apply to non edges
  • Take the least specific result of two annotations
  • Parallel combine
  • Merge the results of the alternative combine
    operations
  • Take the most liberal result of two annotations

25
Updating the Trit Vector
26
Optimizations
27
Optimizations
  • Collapse a chain of edges to a single one
  • For a path of n non- attributes compute and
    store the successor set
  • Aggressive static analysis
  • Use sub-trees for most common attributes

28
Research Problems
  • Inequality tests are not addressed
  • All attribute vocabularies are assumed to have
    same size
  • Order of attributes is not taken into account
  • Uniform distribution assumed for attributes
  • Single storage for subscriptions

29
Contributions
  • Distributions are rarely uniform
  • Locality in references exists
  • Serialize search starting from the most probable
    attribute
  • Simulated results show gains

30
Atomic Broadcast/Multicast
  • Order of messages is important too
  • Nodes can fail/come up at any time, still no
    message should be lost
  • Use a deterministic protocol to ensure this
  • Protocol should be independent of network
    delays/reordering of messages
  • Round-robin is inefficient
  • An instance of the atomic broadcast algorithm

31
Loggers and Mergers
32
Bias Algorithm
  • Integrity, Validity, Agreement, Total Order
  • Economical
  • Optimal w.r.t to total merge delay for two
    producers, asymptotically optimal for more
  • Assumes
  • FIFO between logger and merger
  • no losses
  • approximately synchronized clocks
  • expected message rate from every producer can be
    estimated
  • memoryless publisher processes

33
Bias Algorithm
  • Combine timestamps and knowledge of expected
    message rate for each process
  • Main idea use bias for each stream to 'delay'
    reception of messages

34
Bias Algorithm
35
References
  • 'A case for Message Oriented Middleware', G.
    Banavar et. al. , Proceedings of DISC 99.
  • 'Matching Events in a Content Subscription
    System', M. Aguilera et. al. , Principles of
    Distributed Computing 1999.
  • 'An Efficient Multicast Protocol for
    Content-Based Publish-Subscribe Systems', G.
    Banavar et. al. , International Conference on
    Distributed Computing Systems 1999.
  • 'Efficient Atomic Broadcast Using Deterministic
    Merge', M. Aguilera and R. Strom, Proceedings of
    PODC 2000
  • http//www.research.ibm.com/distributedmessaging/g
    ryphon.html

36
Questions???
Write a Comment
User Comments (0)
About PowerShow.com