SlideShare a Scribd company logo
1 of 25
Download to read offline
Towards Improved Data
      Dissemination
           of
Publish-Subscribe Systems
 Srinath Perera, Ramith Jayasinghe
          Dinesh Gamage
     Lanka Software Foundation
Outline
●   Outline of Pub/sub Paradigm
●   3 challenges
●   Avoiding Blocking IO
●   Avoiding Message accumulation through parallel
    message delivery
●   Working around Slow and unreliable consumers/
    publishers
●   OGCE workflow suite
●   Conclusions
Publish/ Subscribe Paradigm and
             Message Broker



●   Many Event sources that generate events
●   Subscribers notify their interest through
    subscriptions
●   Broker Matches and deliver events to
    Subscribers
Motivating Usecase
Goals of Message Broker
●   High throughput
●   Preserving Message Order for messages
    generated from same event source
●   Reduce publish to delivery time
Basic Message Broker Architecture
Goals of this Paper
●   Three architectural challenges
    ●   Blocking IO
    ●   Parallel Message Delivery
    ●   Unreliable Consumers
●   We explore architectural options in addressing
    these challenges
●   We have improved OGCE Messenger based
    on our observations and used that the test bed
    for this study.
Challenge 1: Blocking IO
●   Blocking IO assigns each request to a thread. Then
    the number of parallel clients are limited by number of
    threads.
●   Potential alternative is non-blocking IO, which uses an
    event based model and minimize the thread blocking
    due to IO.
●   Message broker has an IO dominated workload, and
    therefore we believed an non-blocking approach can
    provide major improvements.
●   We took advantage of Axis2 supports a pluggable
    transport architecture and setup the broker with NIO –
    transport from Apache
Experimental setup
●   Loaded system with XML messages, over a
    constant set of subscriptions
●   Loaded the system with out loading the
    network.
●   Statistics were calculated periodically (e.g. 2
    seconds)
●   10 topics, 1000 messages per topic, 200
    consumers
NIO vs. Blocking IO




●   NIO transport increases the throughput of the
    system.
●   NIO is able to handle more concurrent
    connections (publishers) with less resources.
Challenge 2: Message
                Accumulation
●   If message reception rate is lower than message
    dissemination rate,
    ●   => messages accumulate => system slows down
        and crash
●   Often one incoming message need to be delivered to
    multiple consumers. With high number of Consumers,
    very high chance of above problem.
●   Single delivery thread could pause major limitations.
●   But Naive Parallel solution will break the order of
    message delivery
Parallel Message Delivery
●   Two parallelization strategies considered
    ●   Topic based
        –   Each thread is assigned a set of Topic or Xpath
            Expressions
        –   Thread will deliver a message to Consumers if it
            matches to a topic/Xpath handled by it.
    ●   Consumer (EPR) based
        –   Each active consumer is assigned a standing job and
            a message queue
        –   Job delivers messages accumulated in message
            queues
Topic Based Message Delivery
●   Queue for each topic, and matching messages for
    the topic are place in the queue.
●   A thread assigned to each queue pick up messages
    and delivers.
●   Concerns
    ●   If a message matches multiple subscriptions submitted
        by the same consumer, it will be delivered multiple times.
    ●    If two subscriptions for same consumer is handled by
        different threads, how can system preserve order of
        messages?
Consumer (EPR) based
                parallelization
●   There is a queue for each consumer.
●   Messages for that consumer are placed on that queue.
●   A thread assigned to the queue delivers messages in the
    queue to the consumer.
●   Facts
    ●   Since only thread delivers messages to a consumer, order is
        preserved.
    ●   Jobs and queue are created only when messages are
        available for a consumer.
    ●   Queue eventually expires when messages are not available
Scheduling Standing jobs
●   We use read-write locks to maximize concurrency
●   We can not assign a static thread to each consumer as that will not
    scale with large number of consumers => we use a thread pool.
●   Dynamic Thread pool
    ●   Standing Job will drain the queue entirely and try deliver
    ●   Will not release the control as long as messages are in queue.
    ●   Potential starvation
●   Static Thread pool (size is configurable)
    ●   Each thread will iterate over standing jobs assigned to it.
    ●   Each thread will drain the queue partially (configurable)
    ●   Standing job will release control after delivering drained messages
    ●   Optimized system by allowing greater concurrency for message filtering
Performance: Throughput
Performance: Round Trip Time
Performance: Summary
●   Both parallel implementation performance better
    than serial ( throughput & round trip time)
●   Static thread pool reports better round trip times.
●   Dynamic thread pool increases throughput
Slow and Unreliable
          Consumers/Publishers
●   Distributed in a heterogeneous environment and
    unpredictable (beyond the control of the system)
●   Effects the performance of middleware
    ●   Round trip time
    ●   Throughput
●   Delay incurred by delivering to slow consumers
    will be propagated to fast consumers as well.
    ●   E.g. connection timeouts will block the thread until
        time out period
Solution 1: Soft State
              Subscriptions
●   Forcing consumers to renew
●   But the problem persists until the timeout
    happens.
Solution 2: Blacklisting Schema
●   Consumers are uniquely identified by their EPR
●   If message delivery fails (e.g. times-out)
    repeatedly for a consumer – it will be blacklisted
●   System doesn’t try to send subsequent messages
    to black-listed consumers (for a configurable time
    period)
●   Facts
    ●   Minimize the overhead incurred by message delivery
        failures
WS-Messenger




●   Part of NSF funded “Open Grid Computing Environments –
    OGCE” project and Full Opensource.
●   Implements WS-Eventing and WS-Notifications.
●   Supports Topic based and Xpath Based Subscriptions
●   New version works on Axis2 http://ws.apache.org/axis2/
●   Multiple deployment options
    ●   Standalone distribution
    ●   Embedded in Servlet Container ( e.g. Tomcat)
Future Directions
●   Improved static thread pool based
    parallelization
●   Ensure equal thread utilization
    ●   Implement a work stealing mechanism or hand
        over jobs to idle threads.
●   Analyze performance impact on
    parallelization strategies when number
    consumers are increased.
    ●   Memory requirements
    ●   Throughput, round trip time
Important Info
●   Open Grid Computing Environments (
    www.collab-ogce.org) provides a SOA
    based workflow suite for scientific use
    cases.
●   WS-Messenger
    ●   http://www.collab-
        ogce.org/ogce/index.php/Messaging
    ●   http://www.collab-
        ogce.org/ogce/index.php/Messaging_User_G
        uide
Questions?

More Related Content

What's hot

Message passing ( in computer science)
Message   passing  ( in   computer  science)Message   passing  ( in   computer  science)
Message passing ( in computer science)Computer_ at_home
 
Client-centric Consistency Models
Client-centric Consistency ModelsClient-centric Consistency Models
Client-centric Consistency ModelsEnsar Basri Kahveci
 
Message Passing Systems
Message Passing SystemsMessage Passing Systems
Message Passing SystemsNehaHaroon1
 
International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...ijcseit
 
Client Centric Consistency Model
Client Centric Consistency ModelClient Centric Consistency Model
Client Centric Consistency ModelRajat Kumar
 
Survey on caching and replication algorithm for content distribution in peer ...
Survey on caching and replication algorithm for content distribution in peer ...Survey on caching and replication algorithm for content distribution in peer ...
Survey on caching and replication algorithm for content distribution in peer ...ijcseit
 
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating Systems
Lecture 7, 8, 9 and 10  Inter Process Communication (IPC) in Operating SystemsLecture 7, 8, 9 and 10  Inter Process Communication (IPC) in Operating Systems
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating SystemsRushdi Shams
 
Operating system 19 interacting processes and ipc
Operating system 19 interacting processes and ipcOperating system 19 interacting processes and ipc
Operating system 19 interacting processes and ipcVaibhav Khanna
 
A Short Report on MQTT protocol for Internet of Things(IoT)
A Short Report on MQTT protocol for Internet of Things(IoT)A Short Report on MQTT protocol for Internet of Things(IoT)
A Short Report on MQTT protocol for Internet of Things(IoT)sonycse
 
Teoria efectului defectului hardware: GoogleFS
Teoria efectului defectului hardware: GoogleFSTeoria efectului defectului hardware: GoogleFS
Teoria efectului defectului hardware: GoogleFSAsociatia ProLinux
 
Consistency protocols
Consistency protocolsConsistency protocols
Consistency protocolsZongYing Lyu
 
MULTITHREADING CONCEPT
MULTITHREADING CONCEPTMULTITHREADING CONCEPT
MULTITHREADING CONCEPTRAVI MAURYA
 
Message queuing telemetry transport (mqtt) message format
Message queuing telemetry transport (mqtt) message formatMessage queuing telemetry transport (mqtt) message format
Message queuing telemetry transport (mqtt) message formatHamdamboy (함담보이)
 

What's hot (20)

Message passing ( in computer science)
Message   passing  ( in   computer  science)Message   passing  ( in   computer  science)
Message passing ( in computer science)
 
Client-centric Consistency Models
Client-centric Consistency ModelsClient-centric Consistency Models
Client-centric Consistency Models
 
A survey on SCTP
A survey on SCTPA survey on SCTP
A survey on SCTP
 
Mule CacheScope
Mule CacheScopeMule CacheScope
Mule CacheScope
 
Message Passing Systems
Message Passing SystemsMessage Passing Systems
Message Passing Systems
 
International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...International Journal of Computer Science, Engineering and Information Techno...
International Journal of Computer Science, Engineering and Information Techno...
 
Client Centric Consistency Model
Client Centric Consistency ModelClient Centric Consistency Model
Client Centric Consistency Model
 
Survey on caching and replication algorithm for content distribution in peer ...
Survey on caching and replication algorithm for content distribution in peer ...Survey on caching and replication algorithm for content distribution in peer ...
Survey on caching and replication algorithm for content distribution in peer ...
 
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating Systems
Lecture 7, 8, 9 and 10  Inter Process Communication (IPC) in Operating SystemsLecture 7, 8, 9 and 10  Inter Process Communication (IPC) in Operating Systems
Lecture 7, 8, 9 and 10 Inter Process Communication (IPC) in Operating Systems
 
Operating system 19 interacting processes and ipc
Operating system 19 interacting processes and ipcOperating system 19 interacting processes and ipc
Operating system 19 interacting processes and ipc
 
A Short Report on MQTT protocol for Internet of Things(IoT)
A Short Report on MQTT protocol for Internet of Things(IoT)A Short Report on MQTT protocol for Internet of Things(IoT)
A Short Report on MQTT protocol for Internet of Things(IoT)
 
Teoria efectului defectului hardware: GoogleFS
Teoria efectului defectului hardware: GoogleFSTeoria efectului defectului hardware: GoogleFS
Teoria efectului defectului hardware: GoogleFS
 
Consistency protocols
Consistency protocolsConsistency protocols
Consistency protocols
 
MULTITHREADING CONCEPT
MULTITHREADING CONCEPTMULTITHREADING CONCEPT
MULTITHREADING CONCEPT
 
Mule
MuleMule
Mule
 
Message queuing telemetry transport (mqtt) message format
Message queuing telemetry transport (mqtt) message formatMessage queuing telemetry transport (mqtt) message format
Message queuing telemetry transport (mqtt) message format
 
Replication in the Wild
Replication in the WildReplication in the Wild
Replication in the Wild
 
MQTT Introduction
MQTT IntroductionMQTT Introduction
MQTT Introduction
 
Tcp(no ip) review part1
Tcp(no ip) review part1Tcp(no ip) review part1
Tcp(no ip) review part1
 
Message passing in Distributed Computing Systems
Message passing in Distributed Computing SystemsMessage passing in Distributed Computing Systems
Message passing in Distributed Computing Systems
 

Similar to Towards Improved Data Dissemination of Publish-Subscribe Systems

Non-Kafkaesque Apache Kafka - Yottabyte 2018
Non-Kafkaesque Apache Kafka - Yottabyte 2018Non-Kafkaesque Apache Kafka - Yottabyte 2018
Non-Kafkaesque Apache Kafka - Yottabyte 2018Otávio Carvalho
 
Ranker jms implementation
Ranker jms implementationRanker jms implementation
Ranker jms implementationEosSoftware
 
Kafka Overview
Kafka OverviewKafka Overview
Kafka Overviewiamtodor
 
Design Patterns - Distributed Publisher-Subscriber Network
Design Patterns - Distributed Publisher-Subscriber NetworkDesign Patterns - Distributed Publisher-Subscriber Network
Design Patterns - Distributed Publisher-Subscriber NetworkRishabh Karajgi
 
Event driven architectures with Kinesis
Event driven architectures with KinesisEvent driven architectures with Kinesis
Event driven architectures with KinesisMark Harrison
 
Chapter 3b- Process Communication (1) (1)(1) (1).pptx
Chapter 3b- Process Communication (1) (1)(1) (1).pptxChapter 3b- Process Communication (1) (1)(1) (1).pptx
Chapter 3b- Process Communication (1) (1)(1) (1).pptxayeshabaig2004
 
Introduction to Kafka and Event-Driven
Introduction to Kafka and Event-DrivenIntroduction to Kafka and Event-Driven
Introduction to Kafka and Event-Drivenarconsis
 
Introduction to Kafka and Event-Driven
Introduction to Kafka and Event-DrivenIntroduction to Kafka and Event-Driven
Introduction to Kafka and Event-DrivenDimosthenis Botsaris
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jmsSridhar Reddy
 
Kafka - Messaging System
Kafka - Messaging SystemKafka - Messaging System
Kafka - Messaging SystemTanuj Mehta
 
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...Dhivyaa C.R
 
Apache Kafka - Free Friday
Apache Kafka - Free FridayApache Kafka - Free Friday
Apache Kafka - Free FridayOtávio Carvalho
 
Messaging queue - Kafka
Messaging queue - KafkaMessaging queue - Kafka
Messaging queue - KafkaMayank Bansal
 
apachekafka-160907180205.pdf
apachekafka-160907180205.pdfapachekafka-160907180205.pdf
apachekafka-160907180205.pdfTarekHamdi8
 
1 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp011 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp01Zaigham Abbas
 
Introduction to Microservices Patterns
Introduction to Microservices PatternsIntroduction to Microservices Patterns
Introduction to Microservices PatternsDimosthenis Botsaris
 
Introduction to Microservices Patterns
Introduction to Microservices PatternsIntroduction to Microservices Patterns
Introduction to Microservices Patternsarconsis
 

Similar to Towards Improved Data Dissemination of Publish-Subscribe Systems (20)

Non-Kafkaesque Apache Kafka - Yottabyte 2018
Non-Kafkaesque Apache Kafka - Yottabyte 2018Non-Kafkaesque Apache Kafka - Yottabyte 2018
Non-Kafkaesque Apache Kafka - Yottabyte 2018
 
Ranker jms implementation
Ranker jms implementationRanker jms implementation
Ranker jms implementation
 
Kafka Overview
Kafka OverviewKafka Overview
Kafka Overview
 
Design Patterns - Distributed Publisher-Subscriber Network
Design Patterns - Distributed Publisher-Subscriber NetworkDesign Patterns - Distributed Publisher-Subscriber Network
Design Patterns - Distributed Publisher-Subscriber Network
 
Event driven architectures with Kinesis
Event driven architectures with KinesisEvent driven architectures with Kinesis
Event driven architectures with Kinesis
 
Chapter 3b- Process Communication (1) (1)(1) (1).pptx
Chapter 3b- Process Communication (1) (1)(1) (1).pptxChapter 3b- Process Communication (1) (1)(1) (1).pptx
Chapter 3b- Process Communication (1) (1)(1) (1).pptx
 
Introduction to Kafka and Event-Driven
Introduction to Kafka and Event-DrivenIntroduction to Kafka and Event-Driven
Introduction to Kafka and Event-Driven
 
Introduction to Kafka and Event-Driven
Introduction to Kafka and Event-DrivenIntroduction to Kafka and Event-Driven
Introduction to Kafka and Event-Driven
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jms
 
Kafka - Messaging System
Kafka - Messaging SystemKafka - Messaging System
Kafka - Messaging System
 
Distributed Coordination-Based Systems
Distributed Coordination-Based SystemsDistributed Coordination-Based Systems
Distributed Coordination-Based Systems
 
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
Inter process communication by Dr.C.R.Dhivyaa, Assistant Professor,Kongu Engi...
 
Kafka tutorial
Kafka tutorialKafka tutorial
Kafka tutorial
 
Apache Kafka - Free Friday
Apache Kafka - Free FridayApache Kafka - Free Friday
Apache Kafka - Free Friday
 
Messaging queue - Kafka
Messaging queue - KafkaMessaging queue - Kafka
Messaging queue - Kafka
 
apachekafka-160907180205.pdf
apachekafka-160907180205.pdfapachekafka-160907180205.pdf
apachekafka-160907180205.pdf
 
1 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp011 messagepassing-121015032028-phpapp01
1 messagepassing-121015032028-phpapp01
 
Apache kafka
Apache kafkaApache kafka
Apache kafka
 
Introduction to Microservices Patterns
Introduction to Microservices PatternsIntroduction to Microservices Patterns
Introduction to Microservices Patterns
 
Introduction to Microservices Patterns
Introduction to Microservices PatternsIntroduction to Microservices Patterns
Introduction to Microservices Patterns
 

More from Srinath Perera

Book: Software Architecture and Decision-Making
Book: Software Architecture and Decision-MakingBook: Software Architecture and Decision-Making
Book: Software Architecture and Decision-MakingSrinath Perera
 
Data science Applications in the Enterprise
Data science Applications in the EnterpriseData science Applications in the Enterprise
Data science Applications in the EnterpriseSrinath Perera
 
An Introduction to APIs
An Introduction to APIs An Introduction to APIs
An Introduction to APIs Srinath Perera
 
An Introduction to Blockchain for Finance Professionals
An Introduction to Blockchain for Finance ProfessionalsAn Introduction to Blockchain for Finance Professionals
An Introduction to Blockchain for Finance ProfessionalsSrinath Perera
 
AI in the Real World: Challenges, and Risks and how to handle them?
AI in the Real World: Challenges, and Risks and how to handle them?AI in the Real World: Challenges, and Risks and how to handle them?
AI in the Real World: Challenges, and Risks and how to handle them?Srinath Perera
 
Healthcare + AI: Use cases & Challenges
Healthcare + AI: Use cases & ChallengesHealthcare + AI: Use cases & Challenges
Healthcare + AI: Use cases & ChallengesSrinath Perera
 
How would AI shape Future Integrations?
How would AI shape Future Integrations?How would AI shape Future Integrations?
How would AI shape Future Integrations?Srinath Perera
 
The Role of Blockchain in Future Integrations
The Role of Blockchain in Future IntegrationsThe Role of Blockchain in Future Integrations
The Role of Blockchain in Future IntegrationsSrinath Perera
 
Blockchain: Where are we? Where are we going?
Blockchain: Where are we? Where are we going? Blockchain: Where are we? Where are we going?
Blockchain: Where are we? Where are we going? Srinath Perera
 
Few thoughts about Future of Blockchain
Few thoughts about Future of BlockchainFew thoughts about Future of Blockchain
Few thoughts about Future of BlockchainSrinath Perera
 
A Visual Canvas for Judging New Technologies
A Visual Canvas for Judging New TechnologiesA Visual Canvas for Judging New Technologies
A Visual Canvas for Judging New TechnologiesSrinath Perera
 
Privacy in Bigdata Era
Privacy in Bigdata  EraPrivacy in Bigdata  Era
Privacy in Bigdata EraSrinath Perera
 
Blockchain, Impact, Challenges, and Risks
Blockchain, Impact, Challenges, and RisksBlockchain, Impact, Challenges, and Risks
Blockchain, Impact, Challenges, and RisksSrinath Perera
 
Today's Technology and Emerging Technology Landscape
Today's Technology and Emerging Technology LandscapeToday's Technology and Emerging Technology Landscape
Today's Technology and Emerging Technology LandscapeSrinath Perera
 
An Emerging Technologies Timeline
An Emerging Technologies TimelineAn Emerging Technologies Timeline
An Emerging Technologies TimelineSrinath Perera
 
The Rise of Streaming SQL and Evolution of Streaming Applications
The Rise of Streaming SQL and Evolution of Streaming ApplicationsThe Rise of Streaming SQL and Evolution of Streaming Applications
The Rise of Streaming SQL and Evolution of Streaming ApplicationsSrinath Perera
 
Analytics and AI: The Good, the Bad and the Ugly
Analytics and AI: The Good, the Bad and the UglyAnalytics and AI: The Good, the Bad and the Ugly
Analytics and AI: The Good, the Bad and the UglySrinath Perera
 
Transforming a Business Through Analytics
Transforming a Business Through AnalyticsTransforming a Business Through Analytics
Transforming a Business Through AnalyticsSrinath Perera
 
SoC Keynote:The State of the Art in Integration Technology
SoC Keynote:The State of the Art in Integration TechnologySoC Keynote:The State of the Art in Integration Technology
SoC Keynote:The State of the Art in Integration TechnologySrinath Perera
 

More from Srinath Perera (20)

Book: Software Architecture and Decision-Making
Book: Software Architecture and Decision-MakingBook: Software Architecture and Decision-Making
Book: Software Architecture and Decision-Making
 
Data science Applications in the Enterprise
Data science Applications in the EnterpriseData science Applications in the Enterprise
Data science Applications in the Enterprise
 
An Introduction to APIs
An Introduction to APIs An Introduction to APIs
An Introduction to APIs
 
An Introduction to Blockchain for Finance Professionals
An Introduction to Blockchain for Finance ProfessionalsAn Introduction to Blockchain for Finance Professionals
An Introduction to Blockchain for Finance Professionals
 
AI in the Real World: Challenges, and Risks and how to handle them?
AI in the Real World: Challenges, and Risks and how to handle them?AI in the Real World: Challenges, and Risks and how to handle them?
AI in the Real World: Challenges, and Risks and how to handle them?
 
Healthcare + AI: Use cases & Challenges
Healthcare + AI: Use cases & ChallengesHealthcare + AI: Use cases & Challenges
Healthcare + AI: Use cases & Challenges
 
How would AI shape Future Integrations?
How would AI shape Future Integrations?How would AI shape Future Integrations?
How would AI shape Future Integrations?
 
The Role of Blockchain in Future Integrations
The Role of Blockchain in Future IntegrationsThe Role of Blockchain in Future Integrations
The Role of Blockchain in Future Integrations
 
Future of Serverless
Future of ServerlessFuture of Serverless
Future of Serverless
 
Blockchain: Where are we? Where are we going?
Blockchain: Where are we? Where are we going? Blockchain: Where are we? Where are we going?
Blockchain: Where are we? Where are we going?
 
Few thoughts about Future of Blockchain
Few thoughts about Future of BlockchainFew thoughts about Future of Blockchain
Few thoughts about Future of Blockchain
 
A Visual Canvas for Judging New Technologies
A Visual Canvas for Judging New TechnologiesA Visual Canvas for Judging New Technologies
A Visual Canvas for Judging New Technologies
 
Privacy in Bigdata Era
Privacy in Bigdata  EraPrivacy in Bigdata  Era
Privacy in Bigdata Era
 
Blockchain, Impact, Challenges, and Risks
Blockchain, Impact, Challenges, and RisksBlockchain, Impact, Challenges, and Risks
Blockchain, Impact, Challenges, and Risks
 
Today's Technology and Emerging Technology Landscape
Today's Technology and Emerging Technology LandscapeToday's Technology and Emerging Technology Landscape
Today's Technology and Emerging Technology Landscape
 
An Emerging Technologies Timeline
An Emerging Technologies TimelineAn Emerging Technologies Timeline
An Emerging Technologies Timeline
 
The Rise of Streaming SQL and Evolution of Streaming Applications
The Rise of Streaming SQL and Evolution of Streaming ApplicationsThe Rise of Streaming SQL and Evolution of Streaming Applications
The Rise of Streaming SQL and Evolution of Streaming Applications
 
Analytics and AI: The Good, the Bad and the Ugly
Analytics and AI: The Good, the Bad and the UglyAnalytics and AI: The Good, the Bad and the Ugly
Analytics and AI: The Good, the Bad and the Ugly
 
Transforming a Business Through Analytics
Transforming a Business Through AnalyticsTransforming a Business Through Analytics
Transforming a Business Through Analytics
 
SoC Keynote:The State of the Art in Integration Technology
SoC Keynote:The State of the Art in Integration TechnologySoC Keynote:The State of the Art in Integration Technology
SoC Keynote:The State of the Art in Integration Technology
 

Recently uploaded

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenHervé Boutemy
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embeddingZilliz
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfSeasiaInfotech2
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesZilliz
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfRankYa
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek SchlawackFwdays
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Commit University
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Wonjun Hwang
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Enterprise Knowledge
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationSlibray Presentation
 

Recently uploaded (20)

Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
DevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache MavenDevoxxFR 2024 Reproducible Builds with Apache Maven
DevoxxFR 2024 Reproducible Builds with Apache Maven
 
Training state-of-the-art general text embedding
Training state-of-the-art general text embeddingTraining state-of-the-art general text embedding
Training state-of-the-art general text embedding
 
The Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdfThe Future of Software Development - Devin AI Innovative Approach.pdf
The Future of Software Development - Devin AI Innovative Approach.pdf
 
Vector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector DatabasesVector Databases 101 - An introduction to the world of Vector Databases
Vector Databases 101 - An introduction to the world of Vector Databases
 
Search Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdfSearch Engine Optimization SEO PDF for 2024.pdf
Search Engine Optimization SEO PDF for 2024.pdf
 
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
"Subclassing and Composition – A Pythonic Tour of Trade-Offs", Hynek Schlawack
 
Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!Nell’iperspazio con Rocket: il Framework Web di Rust!
Nell’iperspazio con Rocket: il Framework Web di Rust!
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
Bun (KitWorks Team Study 노별마루 발표 2024.4.22)
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024Designing IA for AI - Information Architecture Conference 2024
Designing IA for AI - Information Architecture Conference 2024
 
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 
Connect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck PresentationConnect Wave/ connectwave Pitch Deck Presentation
Connect Wave/ connectwave Pitch Deck Presentation
 

Towards Improved Data Dissemination of Publish-Subscribe Systems

  • 1. Towards Improved Data Dissemination of Publish-Subscribe Systems Srinath Perera, Ramith Jayasinghe Dinesh Gamage Lanka Software Foundation
  • 2. Outline ● Outline of Pub/sub Paradigm ● 3 challenges ● Avoiding Blocking IO ● Avoiding Message accumulation through parallel message delivery ● Working around Slow and unreliable consumers/ publishers ● OGCE workflow suite ● Conclusions
  • 3. Publish/ Subscribe Paradigm and Message Broker ● Many Event sources that generate events ● Subscribers notify their interest through subscriptions ● Broker Matches and deliver events to Subscribers
  • 5. Goals of Message Broker ● High throughput ● Preserving Message Order for messages generated from same event source ● Reduce publish to delivery time
  • 6. Basic Message Broker Architecture
  • 7. Goals of this Paper ● Three architectural challenges ● Blocking IO ● Parallel Message Delivery ● Unreliable Consumers ● We explore architectural options in addressing these challenges ● We have improved OGCE Messenger based on our observations and used that the test bed for this study.
  • 8. Challenge 1: Blocking IO ● Blocking IO assigns each request to a thread. Then the number of parallel clients are limited by number of threads. ● Potential alternative is non-blocking IO, which uses an event based model and minimize the thread blocking due to IO. ● Message broker has an IO dominated workload, and therefore we believed an non-blocking approach can provide major improvements. ● We took advantage of Axis2 supports a pluggable transport architecture and setup the broker with NIO – transport from Apache
  • 9. Experimental setup ● Loaded system with XML messages, over a constant set of subscriptions ● Loaded the system with out loading the network. ● Statistics were calculated periodically (e.g. 2 seconds) ● 10 topics, 1000 messages per topic, 200 consumers
  • 10. NIO vs. Blocking IO ● NIO transport increases the throughput of the system. ● NIO is able to handle more concurrent connections (publishers) with less resources.
  • 11. Challenge 2: Message Accumulation ● If message reception rate is lower than message dissemination rate, ● => messages accumulate => system slows down and crash ● Often one incoming message need to be delivered to multiple consumers. With high number of Consumers, very high chance of above problem. ● Single delivery thread could pause major limitations. ● But Naive Parallel solution will break the order of message delivery
  • 12. Parallel Message Delivery ● Two parallelization strategies considered ● Topic based – Each thread is assigned a set of Topic or Xpath Expressions – Thread will deliver a message to Consumers if it matches to a topic/Xpath handled by it. ● Consumer (EPR) based – Each active consumer is assigned a standing job and a message queue – Job delivers messages accumulated in message queues
  • 13. Topic Based Message Delivery ● Queue for each topic, and matching messages for the topic are place in the queue. ● A thread assigned to each queue pick up messages and delivers. ● Concerns ● If a message matches multiple subscriptions submitted by the same consumer, it will be delivered multiple times. ● If two subscriptions for same consumer is handled by different threads, how can system preserve order of messages?
  • 14. Consumer (EPR) based parallelization ● There is a queue for each consumer. ● Messages for that consumer are placed on that queue. ● A thread assigned to the queue delivers messages in the queue to the consumer. ● Facts ● Since only thread delivers messages to a consumer, order is preserved. ● Jobs and queue are created only when messages are available for a consumer. ● Queue eventually expires when messages are not available
  • 15. Scheduling Standing jobs ● We use read-write locks to maximize concurrency ● We can not assign a static thread to each consumer as that will not scale with large number of consumers => we use a thread pool. ● Dynamic Thread pool ● Standing Job will drain the queue entirely and try deliver ● Will not release the control as long as messages are in queue. ● Potential starvation ● Static Thread pool (size is configurable) ● Each thread will iterate over standing jobs assigned to it. ● Each thread will drain the queue partially (configurable) ● Standing job will release control after delivering drained messages ● Optimized system by allowing greater concurrency for message filtering
  • 18. Performance: Summary ● Both parallel implementation performance better than serial ( throughput & round trip time) ● Static thread pool reports better round trip times. ● Dynamic thread pool increases throughput
  • 19. Slow and Unreliable Consumers/Publishers ● Distributed in a heterogeneous environment and unpredictable (beyond the control of the system) ● Effects the performance of middleware ● Round trip time ● Throughput ● Delay incurred by delivering to slow consumers will be propagated to fast consumers as well. ● E.g. connection timeouts will block the thread until time out period
  • 20. Solution 1: Soft State Subscriptions ● Forcing consumers to renew ● But the problem persists until the timeout happens.
  • 21. Solution 2: Blacklisting Schema ● Consumers are uniquely identified by their EPR ● If message delivery fails (e.g. times-out) repeatedly for a consumer – it will be blacklisted ● System doesn’t try to send subsequent messages to black-listed consumers (for a configurable time period) ● Facts ● Minimize the overhead incurred by message delivery failures
  • 22. WS-Messenger ● Part of NSF funded “Open Grid Computing Environments – OGCE” project and Full Opensource. ● Implements WS-Eventing and WS-Notifications. ● Supports Topic based and Xpath Based Subscriptions ● New version works on Axis2 http://ws.apache.org/axis2/ ● Multiple deployment options ● Standalone distribution ● Embedded in Servlet Container ( e.g. Tomcat)
  • 23. Future Directions ● Improved static thread pool based parallelization ● Ensure equal thread utilization ● Implement a work stealing mechanism or hand over jobs to idle threads. ● Analyze performance impact on parallelization strategies when number consumers are increased. ● Memory requirements ● Throughput, round trip time
  • 24. Important Info ● Open Grid Computing Environments ( www.collab-ogce.org) provides a SOA based workflow suite for scientific use cases. ● WS-Messenger ● http://www.collab- ogce.org/ogce/index.php/Messaging ● http://www.collab- ogce.org/ogce/index.php/Messaging_User_G uide