SlideShare a Scribd company logo
1 of 21
Andes: a Scalable persistent
    Messaging System




                           Charith
       Wickramarachchi, Srinath
                Perera, Shammi
    Jayasinghe,Sanjiva Weerawarana
                      WSO2 Inc.
        http://www.flickr.com/photos/magnusvk/334474531/
Outline
                                           Dimensions of Scale
                                           Distributed Message Brokers
                                           Andes Architecture
                                                Distributed Pub/sub architecture
                                                Distributed Queues architecture
                                           Evaluation
                                           Conclusion




photo by John Trainoron Flickr http://www.flickr.com/photos/trainor/2902023575/, Licensed under CC
Message Brokers (e.g. JMS. AMQP)



• A broker sits in the middle
• Users send messages and receive them based
  on interests (asynchronous)
• Publish/Subscribe (Topic)
  – deliver to all
• Distributed Queues (Queue)
  – deliver to one, store and deliver, persistent
Messaging Systems in Real World

                                                        • Event Based Systems
                                                              – Sensor Networks
                                                              – System Monitoring
                                                        • CEP (Complex Event
                                                          Processing)
                                                        • Social Networks
                                                        • Real time Analytics
                                                        • Job queues/ scheduling
http://www.flickr.com/photos/imuttoo/4257813689/ by Ian Muttoo, http://www.flickr.com/photos/eastcapital/4554220770/,
                      http://www.flickr.com/photos/patdavid/4619331472/ by Pat David copyright CC
Challenges in Modern Message
                 Oriented Middleware
   Why? Advances in technology areas like cloud computing and
    the increase of Internet based user bases demands for
    scalable message oriented middleware.
   Challenges
       High Availability
       Persistence
       Scale (Dimensions of scale)
           Number of messages
           Number of Queues
           Size of messages
   Current Messaging systems
    only scale in the first two
                                      http://www.artelista.com/ypobra.php?o=19550
    dimensions
Distributed Message Brokers




   Single broker node cannot scale up
   Often messaging systems scale by a network of brokers where
    users can subscribe or publish (both to queues or topics) at any
    node.
   There are many algorithms and routing rules (e.g.
    NaradaBrokering [9], Gryphon [10], Oracle Advanced Queuing
    [7], TIBCO Rendezvous [8], IBM WebSphere MQ [6], and Padres
    [11])
   Still doing ordered delivery with queues is a challenge
Cassandra and Zookeeper
• Cassandra
  – NoSQL Highly scalable new data model (column family)
  – Highly scalable (multiple Nodes), available and no Single
    Point of Failure.
  – SQL like query language (from 0.8) and support search
    through secondary indexes (well no JOINs, Group By etc.
    ..).
  – Tunable consistency and replication
  – Very high write throughput and good read throughput. It
    is pretty fast.
• Zookeeper
  – Scalable, fault tolerant distributed coordination
    framework
Alternative Message Broker Design
• Most persistent message brokers use a per-node DB to
  store messages with message routing.
• But with large messages, cost of routing messages over
  the network is very high
• With availability of scalable storage and distributed
  coordination middleware we propose an alternative
  architecture for scalable message brokers
• Main idea
   – Avoid message routing
   – Use scalable storage to share messages between nodes
   – Use distributed coordination to control the behavior
Andes – Overview




   Each node polls the queues for subscriptions assigned to itself
   Andes stores message content separately
   Delivery logic works with messages IDs written to queue
    representation in Cassandra and it only reads the messages at delivery
Andes – Overview (Contd.)
   Users can publish or subscribe to any node, and Andes
    delivers messages to all as if subscribe and publish
    operations are done in the same node.
   When published, each node writes the message to
    Cassandra
   There are nodes assigned to handle each queue/
    topics, and they read messages from Cassandra and send
    them to subscribers
   Use Apache Zookeeper for coordination when needed
   Support for AMQP JMS and WS-Eventing while enabling
    interoperability between protocols
   Built by extending Apache Qpid Code base
Publish/Subscribe Design




          Image
Publish/Subscribe design (Contd.)
• There is a queue representation implemented on
  Cassandra
• Andes creates a queues for each subscription
• When a broker receives a published message, it stores
  the message in a message store in Cassandra.
• Broker will write message ids of relevant messages to the
  relevant subscriber queues based on the subscribed
  topic.
• Each node polls Cassandra queue for subscriptions done
  at that node and delivers them to the subscribers.
• Messages are deleted from Subscription queues after
  acknowledgement, and Andes deletes messages from
  the message store after a timeout.
Distributed Queues
• Strict ordering means there can be one
  messages being delivered at a give time.
  – Say we receive messages m1, m2 for Queue Q.
  – Say we deliver messages m1 and m2 to client c1 and
    c2 for Queue Q in parallel
  – Say m1->c1 failed, but by then m2->c2 is done.
  – If there is no other subscribers, now m1 has to be
    delivered out of order.
• Two implementation
  – Strict ordering support - using a distributed shared
    lock with Zookeeper
  – Best effort implementation
Distributed Queue with Strict Ordering

image
Distributed Queue with Best Effort
             Ordering
Test Setup
• Test 1: Comparison with other Brokers
   – Single Broker Node
   – Changed the size of messages with different brokers
     (with 40 publishers)
   – Measured the throughput from subscribers for each
     case after sending 10,000 messages.
• Test 2: Scalability test
   – Multiple brokers
   – 20 subscribers on the same queue
   – Changed the number of publishers
   – Measured the throughput from subscribers for each
     case after sending 10,000 messages.
Comparison with Other Brokers




• Andes does much better than Qpid
• Andes does better than HornetMQ for large
  messages
Initial Scalability Results




• Adding more nodes improves throughput
• But more concurrency deteriorate the results
  (need more work)
How does it Make a difference?
• Scale up in all 3 dimensions
• Create only one copy of message while
  delivery
• High Availability and Fault Tolerance
• File transfers in pub/sub (asynchronous style)
• Let users choose between strict and best
  effort messages
• Replication of stored messages in the storage
Conclusion and Future Work
• Provides an alternative architecture for scalable
  message brokers using Cassandra and Zookeeper
• It provides
  – A publish/subscribe model that does not need any
    coordination between broker nodes
  – A strict mode for distributed queues that provides in
    order delivery
  – A best-effort mode for distributed queue
• Future work
  – Further Scalability Tests
  – Testing with large messages
  – Fault Tolerance Tests
• Available as open source project under apache
  License.
Questions?




Copyright by romainguy, and licensed for reuse under CC License
    http://www.flickr.com/photos/romainguy/249370084

More Related Content

What's hot

Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsMessaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsJohn Staveley
 
Enterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMSEnterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMSBruce Snyder
 
Apache Kafka - Messaging System Overview
Apache Kafka - Messaging System OverviewApache Kafka - Messaging System Overview
Apache Kafka - Messaging System OverviewDmitry Tolpeko
 
Do we need JMS in 21st century?
Do we need JMS in 21st century?Do we need JMS in 21st century?
Do we need JMS in 21st century?Mikalai Alimenkou
 
Kafka Technical Overview
Kafka Technical OverviewKafka Technical Overview
Kafka Technical OverviewSylvester John
 
Kafka as Message Broker
Kafka as Message BrokerKafka as Message Broker
Kafka as Message BrokerHaluan Irsad
 
Patterns for large scale search
Patterns for large scale searchPatterns for large scale search
Patterns for large scale searchMark Harwood
 
CloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 Preview
CloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 PreviewCloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 Preview
CloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 PreviewChip Childers
 
Kafka Overview
Kafka OverviewKafka Overview
Kafka Overviewiamtodor
 
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013mumrah
 
Apache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMixApache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMixBruce Snyder
 
Messaging With ActiveMQ
Messaging With ActiveMQMessaging With ActiveMQ
Messaging With ActiveMQBruce Snyder
 
Understanding kafka
Understanding kafkaUnderstanding kafka
Understanding kafkaAmitDhodi
 
Jms deep dive [con4864]
Jms deep dive [con4864]Jms deep dive [con4864]
Jms deep dive [con4864]Ryan Cuprak
 
Decisions behind hypervisor selection in CloudStack 4.3
Decisions behind hypervisor selection in CloudStack 4.3Decisions behind hypervisor selection in CloudStack 4.3
Decisions behind hypervisor selection in CloudStack 4.3Tim Mackey
 

What's hot (20)

Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure FunctionsMessaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
Messaging - RabbitMQ, Azure (Service Bus), Docker and Azure Functions
 
Enterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMSEnterprise Messaging With ActiveMQ and Spring JMS
Enterprise Messaging With ActiveMQ and Spring JMS
 
Apache Kafka - Messaging System Overview
Apache Kafka - Messaging System OverviewApache Kafka - Messaging System Overview
Apache Kafka - Messaging System Overview
 
Kafka tutorial
Kafka tutorialKafka tutorial
Kafka tutorial
 
Do we need JMS in 21st century?
Do we need JMS in 21st century?Do we need JMS in 21st century?
Do we need JMS in 21st century?
 
Kafka Technical Overview
Kafka Technical OverviewKafka Technical Overview
Kafka Technical Overview
 
Kafka as Message Broker
Kafka as Message BrokerKafka as Message Broker
Kafka as Message Broker
 
Kafka basics
Kafka basicsKafka basics
Kafka basics
 
Learn what is TIBCO EMS
Learn what is TIBCO EMSLearn what is TIBCO EMS
Learn what is TIBCO EMS
 
Patterns for large scale search
Patterns for large scale searchPatterns for large scale search
Patterns for large scale search
 
CloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 Preview
CloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 PreviewCloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 Preview
CloudStack DC Meetup - Apache CloudStack Overview and 4.1/4.2 Preview
 
Apache Kafka
Apache Kafka Apache Kafka
Apache Kafka
 
Kafka Overview
Kafka OverviewKafka Overview
Kafka Overview
 
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
Introduction and Overview of Apache Kafka, TriHUG July 23, 2013
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafka
 
Apache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMixApache ActiveMQ and Apache ServiceMix
Apache ActiveMQ and Apache ServiceMix
 
Messaging With ActiveMQ
Messaging With ActiveMQMessaging With ActiveMQ
Messaging With ActiveMQ
 
Understanding kafka
Understanding kafkaUnderstanding kafka
Understanding kafka
 
Jms deep dive [con4864]
Jms deep dive [con4864]Jms deep dive [con4864]
Jms deep dive [con4864]
 
Decisions behind hypervisor selection in CloudStack 4.3
Decisions behind hypervisor selection in CloudStack 4.3Decisions behind hypervisor selection in CloudStack 4.3
Decisions behind hypervisor selection in CloudStack 4.3
 

Similar to Andes: a Scalable persistent Messaging System

AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...
AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...
AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...QCloudMentor
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging QueuesNaukri.com
 
Distributed Systems Introduction and Importance
Distributed Systems Introduction and Importance Distributed Systems Introduction and Importance
Distributed Systems Introduction and Importance SHIKHA GAUTAM
 
Hacking apache cloud stack
Hacking apache cloud stackHacking apache cloud stack
Hacking apache cloud stackNitin Mehta
 
UNIT I DIS.pptx
UNIT I DIS.pptxUNIT I DIS.pptx
UNIT I DIS.pptxSamPrem3
 
WSO2 Product Release Webinar Introducing the WSO2 Message Broker
WSO2 Product Release Webinar   Introducing the WSO2 Message BrokerWSO2 Product Release Webinar   Introducing the WSO2 Message Broker
WSO2 Product Release Webinar Introducing the WSO2 Message BrokerWSO2
 
Clould Computing and its application in Libraries
Clould Computing and its application in LibrariesClould Computing and its application in Libraries
Clould Computing and its application in LibrariesAmit Shaw
 
Distributed messaging with Apache Kafka
Distributed messaging with Apache KafkaDistributed messaging with Apache Kafka
Distributed messaging with Apache KafkaSaumitra Srivastav
 
The Overview of Microservices Architecture
The Overview of Microservices ArchitectureThe Overview of Microservices Architecture
The Overview of Microservices ArchitectureParia Heidari
 
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging PatternsBeyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging PatternsClemens Vasters
 
Architectures with Windows Azure
Architectures with Windows AzureArchitectures with Windows Azure
Architectures with Windows AzureDamir Dobric
 
node.js and Containers: Dispatches from the Frontier
node.js and Containers: Dispatches from the Frontiernode.js and Containers: Dispatches from the Frontier
node.js and Containers: Dispatches from the Frontierbcantrill
 
Message Queuing (MSMQ)
Message Queuing (MSMQ)Message Queuing (MSMQ)
Message Queuing (MSMQ)Senior Dev
 
Distributed Computing system
Distributed Computing system Distributed Computing system
Distributed Computing system Sarvesh Meena
 
An Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQAn Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQRavi Yogesh
 
Ruby Microservices with RabbitMQ
Ruby Microservices with RabbitMQRuby Microservices with RabbitMQ
Ruby Microservices with RabbitMQZoran Majstorovic
 

Similar to Andes: a Scalable persistent Messaging System (20)

AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...
AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...
AWS Study Group - Chapter 07 - Integrating Application Services [Solution Arc...
 
[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues[@NaukriEngineering] Messaging Queues
[@NaukriEngineering] Messaging Queues
 
Mq Lecture
Mq LectureMq Lecture
Mq Lecture
 
Distributed Systems Introduction and Importance
Distributed Systems Introduction and Importance Distributed Systems Introduction and Importance
Distributed Systems Introduction and Importance
 
Hacking apache cloud stack
Hacking apache cloud stackHacking apache cloud stack
Hacking apache cloud stack
 
UNIT I DIS.pptx
UNIT I DIS.pptxUNIT I DIS.pptx
UNIT I DIS.pptx
 
WSO2 Product Release Webinar Introducing the WSO2 Message Broker
WSO2 Product Release Webinar   Introducing the WSO2 Message BrokerWSO2 Product Release Webinar   Introducing the WSO2 Message Broker
WSO2 Product Release Webinar Introducing the WSO2 Message Broker
 
Clould Computing and its application in Libraries
Clould Computing and its application in LibrariesClould Computing and its application in Libraries
Clould Computing and its application in Libraries
 
Distributed messaging with Apache Kafka
Distributed messaging with Apache KafkaDistributed messaging with Apache Kafka
Distributed messaging with Apache Kafka
 
The Overview of Microservices Architecture
The Overview of Microservices ArchitectureThe Overview of Microservices Architecture
The Overview of Microservices Architecture
 
Introduction
IntroductionIntroduction
Introduction
 
Microservices deck
Microservices deckMicroservices deck
Microservices deck
 
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging PatternsBeyond REST and RPC: Asynchronous Eventing and Messaging Patterns
Beyond REST and RPC: Asynchronous Eventing and Messaging Patterns
 
Architectures with Windows Azure
Architectures with Windows AzureArchitectures with Windows Azure
Architectures with Windows Azure
 
node.js and Containers: Dispatches from the Frontier
node.js and Containers: Dispatches from the Frontiernode.js and Containers: Dispatches from the Frontier
node.js and Containers: Dispatches from the Frontier
 
Algorithmic Trading
Algorithmic TradingAlgorithmic Trading
Algorithmic Trading
 
Message Queuing (MSMQ)
Message Queuing (MSMQ)Message Queuing (MSMQ)
Message Queuing (MSMQ)
 
Distributed Computing system
Distributed Computing system Distributed Computing system
Distributed Computing system
 
An Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQAn Introduction to the Message Queuing Technology & IBM WebSphere MQ
An Introduction to the Message Queuing Technology & IBM WebSphere MQ
 
Ruby Microservices with RabbitMQ
Ruby Microservices with RabbitMQRuby Microservices with RabbitMQ
Ruby Microservices with RabbitMQ
 

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

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024Rafal Los
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGSujit Pal
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...HostedbyConfluent
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Miguel Araújo
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdfhans926745
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxMalak Abu Hammad
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Allon Mureinik
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...gurkirankumar98700
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 3652toLead Limited
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking MenDelhi Call girls
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Alan Dix
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure servicePooja Nehwal
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking MenDelhi Call girls
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsMaria Levchenko
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxOnBoard
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...shyamraj55
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024The Digital Insurer
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘RTylerCroy
 

Recently uploaded (20)

The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024The 7 Things I Know About Cyber Security After 25 Years | April 2024
The 7 Things I Know About Cyber Security After 25 Years | April 2024
 
Google AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAGGoogle AI Hackathon: LLM based Evaluator for RAG
Google AI Hackathon: LLM based Evaluator for RAG
 
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
Transforming Data Streams with Kafka Connect: An Introduction to Single Messa...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf[2024]Digital Global Overview Report 2024 Meltwater.pdf
[2024]Digital Global Overview Report 2024 Meltwater.pdf
 
The Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptxThe Codex of Business Writing Software for Real-World Solutions 2.pptx
The Codex of Business Writing Software for Real-World Solutions 2.pptx
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
Kalyanpur ) Call Girls in Lucknow Finest Escorts Service 🍸 8923113531 🎰 Avail...
 
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
Tech-Forward - Achieving Business Readiness For Copilot in Microsoft 365
 
GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men08448380779 Call Girls In Greater Kailash - I Women Seeking Men
08448380779 Call Girls In Greater Kailash - I Women Seeking Men
 
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...Swan(sea) Song – personal research during my six years at Swansea ... and bey...
Swan(sea) Song – personal research during my six years at Swansea ... and bey...
 
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure serviceWhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
WhatsApp 9892124323 ✓Call Girls In Kalyan ( Mumbai ) secure service
 
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
08448380779 Call Girls In Diplomatic Enclave Women Seeking Men
 
Handwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed textsHandwritten Text Recognition for manuscripts and early printed texts
Handwritten Text Recognition for manuscripts and early printed texts
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Maximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptxMaximizing Board Effectiveness 2024 Webinar.pptx
Maximizing Board Effectiveness 2024 Webinar.pptx
 
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
Automating Business Process via MuleSoft Composer | Bangalore MuleSoft Meetup...
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
🐬 The future of MySQL is Postgres 🐘
🐬  The future of MySQL is Postgres   🐘🐬  The future of MySQL is Postgres   🐘
🐬 The future of MySQL is Postgres 🐘
 

Andes: a Scalable persistent Messaging System

  • 1. Andes: a Scalable persistent Messaging System Charith Wickramarachchi, Srinath Perera, Shammi Jayasinghe,Sanjiva Weerawarana WSO2 Inc. http://www.flickr.com/photos/magnusvk/334474531/
  • 2. Outline  Dimensions of Scale  Distributed Message Brokers  Andes Architecture  Distributed Pub/sub architecture  Distributed Queues architecture  Evaluation  Conclusion photo by John Trainoron Flickr http://www.flickr.com/photos/trainor/2902023575/, Licensed under CC
  • 3. Message Brokers (e.g. JMS. AMQP) • A broker sits in the middle • Users send messages and receive them based on interests (asynchronous) • Publish/Subscribe (Topic) – deliver to all • Distributed Queues (Queue) – deliver to one, store and deliver, persistent
  • 4. Messaging Systems in Real World • Event Based Systems – Sensor Networks – System Monitoring • CEP (Complex Event Processing) • Social Networks • Real time Analytics • Job queues/ scheduling http://www.flickr.com/photos/imuttoo/4257813689/ by Ian Muttoo, http://www.flickr.com/photos/eastcapital/4554220770/, http://www.flickr.com/photos/patdavid/4619331472/ by Pat David copyright CC
  • 5. Challenges in Modern Message Oriented Middleware  Why? Advances in technology areas like cloud computing and the increase of Internet based user bases demands for scalable message oriented middleware.  Challenges  High Availability  Persistence  Scale (Dimensions of scale)  Number of messages  Number of Queues  Size of messages  Current Messaging systems only scale in the first two http://www.artelista.com/ypobra.php?o=19550 dimensions
  • 6. Distributed Message Brokers  Single broker node cannot scale up  Often messaging systems scale by a network of brokers where users can subscribe or publish (both to queues or topics) at any node.  There are many algorithms and routing rules (e.g. NaradaBrokering [9], Gryphon [10], Oracle Advanced Queuing [7], TIBCO Rendezvous [8], IBM WebSphere MQ [6], and Padres [11])  Still doing ordered delivery with queues is a challenge
  • 7. Cassandra and Zookeeper • Cassandra – NoSQL Highly scalable new data model (column family) – Highly scalable (multiple Nodes), available and no Single Point of Failure. – SQL like query language (from 0.8) and support search through secondary indexes (well no JOINs, Group By etc. ..). – Tunable consistency and replication – Very high write throughput and good read throughput. It is pretty fast. • Zookeeper – Scalable, fault tolerant distributed coordination framework
  • 8. Alternative Message Broker Design • Most persistent message brokers use a per-node DB to store messages with message routing. • But with large messages, cost of routing messages over the network is very high • With availability of scalable storage and distributed coordination middleware we propose an alternative architecture for scalable message brokers • Main idea – Avoid message routing – Use scalable storage to share messages between nodes – Use distributed coordination to control the behavior
  • 9. Andes – Overview  Each node polls the queues for subscriptions assigned to itself  Andes stores message content separately  Delivery logic works with messages IDs written to queue representation in Cassandra and it only reads the messages at delivery
  • 10. Andes – Overview (Contd.)  Users can publish or subscribe to any node, and Andes delivers messages to all as if subscribe and publish operations are done in the same node.  When published, each node writes the message to Cassandra  There are nodes assigned to handle each queue/ topics, and they read messages from Cassandra and send them to subscribers  Use Apache Zookeeper for coordination when needed  Support for AMQP JMS and WS-Eventing while enabling interoperability between protocols  Built by extending Apache Qpid Code base
  • 12. Publish/Subscribe design (Contd.) • There is a queue representation implemented on Cassandra • Andes creates a queues for each subscription • When a broker receives a published message, it stores the message in a message store in Cassandra. • Broker will write message ids of relevant messages to the relevant subscriber queues based on the subscribed topic. • Each node polls Cassandra queue for subscriptions done at that node and delivers them to the subscribers. • Messages are deleted from Subscription queues after acknowledgement, and Andes deletes messages from the message store after a timeout.
  • 13. Distributed Queues • Strict ordering means there can be one messages being delivered at a give time. – Say we receive messages m1, m2 for Queue Q. – Say we deliver messages m1 and m2 to client c1 and c2 for Queue Q in parallel – Say m1->c1 failed, but by then m2->c2 is done. – If there is no other subscribers, now m1 has to be delivered out of order. • Two implementation – Strict ordering support - using a distributed shared lock with Zookeeper – Best effort implementation
  • 14. Distributed Queue with Strict Ordering image
  • 15. Distributed Queue with Best Effort Ordering
  • 16. Test Setup • Test 1: Comparison with other Brokers – Single Broker Node – Changed the size of messages with different brokers (with 40 publishers) – Measured the throughput from subscribers for each case after sending 10,000 messages. • Test 2: Scalability test – Multiple brokers – 20 subscribers on the same queue – Changed the number of publishers – Measured the throughput from subscribers for each case after sending 10,000 messages.
  • 17. Comparison with Other Brokers • Andes does much better than Qpid • Andes does better than HornetMQ for large messages
  • 18. Initial Scalability Results • Adding more nodes improves throughput • But more concurrency deteriorate the results (need more work)
  • 19. How does it Make a difference? • Scale up in all 3 dimensions • Create only one copy of message while delivery • High Availability and Fault Tolerance • File transfers in pub/sub (asynchronous style) • Let users choose between strict and best effort messages • Replication of stored messages in the storage
  • 20. Conclusion and Future Work • Provides an alternative architecture for scalable message brokers using Cassandra and Zookeeper • It provides – A publish/subscribe model that does not need any coordination between broker nodes – A strict mode for distributed queues that provides in order delivery – A best-effort mode for distributed queue • Future work – Further Scalability Tests – Testing with large messages – Fault Tolerance Tests • Available as open source project under apache License.
  • 21. Questions? Copyright by romainguy, and licensed for reuse under CC License http://www.flickr.com/photos/romainguy/249370084