SlideShare ist ein Scribd-Unternehmen logo
1 von 33
Downloaden Sie, um offline zu lesen
Taking the next step shouldn’t be scary …




1
Messaging for Modern Applications
Tom McCuch
Staff Systems Engineer, VMware
Email: tmccuch@vmware.com
Twitter: @spring_tom
Source Code for these demos:
http://github.com/spring-tom/spring-integration-samples
(applications/café)


© 2011 SpringOne 2GX. All rights reserved. Do not distribute without permission.
Session Agenda
•  Modern Applications
    –  Trends and Impact on Messaging
    –  Impact on Application Architecture

•  Spring Integration
    –  Messaging Use Cases
    –  Messaging DSL for Spring Applications

•  AMQP
    –  Why AMQP?
    –  AMQP Architecture

•  RabbitMQ
    –  Why RabbitMQ?
    –  RabbitMQ Architecture
Modern Application Trends
•  Written with frameworks
   –  Developer productivity and innovation

•  New Application Types
    –  Mobile, SaaS, Social
    –  Apps released early and often

•  Data intensive
    –  Emerging requirements: elasticity, multi-cloud
    –  Web orientation drives exponential data
       volumes

•  Deployed on virtual and cloud infrastructure
    –  Trending toward hybrid (public and private)
       infrastructure
Modern Applications need Modern Messaging
                                 Traditional approaches to messaging
                                  imply predictable, static interaction
                                    between well-known end-points




 Modern approaches to messaging
embrace the unpredictable, dynamic,
  and transient nature of the web
Synchronous Architecture is Brittle

     An exception
       occurred,                               Manage
     please resend                            Inventory
                     Place       Fulfill
                     Order       Order
                                                      X
                                                      X
          X           X             X
                      X             X
                                                      X
                                                      X
                                              Schedule
                                              Delivery




 If any component is unavailable within this synchronous flow, all
       in-flight messages will be affected, regardless of what
 component they are currently in -- and since state is maintained
    across the components, the system can be complex to reset
Asynchronous Architecture Rules the Web
                       The status of
                       your order is      I can fulfill
                            …                part of
                                          that Order


       I have an
         Order

                                                          I can fulfill
                                                             part of
     Your order will                                      that Order
      be delivered
      next Tuesday



                          I’ll schedule
                           delivery of
                            that order


 In this asynchronous flow:
 •  all state is kept in the simple messages being passed
 •  each stateless component interacts only with the broker cloud
 •  if a component is lost, only the in-flight messages within that
    component must be re-delivered
 •  components can be quickly provisioned on-demand
How is Messaging Used within Modern Apps?
§  Event
    I need to know when to do something
§  Fragment
    I need to only give you a piece of this data

§  Route
    Control who gets which message, without changing sender or receiver
§  Batch
    Producer and consumer can run at independent times

§  Publish
    Tell everyone who wants to know about this

§  Modularity
    Deploy, Scale, and Version a distributed system


8
Event
I need to know when to do something …
                   <service-activator
                      input-channel="hotDrinks”
                      ref="barista"
                      method="prepareHotDrink"
                      output-channel="preparedDrinks” />




    An Event-Driven Consumer is one that is automatically handed messages as
    they’re delivered on the channel. The receiver acts like the message delivery
                   is an event that triggers the receiver into action.

9
Fragment
I need to only give you this piece of data …
                    <int:splitter
                               input-channel="orders”
                               expression="payload.items”
                               output-channel="drinks” />




     Use a Splitter to break out the composite message into a series of individual
                 messages, each containing data related to one item.

10
Route
Control who gets what message
       <int:router
                 input-channel="drinks”
                 expression="payload.iced ? 'coldDrinks' : 'hotDrinks'” />




A Router consumes a Message from one Channel and republishes it to a different
              Channel channel depending on a set of conditions.

11
Batch
Producer and Consumer can run at independent times
          <int:channel id="preparedDrinks"/>
          <int:aggregator
              input-channel="preparedDrinks"
              method="prepareDelivery"
              output-channel="deliveries” >
              <bean class="org.sf.integration.samples.cafe.xml.Waiter"/>
          </int:aggregator>




Use a stateful filter, an Aggregator, to collect and store individual messages until
 a complete set of related messages has been received. Then, the Aggregator
      publishes a single message distilled from the individual messages.

12
Publish
Tell everyone who wants to know about this

                <int-event:outbound-channel-adapter
                         channel="eventChannel"/>




      All messages sent to the 'eventChannel' channel will be published as
     ApplicationEvents to any relevant ApplicationListener instances that are
              registered within the same Spring ApplicationContext.

13
Modularity
Deploy, Scale, Version a distributed system
                 Local                                 Distributed
 <service-activator                        <int-amqp:outbound-gateway
    input-channel="coldDrinks”                id="coldDrinksBarista"
    ref="barista”                             request-channel="coldDrinks”
    method="prepareColdDrink”                 reply-channel="preparedDrinks”
    output-channel="preparedDrinks” />        routing-key="ordered.drinks.cold” />

 <service-activator                        <int-amqp:outbound-gateway
    input-channel="hotDrinks”                 id="hotDrinksBarista"
    ref="barista"                             request-channel="hotDrinks”
    method="prepareHotDrink"                  reply-channel="preparedDrinks”
    output-channel="preparedDrinks” />        routing-key="ordered.drinks.hot” />

 Spring Integration doesn’t force you to finalize decisions about deployment before
    testing begins. Individual modules can be versioned, deployed, and scaled
             independently at any time through configuration, not code.

14
Demo – Introducing the Spring
     Integration Café Demo




15
Advanced Message Queuing Protocol
     “Like	
  email,	
  but	
  you	
  can	
  send	
  
               money	
  over	
  it”	
                   Open,	
  Ubiquitous,	
  and	
  
                                                             Adaptable	
  




            async                      SMTP                     AMQP


             sync                       HTTP                     IIOP

                                      unreliable                 reliable


16
Why AMQP?
 A	
  Protocol,	
  not	
  an	
  API	
  
 •  A defined set of
       messaging capabilities
       called the AMQ model
 •  A network wire-level
       protocol, AMQP	
  

                                          On	
  commodity	
  hardware	
  
                                          •  10-­‐25	
  thousand	
  messages	
  
                                               per	
  second	
  is	
  rou>ne	
  *	
  
                                          •  The	
  NIC	
  is	
  usually	
  the	
  
                                               boDleneck	
  
                                          	
  
                                                  *	
  Non-­‐persistent	
  messages	
  

17
Why AMQP?
AMQP	
  security	
  
•  Brokers	
  support	
  separate	
  
   virtual	
  hosts	
  
•  Three	
  levels	
  of	
  permissions	
  
•  AMQP	
  over	
  SSL	
  is	
  supported	
  


                                                Designed	
  to	
  scale	
  horizontally	
  
                                                •  Dozens	
  of	
  clustered	
  brokers	
  
                                                   are	
  common	
  
                                                •  JPMorgan	
  sends	
  1	
  billion	
  
                                                   AMQP	
  messages	
  per	
  day	
  


 18
AMQP Architecture




                                 new.order
      new.order    new.order
     routing key    binding    M1 M2 M3
                                  queue




19
AMQP Architecture


                      café deliveries
                    M1 M2 M3
                         queue

                    café NA deliveries
                    M1 M2 M3
                         queue

                    café WW deliveries
                    M1 M2 M3
                          queue




20
AMQP Architecture

                                      all_drinks
                                 1 2 3
                                       queue


                    drink.cold       cold_drinks
                                 2
                                       queue


                                     hot_drinks
                                 1
 Message Routing Keys:                 queue

 1.  drink.hot
 2.  drink.cold
 3.  drink.warm

21
Demo – Scaling the Café Demo
     with AMQP in Cloud Foundry




22
Legacy Middleware not suited for Modern Apps

       Apps &
     Middleware           Existing middleware impacts agility by tightly
                          coupling applications to underlying application
                            server and other middleware components




     Costly to Scale Up        Complex to Scale Out   Licensed by Peak Physical Servers




23
RabbitMQ – Messaging that Just Works




   design goal: no bloat - “it just works”
        mission: “be everywhere”
             AMQP LEADER
Incredible Community Lowers Your Cost of Use
  !"##$%(0$.%-$#G%,0(#K(C4.%(@$/G9(%KE,(E8"i4-C.




        !"##$%&'`j<>("/0(&$:-4.4R(2g7(E"-%/,-.+$E


  A,(4^,-(E":T"?,.(F4-(C"/K(4%+,-(=Q(E8"i4-C.




;84G0("/0(WG$80H!G/H&"/"?,(*$88(0-$3,(C4-,(."8,.
Enterprise Users, such as this Tier-1 Telco
Enterprise Features, such as Clustering
                   RMQ Cluster1
                                  queue-1   RMQ1
              1


                                  queue-2   RMQ2
              2


                                  queue-3   RMQ3
              3



     1.  queue-1
     2.  queue-3
     3.  queue-2

27
Enterprise Features, such as Fault Tolerance




         ESX1
         VM1                    VM2
                         RMQ1                       RMQ2
                hot-drinks            hot-drinks
                cold-drinks           cold-drinks



master
slave
Our New Mission: “It’s Just There”

                     Java App                     Private Cloud              Hybrid Cloud

                                             vFabric Cloud Foundry       vFabric Cloud Foundry

                     Ruby App                     vSphere                     vSphere




                      Downloadable
                       Micro Cloud




1.  Build your messaging application
                                                              vFabric Cloud Foundry
2.  Deploy it, Scale it using Messaging Service                   Service
                                                                  Provider
3.  Move on or off premise as needed
RabbitMQ Hybrid Cloud Deployment

                  Federated                             RabbitMQ
                                              Linux / Amazon EC2
      new.order


                  cafe-remote

                                                        RabbitMQ
                                           Linux / VMware Fusion
                         amqp




                                  new.order

                                M1 M2 M3
                                   queue
                  cafe-direct
Demo – Deploying the Café Demo
     with RabbitMQ in a Hybrid Cloud




31
Summary
•  Modern Applications
    –  Use frameworks, less emphasis on servers
    –  The explosion of connected mobile devices
       requires a new solution for messaging
•  Spring Integration
    –  A DSL for introducing messaging abstractions
       into your spring application
    –  Externalizes messaging concepts from code
•  AMQP
    –  A TCP/IP protocol not an API
    –  Fast, Reliable, Open, Secure, Scalable
•  RabbitMQ
    –  AMQP Leader
    –  Backed by VMware
Thank You!




33

Weitere ähnliche Inhalte

Was ist angesagt?

Quantum Folsom Summit Developer Overview
Quantum Folsom Summit Developer OverviewQuantum Folsom Summit Developer Overview
Quantum Folsom Summit Developer OverviewDan Wendlandt
 
Network policies
Network policiesNetwork policies
Network policiesshanj
 
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...Matt Leming
 
Under the Hood: Open vSwitch & OpenFlow in XCP & XenServer
Under the Hood: Open vSwitch & OpenFlow in XCP & XenServerUnder the Hood: Open vSwitch & OpenFlow in XCP & XenServer
Under the Hood: Open vSwitch & OpenFlow in XCP & XenServerThe Linux Foundation
 
Where is My Message?: Use MQ Tools to Work Out What Applications Have Done
Where is My Message?: Use MQ Tools to Work Out What Applications Have DoneWhere is My Message?: Use MQ Tools to Work Out What Applications Have Done
Where is My Message?: Use MQ Tools to Work Out What Applications Have DoneMorag Hughson
 
IBM MQ - Comparing Distributed and z/OS platforms
IBM MQ - Comparing Distributed and z/OS platformsIBM MQ - Comparing Distributed and z/OS platforms
IBM MQ - Comparing Distributed and z/OS platformsMarkTaylorIBM
 
What's new in IBM MQ Messaging
What's new in IBM MQ MessagingWhat's new in IBM MQ Messaging
What's new in IBM MQ MessagingMarkTaylorIBM
 
DataPower-MQ Integration Deep Dive
DataPower-MQ Integration Deep DiveDataPower-MQ Integration Deep Dive
DataPower-MQ Integration Deep DiveMorag Hughson
 
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterToward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterRyousei Takano
 
21.10.09 Microsoft Event, Microsoft Presentation
21.10.09 Microsoft Event, Microsoft Presentation21.10.09 Microsoft Event, Microsoft Presentation
21.10.09 Microsoft Event, Microsoft Presentationdataplex systems limited
 
Secure Messages with IBM WebSphere MQ Advanced Message Security
Secure Messages with IBM WebSphere MQ Advanced Message SecuritySecure Messages with IBM WebSphere MQ Advanced Message Security
Secure Messages with IBM WebSphere MQ Advanced Message SecurityMorag Hughson
 
Russell spring one2gx_messaging_india
Russell spring one2gx_messaging_indiaRussell spring one2gx_messaging_india
Russell spring one2gx_messaging_indiaGaryPRussell
 
Am 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-finalAm 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-finalOpenCity Community
 
Monitoring and problem determination of your mq distributed systems
Monitoring and problem determination of your mq distributed systemsMonitoring and problem determination of your mq distributed systems
Monitoring and problem determination of your mq distributed systemsmatthew1001
 
IBM MQ Online Tutorials
IBM MQ Online TutorialsIBM MQ Online Tutorials
IBM MQ Online TutorialsBigClasses.com
 
3452 - Managing your applications
3452 - Managing your applications3452 - Managing your applications
3452 - Managing your applicationsTimothy McCormick
 
Quantum for Cloud Operators - Folsom Conference
Quantum for Cloud Operators  - Folsom Conference Quantum for Cloud Operators  - Folsom Conference
Quantum for Cloud Operators - Folsom Conference Dan Wendlandt
 
Apache Kafka Reliability
Apache Kafka Reliability Apache Kafka Reliability
Apache Kafka Reliability Jeff Holoman
 

Was ist angesagt? (20)

IBM MQ V8 Security
IBM MQ V8 SecurityIBM MQ V8 Security
IBM MQ V8 Security
 
Quantum Folsom Summit Developer Overview
Quantum Folsom Summit Developer OverviewQuantum Folsom Summit Developer Overview
Quantum Folsom Summit Developer Overview
 
Network policies
Network policiesNetwork policies
Network policies
 
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
HHM-2833: Where is My Message?: Using IBM MQ Tools to Work Out What Applicati...
 
Under the Hood: Open vSwitch & OpenFlow in XCP & XenServer
Under the Hood: Open vSwitch & OpenFlow in XCP & XenServerUnder the Hood: Open vSwitch & OpenFlow in XCP & XenServer
Under the Hood: Open vSwitch & OpenFlow in XCP & XenServer
 
Where is My Message?: Use MQ Tools to Work Out What Applications Have Done
Where is My Message?: Use MQ Tools to Work Out What Applications Have DoneWhere is My Message?: Use MQ Tools to Work Out What Applications Have Done
Where is My Message?: Use MQ Tools to Work Out What Applications Have Done
 
IBM MQ - Comparing Distributed and z/OS platforms
IBM MQ - Comparing Distributed and z/OS platformsIBM MQ - Comparing Distributed and z/OS platforms
IBM MQ - Comparing Distributed and z/OS platforms
 
What's new in IBM MQ Messaging
What's new in IBM MQ MessagingWhat's new in IBM MQ Messaging
What's new in IBM MQ Messaging
 
DataPower-MQ Integration Deep Dive
DataPower-MQ Integration Deep DiveDataPower-MQ Integration Deep Dive
DataPower-MQ Integration Deep Dive
 
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC clusterToward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
Toward a practical “HPC Cloud”: Performance tuning of a virtualized HPC cluster
 
21.10.09 Microsoft Event, Microsoft Presentation
21.10.09 Microsoft Event, Microsoft Presentation21.10.09 Microsoft Event, Microsoft Presentation
21.10.09 Microsoft Event, Microsoft Presentation
 
Secure Messages with IBM WebSphere MQ Advanced Message Security
Secure Messages with IBM WebSphere MQ Advanced Message SecuritySecure Messages with IBM WebSphere MQ Advanced Message Security
Secure Messages with IBM WebSphere MQ Advanced Message Security
 
Russell spring one2gx_messaging_india
Russell spring one2gx_messaging_indiaRussell spring one2gx_messaging_india
Russell spring one2gx_messaging_india
 
Am 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-finalAm 04 track1--salvatore orlando--openstack-apac-2012-final
Am 04 track1--salvatore orlando--openstack-apac-2012-final
 
Monitoring and problem determination of your mq distributed systems
Monitoring and problem determination of your mq distributed systemsMonitoring and problem determination of your mq distributed systems
Monitoring and problem determination of your mq distributed systems
 
CloudStack and SDN
CloudStack and SDNCloudStack and SDN
CloudStack and SDN
 
IBM MQ Online Tutorials
IBM MQ Online TutorialsIBM MQ Online Tutorials
IBM MQ Online Tutorials
 
3452 - Managing your applications
3452 - Managing your applications3452 - Managing your applications
3452 - Managing your applications
 
Quantum for Cloud Operators - Folsom Conference
Quantum for Cloud Operators  - Folsom Conference Quantum for Cloud Operators  - Folsom Conference
Quantum for Cloud Operators - Folsom Conference
 
Apache Kafka Reliability
Apache Kafka Reliability Apache Kafka Reliability
Apache Kafka Reliability
 

Ähnlich wie Taking the Next Step" - Modern Messaging for AppsTITLEModern Messaging Strategies for Apps - "Taking the Next Step

Building scalable flexible messaging systems using qpid
Building scalable flexible messaging systems using qpidBuilding scalable flexible messaging systems using qpid
Building scalable flexible messaging systems using qpidJack Gibson
 
Testing the limits of cloud networks
Testing the limits of cloud networksTesting the limits of cloud networks
Testing the limits of cloud networksPLUMgrid
 
The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP Eberhard Wolff
 
Exactly-once Semantics in Apache Kafka
Exactly-once Semantics in Apache KafkaExactly-once Semantics in Apache Kafka
Exactly-once Semantics in Apache Kafkaconfluent
 
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard WolffArchitecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard WolffJAX London
 
Apache Kafka
Apache KafkaApache Kafka
Apache KafkaJoe Stein
 
Rabbit MQ introduction
Rabbit MQ introductionRabbit MQ introduction
Rabbit MQ introductionSitg Yao
 
Cluster_Performance_Apache_Kafak_vs_RabbitMQ
Cluster_Performance_Apache_Kafak_vs_RabbitMQCluster_Performance_Apache_Kafak_vs_RabbitMQ
Cluster_Performance_Apache_Kafak_vs_RabbitMQShameera Rathnayaka
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPEberhard Wolff
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQAraf Karsh Hamid
 
The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message BrokerMartin Toshev
 
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
 
Network and Service Virtualization tutorial at ONUG Spring 2015
Network and Service Virtualization tutorial at ONUG Spring 2015Network and Service Virtualization tutorial at ONUG Spring 2015
Network and Service Virtualization tutorial at ONUG Spring 2015SDN Hub
 
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
 
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
 
WSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2
 
World of Tanks Experience of Using Kafka
World of Tanks Experience of Using KafkaWorld of Tanks Experience of Using Kafka
World of Tanks Experience of Using KafkaLevon Avakyan
 

Ähnlich wie Taking the Next Step" - Modern Messaging for AppsTITLEModern Messaging Strategies for Apps - "Taking the Next Step (20)

Building scalable flexible messaging systems using qpid
Building scalable flexible messaging systems using qpidBuilding scalable flexible messaging systems using qpid
Building scalable flexible messaging systems using qpid
 
Testing the limits of cloud networks
Testing the limits of cloud networksTesting the limits of cloud networks
Testing the limits of cloud networks
 
The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP The Future of Messaging: RabbitMQ and AMQP
The Future of Messaging: RabbitMQ and AMQP
 
Exactly-once Semantics in Apache Kafka
Exactly-once Semantics in Apache KafkaExactly-once Semantics in Apache Kafka
Exactly-once Semantics in Apache Kafka
 
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard WolffArchitecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
Architecture | The Future of Messaging: RabbitMQ and AMQP | Eberhard Wolff
 
Apache Kafka
Apache KafkaApache Kafka
Apache Kafka
 
Rabbit MQ introduction
Rabbit MQ introductionRabbit MQ introduction
Rabbit MQ introduction
 
Cluster_Performance_Apache_Kafak_vs_RabbitMQ
Cluster_Performance_Apache_Kafak_vs_RabbitMQCluster_Performance_Apache_Kafak_vs_RabbitMQ
Cluster_Performance_Apache_Kafak_vs_RabbitMQ
 
Kafka reliability velocity 17
Kafka reliability   velocity 17Kafka reliability   velocity 17
Kafka reliability velocity 17
 
WMQ, WMB and EIP
WMQ, WMB and EIPWMQ, WMB and EIP
WMQ, WMB and EIP
 
Messaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQPMessaging with RabbitMQ and AMQP
Messaging with RabbitMQ and AMQP
 
Event Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQEvent Sourcing & CQRS, Kafka, Rabbit MQ
Event Sourcing & CQRS, Kafka, Rabbit MQ
 
The RabbitMQ Message Broker
The RabbitMQ Message BrokerThe RabbitMQ Message Broker
The RabbitMQ Message Broker
 
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
 
Network and Service Virtualization tutorial at ONUG Spring 2015
Network and Service Virtualization tutorial at ONUG Spring 2015Network and Service Virtualization tutorial at ONUG Spring 2015
Network and Service Virtualization tutorial at ONUG Spring 2015
 
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
 
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...
 
WSO2 Message Broker - Product Overview
WSO2 Message Broker - Product OverviewWSO2 Message Broker - Product Overview
WSO2 Message Broker - Product Overview
 
World of Tanks Experience of Using Kafka
World of Tanks Experience of Using KafkaWorld of Tanks Experience of Using Kafka
World of Tanks Experience of Using Kafka
 
Event driven-arch
Event driven-archEvent driven-arch
Event driven-arch
 

Kürzlich hochgeladen

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Patryk Bandurski
 
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
 
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
 
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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfAddepto
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024The Digital Insurer
 
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
 
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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsSergiu Bodiu
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxNavinnSomaal
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfAlex Barbosa Coqueiro
 
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
 
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
 

Kürzlich hochgeladen (20)

Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
Integration and Automation in Practice: CI/CD in Mule Integration and Automat...
 
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
 
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
 
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
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
Gen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdfGen AI in Business - Global Trends Report 2024.pdf
Gen AI in Business - Global Trends Report 2024.pdf
 
My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024My INSURER PTE LTD - Insurtech Innovation Award 2024
My INSURER PTE LTD - Insurtech Innovation Award 2024
 
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!
 
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
 
DevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platformsDevEX - reference for building teams, processes, and platforms
DevEX - reference for building teams, processes, and platforms
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
SAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptxSAP Build Work Zone - Overview L2-L3.pptx
SAP Build Work Zone - Overview L2-L3.pptx
 
Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptxE-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
E-Vehicle_Hacking_by_Parul Sharma_null_owasp.pptx
 
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
 
Unraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdfUnraveling Multimodality with Large Language Models.pdf
Unraveling Multimodality with Large Language Models.pdf
 
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?
 
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
 

Taking the Next Step" - Modern Messaging for AppsTITLEModern Messaging Strategies for Apps - "Taking the Next Step

  • 1. Taking the next step shouldn’t be scary … 1
  • 2. Messaging for Modern Applications Tom McCuch Staff Systems Engineer, VMware Email: tmccuch@vmware.com Twitter: @spring_tom Source Code for these demos: http://github.com/spring-tom/spring-integration-samples (applications/café) © 2011 SpringOne 2GX. All rights reserved. Do not distribute without permission.
  • 3. Session Agenda •  Modern Applications –  Trends and Impact on Messaging –  Impact on Application Architecture •  Spring Integration –  Messaging Use Cases –  Messaging DSL for Spring Applications •  AMQP –  Why AMQP? –  AMQP Architecture •  RabbitMQ –  Why RabbitMQ? –  RabbitMQ Architecture
  • 4. Modern Application Trends •  Written with frameworks –  Developer productivity and innovation •  New Application Types –  Mobile, SaaS, Social –  Apps released early and often •  Data intensive –  Emerging requirements: elasticity, multi-cloud –  Web orientation drives exponential data volumes •  Deployed on virtual and cloud infrastructure –  Trending toward hybrid (public and private) infrastructure
  • 5. Modern Applications need Modern Messaging Traditional approaches to messaging imply predictable, static interaction between well-known end-points Modern approaches to messaging embrace the unpredictable, dynamic, and transient nature of the web
  • 6. Synchronous Architecture is Brittle An exception occurred, Manage please resend Inventory Place Fulfill Order Order X X X X X X X X X Schedule Delivery If any component is unavailable within this synchronous flow, all in-flight messages will be affected, regardless of what component they are currently in -- and since state is maintained across the components, the system can be complex to reset
  • 7. Asynchronous Architecture Rules the Web The status of your order is I can fulfill … part of that Order I have an Order I can fulfill part of Your order will that Order be delivered next Tuesday I’ll schedule delivery of that order In this asynchronous flow: •  all state is kept in the simple messages being passed •  each stateless component interacts only with the broker cloud •  if a component is lost, only the in-flight messages within that component must be re-delivered •  components can be quickly provisioned on-demand
  • 8. How is Messaging Used within Modern Apps? §  Event I need to know when to do something §  Fragment I need to only give you a piece of this data §  Route Control who gets which message, without changing sender or receiver §  Batch Producer and consumer can run at independent times §  Publish Tell everyone who wants to know about this §  Modularity Deploy, Scale, and Version a distributed system 8
  • 9. Event I need to know when to do something … <service-activator input-channel="hotDrinks” ref="barista" method="prepareHotDrink" output-channel="preparedDrinks” /> An Event-Driven Consumer is one that is automatically handed messages as they’re delivered on the channel. The receiver acts like the message delivery is an event that triggers the receiver into action. 9
  • 10. Fragment I need to only give you this piece of data … <int:splitter input-channel="orders” expression="payload.items” output-channel="drinks” /> Use a Splitter to break out the composite message into a series of individual messages, each containing data related to one item. 10
  • 11. Route Control who gets what message <int:router input-channel="drinks” expression="payload.iced ? 'coldDrinks' : 'hotDrinks'” /> A Router consumes a Message from one Channel and republishes it to a different Channel channel depending on a set of conditions. 11
  • 12. Batch Producer and Consumer can run at independent times <int:channel id="preparedDrinks"/> <int:aggregator input-channel="preparedDrinks" method="prepareDelivery" output-channel="deliveries” > <bean class="org.sf.integration.samples.cafe.xml.Waiter"/> </int:aggregator> Use a stateful filter, an Aggregator, to collect and store individual messages until a complete set of related messages has been received. Then, the Aggregator publishes a single message distilled from the individual messages. 12
  • 13. Publish Tell everyone who wants to know about this <int-event:outbound-channel-adapter channel="eventChannel"/> All messages sent to the 'eventChannel' channel will be published as ApplicationEvents to any relevant ApplicationListener instances that are registered within the same Spring ApplicationContext. 13
  • 14. Modularity Deploy, Scale, Version a distributed system Local Distributed <service-activator <int-amqp:outbound-gateway input-channel="coldDrinks” id="coldDrinksBarista" ref="barista” request-channel="coldDrinks” method="prepareColdDrink” reply-channel="preparedDrinks” output-channel="preparedDrinks” /> routing-key="ordered.drinks.cold” /> <service-activator <int-amqp:outbound-gateway input-channel="hotDrinks” id="hotDrinksBarista" ref="barista" request-channel="hotDrinks” method="prepareHotDrink" reply-channel="preparedDrinks” output-channel="preparedDrinks” /> routing-key="ordered.drinks.hot” /> Spring Integration doesn’t force you to finalize decisions about deployment before testing begins. Individual modules can be versioned, deployed, and scaled independently at any time through configuration, not code. 14
  • 15. Demo – Introducing the Spring Integration Café Demo 15
  • 16. Advanced Message Queuing Protocol “Like  email,  but  you  can  send   money  over  it”   Open,  Ubiquitous,  and   Adaptable   async SMTP AMQP sync HTTP IIOP unreliable reliable 16
  • 17. Why AMQP? A  Protocol,  not  an  API   •  A defined set of messaging capabilities called the AMQ model •  A network wire-level protocol, AMQP   On  commodity  hardware   •  10-­‐25  thousand  messages   per  second  is  rou>ne  *   •  The  NIC  is  usually  the   boDleneck     *  Non-­‐persistent  messages   17
  • 18. Why AMQP? AMQP  security   •  Brokers  support  separate   virtual  hosts   •  Three  levels  of  permissions   •  AMQP  over  SSL  is  supported   Designed  to  scale  horizontally   •  Dozens  of  clustered  brokers   are  common   •  JPMorgan  sends  1  billion   AMQP  messages  per  day   18
  • 19. AMQP Architecture new.order new.order new.order routing key binding M1 M2 M3 queue 19
  • 20. AMQP Architecture café deliveries M1 M2 M3 queue café NA deliveries M1 M2 M3 queue café WW deliveries M1 M2 M3 queue 20
  • 21. AMQP Architecture all_drinks 1 2 3 queue drink.cold cold_drinks 2 queue hot_drinks 1 Message Routing Keys: queue 1.  drink.hot 2.  drink.cold 3.  drink.warm 21
  • 22. Demo – Scaling the Café Demo with AMQP in Cloud Foundry 22
  • 23. Legacy Middleware not suited for Modern Apps Apps & Middleware Existing middleware impacts agility by tightly coupling applications to underlying application server and other middleware components Costly to Scale Up Complex to Scale Out Licensed by Peak Physical Servers 23
  • 24. RabbitMQ – Messaging that Just Works design goal: no bloat - “it just works” mission: “be everywhere” AMQP LEADER
  • 25. Incredible Community Lowers Your Cost of Use !"##$%(0$.%-$#G%,0(#K(C4.%(@$/G9(%KE,(E8"i4-C. !"##$%&'`j<>("/0(&$:-4.4R(2g7(E"-%/,-.+$E A,(4^,-(E":T"?,.(F4-(C"/K(4%+,-(=Q(E8"i4-C. ;84G0("/0(WG$80H!G/H&"/"?,(*$88(0-$3,(C4-,(."8,.
  • 26. Enterprise Users, such as this Tier-1 Telco
  • 27. Enterprise Features, such as Clustering RMQ Cluster1 queue-1 RMQ1 1 queue-2 RMQ2 2 queue-3 RMQ3 3 1.  queue-1 2.  queue-3 3.  queue-2 27
  • 28. Enterprise Features, such as Fault Tolerance ESX1 VM1 VM2 RMQ1 RMQ2 hot-drinks hot-drinks cold-drinks cold-drinks master slave
  • 29. Our New Mission: “It’s Just There” Java App Private Cloud Hybrid Cloud vFabric Cloud Foundry vFabric Cloud Foundry Ruby App vSphere vSphere Downloadable Micro Cloud 1.  Build your messaging application vFabric Cloud Foundry 2.  Deploy it, Scale it using Messaging Service Service Provider 3.  Move on or off premise as needed
  • 30. RabbitMQ Hybrid Cloud Deployment Federated RabbitMQ Linux / Amazon EC2 new.order cafe-remote RabbitMQ Linux / VMware Fusion amqp new.order M1 M2 M3 queue cafe-direct
  • 31. Demo – Deploying the Café Demo with RabbitMQ in a Hybrid Cloud 31
  • 32. Summary •  Modern Applications –  Use frameworks, less emphasis on servers –  The explosion of connected mobile devices requires a new solution for messaging •  Spring Integration –  A DSL for introducing messaging abstractions into your spring application –  Externalizes messaging concepts from code •  AMQP –  A TCP/IP protocol not an API –  Fast, Reliable, Open, Secure, Scalable •  RabbitMQ –  AMQP Leader –  Backed by VMware