SlideShare uma empresa Scribd logo
1 de 24
1Pivotal Confidential–Internal Use Only 1Pivotal Confidential–Internal Use Only
Asynchronous Messaging for
Performance Optimization
Al Sargent
Director, Product Marketing
Pivotal
Velocity Conference 2013
June 20, 2013
2Pivotal Confidential–Internal Use Only
About me
 Now: Application Fabric team @ Pivotal
 Previously: SpringSource/VMware/RabbitMQ
since 2010
 Earlier: Sauce Labs, Wily, Mercury, Oracle
3Pivotal Confidential–Internal Use Only
Diagram adapted from http://www.manning.com/videla/
History of Messaging
4Pivotal Confidential–Internal Use Only
Typical use cases for Messaging
 Event
I need to know when to do something
 Data fragment
I need to give you a piece of this data without you needing to understand the
whole schema
 Routing
Control who gets which message, without changing sender and receiver
 Publish
Tell everyone who wants to know about this
 Batch
Producer and consumer can run at independent times
 Telemetry
Metadata on servers, devices, etc.
 Load share
Add more consumers to scale up
5Pivotal Confidential–Internal Use Only
AMQP introduction
• AMQP (Advanced Message Queuing Protocol) is an open standard application
layer protocol for message oriented middleware
– It is an open protocol (like TCP, HTTP, SMTP, and so on)
• The defining features of AMQP are:
– Message orientation
– Queuing
– Routing (including point-to-point and publish-and-subscribe)
– Reliability
– Security
• AMQP mandates the behaviour of the messaging provider and client
– Implementations from different vendors are truly interoperable
– Previous attempts to standardise middleware have focussed at the API level
• This approach did not create interoperability
– Instead of merely defining an API, AMQP defines a wire-level protocol
• A wire-level protocol is a description of the format of the data that is sent across the
network as a stream of octets
• Any tool that can create and interpret messages that conform to the defined wire-level
protocol can interoperate with any other compliant tool, irrespective of implementation
language
6Pivotal Confidential–Internal Use Only
AMQP motivation
• AMQP was born of frustration!
– Message oriented middleware needs to be everywhere in order to be
useful, but…
– Traditionally dominant solutions are typically very proprietary
• They are frequently too expensive for everyday use
• They invariably do not interoperate
– The above issues with proprietary solutions have resulted in numerous
home-grown developments
• Custom middleware solutions
• Custom adaptors
– The net result for a large enterprise is middleware hell
• Hundred’s of applications, thousand’s of links
• Every other connection is different
• Massive waste of effort
– Costly to implement
– Costly and difficult to maintain
7Pivotal Confidential–Internal Use Only
AMQP Comparison with other protocols
AMQP can accommodate all of the above as use-cases… and
switch between them (open, ubiquitous, and adaptable)
Protocol Comments
SMTP Unreliable, slow
HTTP Synchronous, semi-reliable, no routing
XMPP No delivery fidelity or queue management
FTP Point to point, transient, does not work well with NAT/SSL
MQ Exactly once
TCP At least once, reliable but short lived, no application-level state
management
UDP Fast but has no delivery guarantees
8Pivotal Confidential–Internal Use Only
AMQP scales of deployment
Type of deployment Possible scenario
Developer/casual use 1 server, 1 user, 10 queues, 1 message per second
Production application 2 servers, 10-100 users, 10-50 queues, 25 messages per
second
Departmental mission
critical application
4 servers, 100-500 users, 50-100 queues, 250 messages
per second
Regional mission critical
application
16 servers, 500-2,000 users, 100-500 queues and topics,
2,500 messages per second
Global mission critical
application
64 servers, 2K-10K users, 500-1000 queues and topics,
25,000 messages per second
Market data (trading) 200 servers, 5K users, 10K topics, 250K messages per
second
As well as volume, the latency of message transfer is often important; AMQP implementations can deliver
messages with latencies of less than 200μs
AMQP implementations can cover deployment at different levels of scale
ranging from trivial to the mind-boggling... no job too big or too small.
9Pivotal Confidential–Internal Use Only
AMQP concepts
Each message is stateless
Consumers create queues; these
buffer messages for push to
consumers
Queues are stateful, ordered, and can
be
persistent, transient, private, shared.
Exchanges are stateless routing tables.
Consumers tell queues to bind to
named exchanges; each binding has a
pattern e.g. “tony” or “*.ibm.*”
Producers send messages to
exchanges with a routing key e.g.
“tony”, or ordered set of keys e.g.
“buy.ibm.nyse”
Exchanges route messages to queues
whose binding pattern matches the
message routing key or keys
10Pivotal Confidential–Internal Use Only
M3M1 M2
AMQP direct exchanges
Queue
BindingRouting
key
• Point to point messaging
• A single message that needs to be sent to a single recipient
• Can have multiple consumers (load will be balanced across them)
11Pivotal Confidential–Internal Use Only
AMQP fan-out exchange
• A fan-out exchange is a “publish-subscribe” mechanism
• Used to send a single message to multiple recipients (very similar to an email distribution
list)
• Any queue bound to a fan-out exchange will receive any message sent to the exchange
• Message consumption of each queue will be dependent on the number of consumers and
speed of message consumption
M3M1 M2
M3M1 M2
M3M1 M2
Queue 1
Queue 1
Queue 3
Same message
sent to multiple
queues/recipients
12Pivotal Confidential–Internal Use Only
M1 M2
M1 M2
M3
M1
AMQP topic exchange
Queue 1
Queue 2
Queue 3
Binding pattern B
Binding pattern C
Binding pattern A
• Content-based routing mechanism
• Messages posted to queues based on binding pattern (PCRE used)
• Very powerful mechanism
13Pivotal Confidential–Internal Use Only
RabbitMQ: Modern Messaging for the Cloud
Multi-geo, cloud-scale
Message Bus
RabbitMQ Message Broker
AMQP, JMS, MQTT, STOMP, HTTP, HTTPS…
Point-to-point and pub-sub
Virtual hosts, dynamic configuration
Cluster within single datacenter
Federate across multiple datacenters
Cloud Services DevicesApplications
14Pivotal Confidential–Internal Use Only
RabbitMQ: Run Everywhere, Connect Anything
Hundreds of other clients
C
Frameworks
Languages
Operating Systems
15Pivotal Confidential–Internal Use Only
• Problem: A tightly coupled Grails Application is
serving ads to a web page. Ads are refreshed
every four hours, using a synchronous batch
update process. Then, a new business
guideline is introduced, which requires the
refresh rate of the ads to be increased by 50
percent.
• Solution: To increase the refresh rate without
putting additional strain on the existing
servers, employ a solution utilizing RabbitMQ.
Instead of having a Quartz Job run every four
hours to call one service, reconfigure the
Quartz Job to run every hour and post
messages to a queue. Once a message
becomes available on the queue, other servers
are on standby to read it and then refresh the
given segment of ads.
• Benefits of using RabbitMQ:
– separate requests and actions
– scalability – ease of increasing processing
capabilities
– ability to have apps coded in different
languages communicate with one another
– great for batch processing in an asynchronous
manner http://www.wapolabs.com/2012/02/07/leveraging-rabbitmq-to-decouple-your-application/
Leveraging RabbitMQ to decouple a webapp
Synchronous
batch update
process
RabbitMQ
solution
16Pivotal Confidential–Internal Use Only
Government of India: UIADI
• One of the largest IT
projects ever
• Biggest online
identity project in the
world
• Enabling social
services and
microfinance for 1.2
billion people
• Very significant
countrywide infra with
many moving parts
http://www.biometrics.org/bc2012/presentations/UIDAI/Technology_Tampa_v1040.pdf
17Pivotal Confidential–Internal Use Only
18Pivotal Confidential–Internal Use Only
BBC Zeitgeist
Zeitgeist is a prototype developed by BBC Research & Development to discover and track
the most shared BBC webpages on Twitter.
http://www.bbc.co.uk/blogs/researchanddevelopment/2010/09/what-makes-zeitgeist-tick.shtml
19Pivotal Confidential–Internal Use Only
Number of connected devices is growing
Source: McKinsey, May 2011
20Pivotal Confidential–Internal Use Only
1
Sensor with MQTT client
2
Pivotal RabbitMQ
3
Spring AMQP
Spring Hadoop & XD
Pivotal tc Server
4
Pivotal HD
Use Case: Big Data Applications
How Pivotal components fit together
21Pivotal Confidential–Internal Use Only
• The rabbitmq-management
plugin provides an HTTP-based
API for management and
monitoring the RabbitMQ broker
• Two tools are provided that use
this API:
• A powerful browser-based
UI
• A powerful command line
tool (rabbitmqadmin)
• rabbitmqadmin can
perform the same actions as
the web-based UI, and is
convenient for use when
scripting
• Or you can use the API to
develop your own tools...
RabbitMQ: management and monitoring
22Pivotal Confidential–Internal Use Only
RabbitMQ: management and monitoring
23Pivotal Confidential–Internal Use Only
RabbitMQ: management and monitoring
24Pivotal Confidential–Internal Use Only
www.github.com/gopivotal

Mais conteúdo relacionado

Mais procurados

What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?Karri Huhtanen
 
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...Zvi Avraham
 
Insights on the configuration and performances of SOME/IP Service Discovery
Insights on the configuration and performances of SOME/IP Service DiscoveryInsights on the configuration and performances of SOME/IP Service Discovery
Insights on the configuration and performances of SOME/IP Service DiscoveryNicolas Navet
 
MQTT Protocol: IOT Technology
MQTT Protocol: IOT TechnologyMQTT Protocol: IOT Technology
MQTT Protocol: IOT TechnologyShashank Kapoor
 
SDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center NetworkingSDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center NetworkingThomas Graf
 
What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?Karri Huhtanen
 
Scalable Service Oriented Architecture for Audio/Video ...
Scalable Service Oriented Architecture for Audio/Video ...Scalable Service Oriented Architecture for Audio/Video ...
Scalable Service Oriented Architecture for Audio/Video ...Videoguy
 
Lightweight and scalable IoT Messaging with MQTT
Lightweight and scalable IoT Messaging with MQTTLightweight and scalable IoT Messaging with MQTT
Lightweight and scalable IoT Messaging with MQTTDominik Obermaier
 
MQTT in Reactive Blocks
MQTT in Reactive BlocksMQTT in Reactive Blocks
MQTT in Reactive BlocksBitreactive
 
network basics
network basicsnetwork basics
network basicsAvin Ash
 
InfiniBand Essentials Every HPC Expert Must Know
InfiniBand Essentials Every HPC Expert Must KnowInfiniBand Essentials Every HPC Expert Must Know
InfiniBand Essentials Every HPC Expert Must KnowMellanox Technologies
 
Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of thingsCharles Gibbons
 
PLNOG16: Data center interconnect dla opornych, Krzysztof Mazepa
PLNOG16: Data center interconnect dla opornych, Krzysztof MazepaPLNOG16: Data center interconnect dla opornych, Krzysztof Mazepa
PLNOG16: Data center interconnect dla opornych, Krzysztof MazepaPROIDEA
 
The Third Network: LSO, SDN and NFV
The Third Network: LSO, SDN and NFVThe Third Network: LSO, SDN and NFV
The Third Network: LSO, SDN and NFVOPNFV
 
Tech Tutorial by Vikram Dham: Let's build MPLS router using SDN
Tech Tutorial by Vikram Dham: Let's build MPLS router using SDNTech Tutorial by Vikram Dham: Let's build MPLS router using SDN
Tech Tutorial by Vikram Dham: Let's build MPLS router using SDNnvirters
 
Ch 05 --- nfv basics
Ch 05 --- nfv basicsCh 05 --- nfv basics
Ch 05 --- nfv basicsYoram Orzach
 

Mais procurados (20)

What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?
 
MQTT 5 - What's New?
MQTT 5 - What's New?MQTT 5 - What's New?
MQTT 5 - What's New?
 
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
[http://1PU.SH] Building Wireless Sensor Networks with MQTT-SN, RaspberryPi a...
 
Insights on the configuration and performances of SOME/IP Service Discovery
Insights on the configuration and performances of SOME/IP Service DiscoveryInsights on the configuration and performances of SOME/IP Service Discovery
Insights on the configuration and performances of SOME/IP Service Discovery
 
MQTT Protocol: IOT Technology
MQTT Protocol: IOT TechnologyMQTT Protocol: IOT Technology
MQTT Protocol: IOT Technology
 
SDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center NetworkingSDN & NFV Introduction - Open Source Data Center Networking
SDN & NFV Introduction - Open Source Data Center Networking
 
What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?What is Network Function Virtualisation (NFV)?
What is Network Function Virtualisation (NFV)?
 
Scalable Service Oriented Architecture for Audio/Video ...
Scalable Service Oriented Architecture for Audio/Video ...Scalable Service Oriented Architecture for Audio/Video ...
Scalable Service Oriented Architecture for Audio/Video ...
 
Lightweight and scalable IoT Messaging with MQTT
Lightweight and scalable IoT Messaging with MQTTLightweight and scalable IoT Messaging with MQTT
Lightweight and scalable IoT Messaging with MQTT
 
MQTT + DASH7 Integration
MQTT + DASH7 IntegrationMQTT + DASH7 Integration
MQTT + DASH7 Integration
 
ppt
pptppt
ppt
 
MQTT in Reactive Blocks
MQTT in Reactive BlocksMQTT in Reactive Blocks
MQTT in Reactive Blocks
 
network basics
network basicsnetwork basics
network basics
 
InfiniBand Essentials Every HPC Expert Must Know
InfiniBand Essentials Every HPC Expert Must KnowInfiniBand Essentials Every HPC Expert Must Know
InfiniBand Essentials Every HPC Expert Must Know
 
Protocols for internet of things
Protocols for internet of thingsProtocols for internet of things
Protocols for internet of things
 
PLNOG16: Data center interconnect dla opornych, Krzysztof Mazepa
PLNOG16: Data center interconnect dla opornych, Krzysztof MazepaPLNOG16: Data center interconnect dla opornych, Krzysztof Mazepa
PLNOG16: Data center interconnect dla opornych, Krzysztof Mazepa
 
The Third Network: LSO, SDN and NFV
The Third Network: LSO, SDN and NFVThe Third Network: LSO, SDN and NFV
The Third Network: LSO, SDN and NFV
 
Tech Tutorial by Vikram Dham: Let's build MPLS router using SDN
Tech Tutorial by Vikram Dham: Let's build MPLS router using SDNTech Tutorial by Vikram Dham: Let's build MPLS router using SDN
Tech Tutorial by Vikram Dham: Let's build MPLS router using SDN
 
Haystack + DASH7 Security
Haystack + DASH7 SecurityHaystack + DASH7 Security
Haystack + DASH7 Security
 
Ch 05 --- nfv basics
Ch 05 --- nfv basicsCh 05 --- nfv basics
Ch 05 --- nfv basics
 

Semelhante a Asynchronous Messaging for Performance Optimization

Introduction MQTT in English
Introduction MQTT in EnglishIntroduction MQTT in English
Introduction MQTT in EnglishEric Xiao
 
Messaging For the Cloud and Microservices
Messaging For the Cloud and MicroservicesMessaging For the Cloud and Microservices
Messaging For the Cloud and MicroservicesRob Davies
 
IBM IMPACT 2014 AMC-1866 Introduction to IBM Messaging Capabilities
IBM IMPACT 2014 AMC-1866 Introduction to IBM Messaging CapabilitiesIBM IMPACT 2014 AMC-1866 Introduction to IBM Messaging Capabilities
IBM IMPACT 2014 AMC-1866 Introduction to IBM Messaging CapabilitiesPeter Broadhurst
 
f2f-overview12.ppt
f2f-overview12.pptf2f-overview12.ppt
f2f-overview12.pptwentaozhu3
 
f2f-overview1-presentation about rabbitmq and middleware
f2f-overview1-presentation about rabbitmq and middlewaref2f-overview1-presentation about rabbitmq and middleware
f2f-overview1-presentation about rabbitmq and middlewarendonikristi98
 
Realtime mobile&iot solutions using mqtt and message sight
Realtime mobile&iot solutions using mqtt and message sightRealtime mobile&iot solutions using mqtt and message sight
Realtime mobile&iot solutions using mqtt and message sightfloridawusergroup
 
MuleSoft Meetup Singapore #8 March 2021
MuleSoft Meetup Singapore #8 March 2021MuleSoft Meetup Singapore #8 March 2021
MuleSoft Meetup Singapore #8 March 2021Julian Douch
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jmsSridhar Reddy
 
ADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
ADV Slides: Trends in Streaming Analytics and Message-oriented MiddlewareADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
ADV Slides: Trends in Streaming Analytics and Message-oriented MiddlewareDATAVERSITY
 
Building Scalable & Reliable MQTT Clients for Enterprise Computing
Building Scalable & Reliable MQTT Clients for Enterprise ComputingBuilding Scalable & Reliable MQTT Clients for Enterprise Computing
Building Scalable & Reliable MQTT Clients for Enterprise ComputingHiveMQ
 
From the Internet of Things to Intelligent Systems A Developer's Primer - Gar...
From the Internet of Things to Intelligent Systems A Developer's Primer - Gar...From the Internet of Things to Intelligent Systems A Developer's Primer - Gar...
From the Internet of Things to Intelligent Systems A Developer's Primer - Gar...Rick G. Garibay
 
Orchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQOrchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQVMware Tanzu
 
Ultra Low Latency Market Data
Ultra Low Latency Market DataUltra Low Latency Market Data
Ultra Low Latency Market DataQuanthouse
 
building microservices
building microservicesbuilding microservices
building microservicesCisco DevNet
 
Building Scalable & Reliable MQTT Clients for Enterprise Computing
Building Scalable & Reliable MQTT Clients for Enterprise ComputingBuilding Scalable & Reliable MQTT Clients for Enterprise Computing
Building Scalable & Reliable MQTT Clients for Enterprise ComputingSilvioGiebl
 
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...Peter Broadhurst
 

Semelhante a Asynchronous Messaging for Performance Optimization (20)

Introduction MQTT in English
Introduction MQTT in EnglishIntroduction MQTT in English
Introduction MQTT in English
 
Messaging For the Cloud and Microservices
Messaging For the Cloud and MicroservicesMessaging For the Cloud and Microservices
Messaging For the Cloud and Microservices
 
IBM IMPACT 2014 AMC-1866 Introduction to IBM Messaging Capabilities
IBM IMPACT 2014 AMC-1866 Introduction to IBM Messaging CapabilitiesIBM IMPACT 2014 AMC-1866 Introduction to IBM Messaging Capabilities
IBM IMPACT 2014 AMC-1866 Introduction to IBM Messaging Capabilities
 
f2f-overview12.ppt
f2f-overview12.pptf2f-overview12.ppt
f2f-overview12.ppt
 
f2f-overview1-presentation about rabbitmq and middleware
f2f-overview1-presentation about rabbitmq and middlewaref2f-overview1-presentation about rabbitmq and middleware
f2f-overview1-presentation about rabbitmq and middleware
 
Realtime mobile&iot solutions using mqtt and message sight
Realtime mobile&iot solutions using mqtt and message sightRealtime mobile&iot solutions using mqtt and message sight
Realtime mobile&iot solutions using mqtt and message sight
 
MuleSoft Meetup Singapore #8 March 2021
MuleSoft Meetup Singapore #8 March 2021MuleSoft Meetup Singapore #8 March 2021
MuleSoft Meetup Singapore #8 March 2021
 
Enterprise messaging with jms
Enterprise messaging with jmsEnterprise messaging with jms
Enterprise messaging with jms
 
ADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
ADV Slides: Trends in Streaming Analytics and Message-oriented MiddlewareADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
ADV Slides: Trends in Streaming Analytics and Message-oriented Middleware
 
Building Scalable & Reliable MQTT Clients for Enterprise Computing
Building Scalable & Reliable MQTT Clients for Enterprise ComputingBuilding Scalable & Reliable MQTT Clients for Enterprise Computing
Building Scalable & Reliable MQTT Clients for Enterprise Computing
 
Microservices-101
Microservices-101Microservices-101
Microservices-101
 
Mq Lecture
Mq LectureMq Lecture
Mq Lecture
 
From the Internet of Things to Intelligent Systems A Developer's Primer - Gar...
From the Internet of Things to Intelligent Systems A Developer's Primer - Gar...From the Internet of Things to Intelligent Systems A Developer's Primer - Gar...
From the Internet of Things to Intelligent Systems A Developer's Primer - Gar...
 
Orchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQOrchestration Patterns for Microservices with Messaging by RabbitMQ
Orchestration Patterns for Microservices with Messaging by RabbitMQ
 
Ultra Low Latency Market Data
Ultra Low Latency Market DataUltra Low Latency Market Data
Ultra Low Latency Market Data
 
IBM MQ V9 Overview
IBM MQ V9 OverviewIBM MQ V9 Overview
IBM MQ V9 Overview
 
building microservices
building microservicesbuilding microservices
building microservices
 
Building Scalable & Reliable MQTT Clients for Enterprise Computing
Building Scalable & Reliable MQTT Clients for Enterprise ComputingBuilding Scalable & Reliable MQTT Clients for Enterprise Computing
Building Scalable & Reliable MQTT Clients for Enterprise Computing
 
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
IBM IMPACT 2014 - AMC-1882 Building a Scalable & Continuously Available IBM M...
 
RabbitMQ.pptx
RabbitMQ.pptxRabbitMQ.pptx
RabbitMQ.pptx
 

Último

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationMichael W. Hawkins
 
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
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slidevu2urc
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxKatpro Technologies
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Paola De la Torre
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Igalia
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Enterprise Knowledge
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonAnna Loughnan Colquhoun
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonetsnaman860154
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Servicegiselly40
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilV3cube
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slidespraypatel2
 
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
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Scriptwesley chun
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsEnterprise Knowledge
 
[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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerThousandEyes
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesSinan KOZAK
 

Último (20)

GenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day PresentationGenCyber Cyber Security Day Presentation
GenCyber Cyber Security Day Presentation
 
Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024Finology Group – Insurtech Innovation Award 2024
Finology Group – Insurtech Innovation Award 2024
 
Histor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slideHistor y of HAM Radio presentation slide
Histor y of HAM Radio presentation slide
 
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptxFactors to Consider When Choosing Accounts Payable Services Providers.pptx
Factors to Consider When Choosing Accounts Payable Services Providers.pptx
 
Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101Salesforce Community Group Quito, Salesforce 101
Salesforce Community Group Quito, Salesforce 101
 
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
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
Raspberry Pi 5: Challenges and Solutions in Bringing up an OpenGL/Vulkan Driv...
 
Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...Driving Behavioral Change for Information Management through Data-Driven Gree...
Driving Behavioral Change for Information Management through Data-Driven Gree...
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
How to convert PDF to text with Nanonets
How to convert PDF to text with NanonetsHow to convert PDF to text with Nanonets
How to convert PDF to text with Nanonets
 
CNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of ServiceCNv6 Instructor Chapter 6 Quality of Service
CNv6 Instructor Chapter 6 Quality of Service
 
Developing An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of BrazilDeveloping An App To Navigate The Roads of Brazil
Developing An App To Navigate The Roads of Brazil
 
Slack Application Development 101 Slides
Slack Application Development 101 SlidesSlack Application Development 101 Slides
Slack Application Development 101 Slides
 
Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)Injustice - Developers Among Us (SciFiDevCon 2024)
Injustice - Developers Among Us (SciFiDevCon 2024)
 
Automating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps ScriptAutomating Google Workspace (GWS) & more with Apps Script
Automating Google Workspace (GWS) & more with Apps Script
 
IAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI SolutionsIAC 2024 - IA Fast Track to Search Focused AI Solutions
IAC 2024 - IA Fast Track to Search Focused AI Solutions
 
[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
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Unblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen FramesUnblocking The Main Thread Solving ANRs and Frozen Frames
Unblocking The Main Thread Solving ANRs and Frozen Frames
 

Asynchronous Messaging for Performance Optimization

  • 1. 1Pivotal Confidential–Internal Use Only 1Pivotal Confidential–Internal Use Only Asynchronous Messaging for Performance Optimization Al Sargent Director, Product Marketing Pivotal Velocity Conference 2013 June 20, 2013
  • 2. 2Pivotal Confidential–Internal Use Only About me  Now: Application Fabric team @ Pivotal  Previously: SpringSource/VMware/RabbitMQ since 2010  Earlier: Sauce Labs, Wily, Mercury, Oracle
  • 3. 3Pivotal Confidential–Internal Use Only Diagram adapted from http://www.manning.com/videla/ History of Messaging
  • 4. 4Pivotal Confidential–Internal Use Only Typical use cases for Messaging  Event I need to know when to do something  Data fragment I need to give you a piece of this data without you needing to understand the whole schema  Routing Control who gets which message, without changing sender and receiver  Publish Tell everyone who wants to know about this  Batch Producer and consumer can run at independent times  Telemetry Metadata on servers, devices, etc.  Load share Add more consumers to scale up
  • 5. 5Pivotal Confidential–Internal Use Only AMQP introduction • AMQP (Advanced Message Queuing Protocol) is an open standard application layer protocol for message oriented middleware – It is an open protocol (like TCP, HTTP, SMTP, and so on) • The defining features of AMQP are: – Message orientation – Queuing – Routing (including point-to-point and publish-and-subscribe) – Reliability – Security • AMQP mandates the behaviour of the messaging provider and client – Implementations from different vendors are truly interoperable – Previous attempts to standardise middleware have focussed at the API level • This approach did not create interoperability – Instead of merely defining an API, AMQP defines a wire-level protocol • A wire-level protocol is a description of the format of the data that is sent across the network as a stream of octets • Any tool that can create and interpret messages that conform to the defined wire-level protocol can interoperate with any other compliant tool, irrespective of implementation language
  • 6. 6Pivotal Confidential–Internal Use Only AMQP motivation • AMQP was born of frustration! – Message oriented middleware needs to be everywhere in order to be useful, but… – Traditionally dominant solutions are typically very proprietary • They are frequently too expensive for everyday use • They invariably do not interoperate – The above issues with proprietary solutions have resulted in numerous home-grown developments • Custom middleware solutions • Custom adaptors – The net result for a large enterprise is middleware hell • Hundred’s of applications, thousand’s of links • Every other connection is different • Massive waste of effort – Costly to implement – Costly and difficult to maintain
  • 7. 7Pivotal Confidential–Internal Use Only AMQP Comparison with other protocols AMQP can accommodate all of the above as use-cases… and switch between them (open, ubiquitous, and adaptable) Protocol Comments SMTP Unreliable, slow HTTP Synchronous, semi-reliable, no routing XMPP No delivery fidelity or queue management FTP Point to point, transient, does not work well with NAT/SSL MQ Exactly once TCP At least once, reliable but short lived, no application-level state management UDP Fast but has no delivery guarantees
  • 8. 8Pivotal Confidential–Internal Use Only AMQP scales of deployment Type of deployment Possible scenario Developer/casual use 1 server, 1 user, 10 queues, 1 message per second Production application 2 servers, 10-100 users, 10-50 queues, 25 messages per second Departmental mission critical application 4 servers, 100-500 users, 50-100 queues, 250 messages per second Regional mission critical application 16 servers, 500-2,000 users, 100-500 queues and topics, 2,500 messages per second Global mission critical application 64 servers, 2K-10K users, 500-1000 queues and topics, 25,000 messages per second Market data (trading) 200 servers, 5K users, 10K topics, 250K messages per second As well as volume, the latency of message transfer is often important; AMQP implementations can deliver messages with latencies of less than 200μs AMQP implementations can cover deployment at different levels of scale ranging from trivial to the mind-boggling... no job too big or too small.
  • 9. 9Pivotal Confidential–Internal Use Only AMQP concepts Each message is stateless Consumers create queues; these buffer messages for push to consumers Queues are stateful, ordered, and can be persistent, transient, private, shared. Exchanges are stateless routing tables. Consumers tell queues to bind to named exchanges; each binding has a pattern e.g. “tony” or “*.ibm.*” Producers send messages to exchanges with a routing key e.g. “tony”, or ordered set of keys e.g. “buy.ibm.nyse” Exchanges route messages to queues whose binding pattern matches the message routing key or keys
  • 10. 10Pivotal Confidential–Internal Use Only M3M1 M2 AMQP direct exchanges Queue BindingRouting key • Point to point messaging • A single message that needs to be sent to a single recipient • Can have multiple consumers (load will be balanced across them)
  • 11. 11Pivotal Confidential–Internal Use Only AMQP fan-out exchange • A fan-out exchange is a “publish-subscribe” mechanism • Used to send a single message to multiple recipients (very similar to an email distribution list) • Any queue bound to a fan-out exchange will receive any message sent to the exchange • Message consumption of each queue will be dependent on the number of consumers and speed of message consumption M3M1 M2 M3M1 M2 M3M1 M2 Queue 1 Queue 1 Queue 3 Same message sent to multiple queues/recipients
  • 12. 12Pivotal Confidential–Internal Use Only M1 M2 M1 M2 M3 M1 AMQP topic exchange Queue 1 Queue 2 Queue 3 Binding pattern B Binding pattern C Binding pattern A • Content-based routing mechanism • Messages posted to queues based on binding pattern (PCRE used) • Very powerful mechanism
  • 13. 13Pivotal Confidential–Internal Use Only RabbitMQ: Modern Messaging for the Cloud Multi-geo, cloud-scale Message Bus RabbitMQ Message Broker AMQP, JMS, MQTT, STOMP, HTTP, HTTPS… Point-to-point and pub-sub Virtual hosts, dynamic configuration Cluster within single datacenter Federate across multiple datacenters Cloud Services DevicesApplications
  • 14. 14Pivotal Confidential–Internal Use Only RabbitMQ: Run Everywhere, Connect Anything Hundreds of other clients C Frameworks Languages Operating Systems
  • 15. 15Pivotal Confidential–Internal Use Only • Problem: A tightly coupled Grails Application is serving ads to a web page. Ads are refreshed every four hours, using a synchronous batch update process. Then, a new business guideline is introduced, which requires the refresh rate of the ads to be increased by 50 percent. • Solution: To increase the refresh rate without putting additional strain on the existing servers, employ a solution utilizing RabbitMQ. Instead of having a Quartz Job run every four hours to call one service, reconfigure the Quartz Job to run every hour and post messages to a queue. Once a message becomes available on the queue, other servers are on standby to read it and then refresh the given segment of ads. • Benefits of using RabbitMQ: – separate requests and actions – scalability – ease of increasing processing capabilities – ability to have apps coded in different languages communicate with one another – great for batch processing in an asynchronous manner http://www.wapolabs.com/2012/02/07/leveraging-rabbitmq-to-decouple-your-application/ Leveraging RabbitMQ to decouple a webapp Synchronous batch update process RabbitMQ solution
  • 16. 16Pivotal Confidential–Internal Use Only Government of India: UIADI • One of the largest IT projects ever • Biggest online identity project in the world • Enabling social services and microfinance for 1.2 billion people • Very significant countrywide infra with many moving parts http://www.biometrics.org/bc2012/presentations/UIDAI/Technology_Tampa_v1040.pdf
  • 18. 18Pivotal Confidential–Internal Use Only BBC Zeitgeist Zeitgeist is a prototype developed by BBC Research & Development to discover and track the most shared BBC webpages on Twitter. http://www.bbc.co.uk/blogs/researchanddevelopment/2010/09/what-makes-zeitgeist-tick.shtml
  • 19. 19Pivotal Confidential–Internal Use Only Number of connected devices is growing Source: McKinsey, May 2011
  • 20. 20Pivotal Confidential–Internal Use Only 1 Sensor with MQTT client 2 Pivotal RabbitMQ 3 Spring AMQP Spring Hadoop & XD Pivotal tc Server 4 Pivotal HD Use Case: Big Data Applications How Pivotal components fit together
  • 21. 21Pivotal Confidential–Internal Use Only • The rabbitmq-management plugin provides an HTTP-based API for management and monitoring the RabbitMQ broker • Two tools are provided that use this API: • A powerful browser-based UI • A powerful command line tool (rabbitmqadmin) • rabbitmqadmin can perform the same actions as the web-based UI, and is convenient for use when scripting • Or you can use the API to develop your own tools... RabbitMQ: management and monitoring
  • 22. 22Pivotal Confidential–Internal Use Only RabbitMQ: management and monitoring
  • 23. 23Pivotal Confidential–Internal Use Only RabbitMQ: management and monitoring
  • 24. 24Pivotal Confidential–Internal Use Only www.github.com/gopivotal

Notas do Editor

  1. Now that I’ve provided some background on what AMQP, it is time to explain a few key AMQP concepts. Like most messaging platforms, RabbitMQ supports the concept of point to point messaging, which is just a fancy way of saying, I have a single message that needs to be sent to a single recipient. In AMQP we use a “Direct Exchange” to do point to point messaging.The cornerstone of AMQP is the concept of an “exchange”. Exchanges are stateless message routers that handle all incoming messages. You will bind an exchange to a message queue, in this case, we will create a “binding” called “marriott” that will route hotel booking messages from the exchange to the “marriott” queue. The “P” icon is for message producers. A message producer will send a message using a “routing” key. I this case, the routing key will match the binding name, but that is not a requirement. “C” stands for a message consumer. Message consumers will connect directly to the RabbitMQ server and queue. You can have as many consumers as you want and those consumers usually stay connected to the messaging system and pull messages as fast as they can process them. The message producer will send message one, two and three. Each message will be queued in a “Weak FIFO” order and processed first in/first out style. It is important to note that RabbitMQ does not guarantee message ordering and it is a bad idea to require message ordering for application to application communication, because it is a performance killer.
  2. Fan-out exchanges have all of the same characteristics of a Direct Exchange except for one key difference. A Fanout exchange is known as a “publish-subscribe” mechanism, which is a fancy way of saying that I need to send a single message to multiple recipients, very similar to an email distribution list. Any queue bound to a fan-out exchange will receive any message sent to the exchange. And, message consumption of each queue will be dependent on the number of consumers and speed of message consumption.
  3. The fan-out exchange provides a simple publish-subscribe model, but AMQP also supports a more powerful content based router mechanism called a topic exchange. In this example, we have three different queues, one for all hotel bookings, whether they are made via orbitz, travelocity or expedia, one for just orbitz bookings and another for orbitz bookings to the marriott hotel chain. We will use a binding pattern to control message flow. For the first queue, any message that has a routing key that starts with “booking.” will go to the all_bookings queue because we are using the pound sign, a multi-word pattern symbol. The second queue is bound by an asterisk which will match all single word values. Our last binding requires an exact match because it doesn’t use an asterisk or pound symbol.The first message goes to all three queues. The second message doesn’t match the routing key pattern for queue #3. The third message only matches our least specific filter, “all_bookings”.
  4. Design guidance from http://redis.io/Note that “easy to use” isn’t in this copy. That’s because it’s implied with the tagline “messaging that just works” and the extensive list of tutorial links.
  5. http://www.wapolabs.com/2012/02/07/leveraging-rabbitmq-to-decouple-your-application/
  6. More:http://uidai.gov.in/UID_PDF/Front_Page_Articles/Documents/Strategy_Overveiw-001.pdfhttp://uidai.gov.in/UID_PDF/Front_Page_Articles/Strategy/Exclusion_to_Inclusion_with_Micropayments.pdfhttp://uidai.gov.in/index.php?option=com_content&view=article&id=153&Itemid=13http://blogs.vmware.com/vfabric/2012/07/spring-and-rabbitmq-behind-indias-12-billion-person-biometric-database-1.htmlhttp://www.biometrics.org/bc2012/presentations/UIDAI/Technology_Tampa_v1040.pdf
  7. http://www.bbc.co.uk/blogs/researchanddevelopment/2010/09/what-makes-zeitgeist-tick.shtml
  8. James Manyika et al. “Big data: The next frontier for innovation, competition and productivity”, McKinsey Global Institute, Tech rep. May 2011