SlideShare a Scribd company logo
1 of 74
Download to read offline
RabbitMQ Hands On
                              Álvaro Videla - VMware




Monday, February 25, 13
About Me
                    •     Developer Advocate for Cloud Foundry

                    •     Blog: http://videlalvaro.github.com/

                    •     Twitter: @old_sound




Monday, February 25, 13
About Me
                    •     Developer Advocate for Cloud Foundry

                    •     Blog: http://videlalvaro.github.com/

                    •     Twitter: @old_sound

                    •     I created gifsockets™




Monday, February 25, 13
About Me
                          Co-authored

               RabbitMQ in Action
              http://bit.ly/rabbitmq




Monday, February 25, 13
Why do you
                          need messaging?


Monday, February 25, 13
Classic Web Apps



Monday, February 25, 13
Implement a
                          Photo Gallery


Monday, February 25, 13
Two Parts:




Monday, February 25, 13
Pretty Simple



Monday, February 25, 13
‘Till new
                          requirements arrive


Monday, February 25, 13
The Product Owner



Monday, February 25, 13
Can we also notify the
                    user friends when she
                    uploads a new image?


Monday, February 25, 13
Can we also notify the
                    user friends when she
                    uploads a new image?
      I forgot to mention we need it for tomorrow…

Monday, February 25, 13
Monday, February 25, 13
The Social Media Guru



Monday, February 25, 13
We need to give badges
                  to users for each
                   picture upload


Monday, February 25, 13
We need to give badges
                  to users for each
                   picture upload
                          and post uploads to Twitter

Monday, February 25, 13
Monday, February 25, 13
The Sysadmin



Monday, February 25, 13
Dumb! You’re delivering
                    full size images!
                 The bandwidth bill has
                         tripled!

Monday, February 25, 13
Dumb! You’re delivering
                    full size images!
                 The bandwidth bill has
                         tripled!
                          We need this fixed for yesterday!
Monday, February 25, 13
Monday, February 25, 13
The Developer in the
                              other team


Monday, February 25, 13
I need to call your PHP
                   stuff but from Python


Monday, February 25, 13
I need to call your PHP
                   stuff but from Python

                          And also Java starting next week
Monday, February 25, 13
Monday, February 25, 13
The User



Monday, February 25, 13
I don’t want to wait
                          till your app resizes
                                my image!


Monday, February 25, 13
You



Monday, February 25, 13
Monday, February 25, 13
Let’s see the
                          code evolution


Monday, February 25, 13
Pseudo Code

                                Comments


            %% image_controller
            handle('PUT', "/user/image", ReqData) ->
              image_handler:do_upload(ReqData:get_file()),
              ok.




Monday, February 25, 13
Pseudo Code

                              Function Name


            %% image_controller
            handle('PUT', "/user/image", ReqData) ->
              image_handler:do_upload(ReqData:get_file()),
              ok.




Monday, February 25, 13
Pseudo Code

                                Arguments


            %% image_controller
            handle('PUT', "/user/image", ReqData) ->
              image_handler:do_upload(ReqData:get_file()),
              ok.




Monday, February 25, 13
Pseudo Code

                              Function Body


            %% image_controller
            handle('PUT', "/user/image", ReqData) ->
              image_handler:do_upload(ReqData:get_file()),
              ok.




Monday, February 25, 13
Pseudo Code

                               Return Value


            %% image_controller
            handle('PUT', "/user/image", ReqData) ->
              image_handler:do_upload(ReqData:get_file()),
              ok.




Monday, February 25, 13
First Implementation:

            %% image_controller
            handle('PUT', "/user/image", ReqData) ->
              image_handler:do_upload(ReqData:get_file()),
              ok.




Monday, February 25, 13
Second Implementation:

            %% image_controller
            handle('PUT', "/user/image", ReqData) ->
              {ok, Image} = image_handler:do_upload(ReqData:get_file()),
              resize_image(Image),
              ok.




Monday, February 25, 13
Third Implementation:

            %% image_controller
            handle('PUT', "/user/image", ReqData) ->
              {ok, Image} = image_handler:do_upload(ReqData:get_file()),
              resize_image(Image),
              notify_friends(ReqData:get_user()),
              ok.




Monday, February 25, 13
Fourth Implementation:

            %% image_controller
            handle('PUT', "/user/image", ReqData) ->
              {ok, Image} = image_handler:do_upload(ReqData:get_file()),
              resize_image(Image),
              notify_friends(ReqData:get_user()),
              add_points_to_user(ReqData:get_user()),
              ok.




Monday, February 25, 13
Final Implementation:

            %% image_controller
            handle('PUT', "/user/image", ReqData) ->
              {ok, Image} = image_handler:do_upload(ReqData:get_file()),
              resize_image(Image),
              notify_friends(ReqData:get_user()),
              add_points_to_user(ReqData:get_user()),
              tweet_new_image(User, Image),
              ok.




Monday, February 25, 13
Can our code scale to
                      new requirements?


Monday, February 25, 13
What if




Monday, February 25, 13
What if

                • We need to speed up image conversion




Monday, February 25, 13
What if

                • We need to speed up image conversion
                • User notifications sent by email




Monday, February 25, 13
What if

                • We need to speed up image conversion
                • User notifications sent by email
                • Stop tweeting about new images




Monday, February 25, 13
What if

                • We need to speed up image conversion
                • User notifications sent by email
                • Stop tweeting about new images
                • Resize in different formats




Monday, February 25, 13
What if

                • We need to speed up image conversion
                • User notifications sent by email
                • Stop tweeting about new images
                • Resize in different formats
                • Swap Language / Technology (No Down
                  Time)


Monday, February 25, 13
Can we do better?



Monday, February 25, 13
Sure.
                          Using messaging


Monday, February 25, 13
Design
                          Publish / Subscribe Pattern




Monday, February 25, 13
First Implementation:
            %% image_controller
            handle('PUT', "/user/image", ReqData) ->
              {ok, Image} = image_handler:do_upload(ReqData:get_file()),
              Msg = #msg{user = ReqData:get_user(), image = Image},
              publish_message('new_image', Msg).




Monday, February 25, 13
First Implementation:
            %% image_controller
            handle('PUT', "/user/image", ReqData) ->
              {ok, Image} = image_handler:do_upload(ReqData:get_file()),
              Msg = #msg{user = ReqData:get_user(), image = Image},
              publish_message('new_image', Msg).

            %% friends notifier
            on('new_image', Msg) ->
              notify_friends(Msg.user, Msg.image).




Monday, February 25, 13
First Implementation:
            %% image_controller
            handle('PUT', "/user/image", ReqData) ->
              {ok, Image} = image_handler:do_upload(ReqData:get_file()),
              Msg = #msg{user = ReqData:get_user(), image = Image},
              publish_message('new_image', Msg).

            %% friends notifier
            on('new_image', Msg) ->
              notify_friends(Msg.user, Msg.image).

            %% points manager
            on('new_image', Msg) ->
              add_points(Msg.user, 'new_image').




Monday, February 25, 13
First Implementation:
            %% image_controller
            handle('PUT', "/user/image", ReqData) ->
              {ok, Image} = image_handler:do_upload(ReqData:get_file()),
              Msg = #msg{user = ReqData:get_user(), image = Image},
              publish_message('new_image', Msg).

            %% friends notifier
            on('new_image', Msg) ->
              notify_friends(Msg.user, Msg.image).

            %% points manager
            on('new_image', Msg) ->
              add_points(Msg.user, 'new_image').

            %% resizer
            on('new_image', Msg) ->
              resize_image(Msg.image).


Monday, February 25, 13
Second Implementation:




Monday, February 25, 13
Second Implementation:




                          THIS PAGE INTENTIONALLY LEFT BLANK




Monday, February 25, 13
Monday, February 25, 13
Messaging and
                           RabbitMQ


Monday, February 25, 13
RabbitMQ




Monday, February 25, 13
RabbitMQ
                 • Multi Protocol Messaging Server




Monday, February 25, 13
RabbitMQ
                 • Multi Protocol Messaging Server
                 • Open Source (MPL)




Monday, February 25, 13
RabbitMQ
                 • Multi Protocol Messaging Server
                 • Open Source (MPL)
                 • Part of Spring Source




Monday, February 25, 13
RabbitMQ
                 • Polyglot
                 • Multi Protocol
                 • Open Source (MPL)
                 • Written in Erlang/OTP




Monday, February 25, 13
Multi Protocol




                     http://bit.ly/rmq-protocols
Monday, February 25, 13
Polyglot
                • PHP
                • node.js
                • Erlang
                • Java
                • Ruby
                • .Net
                • Haskell

Monday, February 25, 13
TELL ME MORE




Monday, February 25, 13
CODE OR IT
                          DIDN’T HAPPEN

                     http://github.com/videlalvaro/php-amqplib



Monday, February 25, 13
Messaging

Monday, February 25, 13
Scale


                          Messaging

Monday, February 25, 13
Scale         Decoupling


                          Messaging

Monday, February 25, 13
Scale                Decoupling


                          Messaging
                          Polyglot Apps
Monday, February 25, 13
Questions?



Monday, February 25, 13
Thanks!
                          @old_sound




Monday, February 25, 13

More Related Content

Similar to RabbitMQ Hands On

WordPress for Beginners - YES Montreal
WordPress for Beginners - YES MontrealWordPress for Beginners - YES Montreal
WordPress for Beginners - YES MontrealKathryn Presner
 
Message Oriented Architecture - Gr8conf US 2013
Message Oriented Architecture - Gr8conf US 2013Message Oriented Architecture - Gr8conf US 2013
Message Oriented Architecture - Gr8conf US 2013Steve Pember
 
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud FoundryCloud Messaging With Cloud Foundry
Cloud Messaging With Cloud FoundryAlvaro Videla
 
Getting Started with Puppet on Windows - PuppetConf 2014
Getting Started with Puppet on Windows - PuppetConf 2014Getting Started with Puppet on Windows - PuppetConf 2014
Getting Started with Puppet on Windows - PuppetConf 2014Puppet
 
Getting Started with Puppet on Windows PuppetConf 2014
Getting Started with Puppet on Windows PuppetConf 2014Getting Started with Puppet on Windows PuppetConf 2014
Getting Started with Puppet on Windows PuppetConf 2014Josh Cooper
 
Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)
Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)
Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)Rick. Bahague
 
Being agile while standing in a waterfall
Being agile while standing in a waterfallBeing agile while standing in a waterfall
Being agile while standing in a waterfallMike Edwards
 
BuddyPress @ WordCamp Whistler 2009
BuddyPress @ WordCamp Whistler 2009BuddyPress @ WordCamp Whistler 2009
BuddyPress @ WordCamp Whistler 2009apeatling
 
Building an API in Rails without Realizing It
Building an API in Rails without Realizing ItBuilding an API in Rails without Realizing It
Building an API in Rails without Realizing ItMark
 
How to build an ecosystem for developers by David Bonilla
How to build an ecosystem for developers by David BonillaHow to build an ecosystem for developers by David Bonilla
How to build an ecosystem for developers by David BonillaCodemotion
 
Know Enough to Be Dangerous
Know Enough to Be DangerousKnow Enough to Be Dangerous
Know Enough to Be DangerousJordan Gillman
 
Google analytics for Eclipse Plugins
Google analytics for Eclipse PluginsGoogle analytics for Eclipse Plugins
Google analytics for Eclipse PluginsMax Andersen
 
Augmented Reality in JavaScript
Augmented Reality in JavaScriptAugmented Reality in JavaScript
Augmented Reality in JavaScriptEduardo Lundgren
 
Docker: do básico ao cluster
Docker: do básico ao clusterDocker: do básico ao cluster
Docker: do básico ao clusterLeonardo Comelli
 
JavaScript & Animation
JavaScript & AnimationJavaScript & Animation
JavaScript & AnimationCaesar Chi
 
Continuous Delivery at Netflix
Continuous Delivery at NetflixContinuous Delivery at Netflix
Continuous Delivery at NetflixRob Spieldenner
 
Introduction to jQuery Mobile
Introduction to jQuery MobileIntroduction to jQuery Mobile
Introduction to jQuery MobileTroy Miles
 
UnRESTful APIs with Django
UnRESTful APIs with DjangoUnRESTful APIs with Django
UnRESTful APIs with DjangoAri Lacenski
 

Similar to RabbitMQ Hands On (20)

WordPress for Beginners - YES Montreal
WordPress for Beginners - YES MontrealWordPress for Beginners - YES Montreal
WordPress for Beginners - YES Montreal
 
Message Oriented Architecture - Gr8conf US 2013
Message Oriented Architecture - Gr8conf US 2013Message Oriented Architecture - Gr8conf US 2013
Message Oriented Architecture - Gr8conf US 2013
 
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud FoundryCloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
 
JS and patterns
JS and patternsJS and patterns
JS and patterns
 
Getting Started with Puppet on Windows - PuppetConf 2014
Getting Started with Puppet on Windows - PuppetConf 2014Getting Started with Puppet on Windows - PuppetConf 2014
Getting Started with Puppet on Windows - PuppetConf 2014
 
Getting Started with Puppet on Windows PuppetConf 2014
Getting Started with Puppet on Windows PuppetConf 2014Getting Started with Puppet on Windows PuppetConf 2014
Getting Started with Puppet on Windows PuppetConf 2014
 
Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)
Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)
Drupal campmanila 2012 (Responsive Web in Drupal with Omega Theme)
 
UX, UI, WTF
UX, UI, WTFUX, UI, WTF
UX, UI, WTF
 
Being agile while standing in a waterfall
Being agile while standing in a waterfallBeing agile while standing in a waterfall
Being agile while standing in a waterfall
 
BuddyPress @ WordCamp Whistler 2009
BuddyPress @ WordCamp Whistler 2009BuddyPress @ WordCamp Whistler 2009
BuddyPress @ WordCamp Whistler 2009
 
Building an API in Rails without Realizing It
Building an API in Rails without Realizing ItBuilding an API in Rails without Realizing It
Building an API in Rails without Realizing It
 
How to build an ecosystem for developers by David Bonilla
How to build an ecosystem for developers by David BonillaHow to build an ecosystem for developers by David Bonilla
How to build an ecosystem for developers by David Bonilla
 
Know Enough to Be Dangerous
Know Enough to Be DangerousKnow Enough to Be Dangerous
Know Enough to Be Dangerous
 
Google analytics for Eclipse Plugins
Google analytics for Eclipse PluginsGoogle analytics for Eclipse Plugins
Google analytics for Eclipse Plugins
 
Augmented Reality in JavaScript
Augmented Reality in JavaScriptAugmented Reality in JavaScript
Augmented Reality in JavaScript
 
Docker: do básico ao cluster
Docker: do básico ao clusterDocker: do básico ao cluster
Docker: do básico ao cluster
 
JavaScript & Animation
JavaScript & AnimationJavaScript & Animation
JavaScript & Animation
 
Continuous Delivery at Netflix
Continuous Delivery at NetflixContinuous Delivery at Netflix
Continuous Delivery at Netflix
 
Introduction to jQuery Mobile
Introduction to jQuery MobileIntroduction to jQuery Mobile
Introduction to jQuery Mobile
 
UnRESTful APIs with Django
UnRESTful APIs with DjangoUnRESTful APIs with Django
UnRESTful APIs with Django
 

More from Alvaro Videla

Improvements in RabbitMQ
Improvements in RabbitMQImprovements in RabbitMQ
Improvements in RabbitMQAlvaro Videla
 
Data Migration at Scale with RabbitMQ and Spring Integration
Data Migration at Scale with RabbitMQ and Spring IntegrationData Migration at Scale with RabbitMQ and Spring Integration
Data Migration at Scale with RabbitMQ and Spring IntegrationAlvaro Videla
 
RabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft ConfRabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft ConfAlvaro Videla
 
Scaling applications with RabbitMQ at SunshinePHP
Scaling applications with RabbitMQ   at SunshinePHPScaling applications with RabbitMQ   at SunshinePHP
Scaling applications with RabbitMQ at SunshinePHPAlvaro Videla
 
Unit Test + Functional Programming = Love
Unit Test + Functional Programming = LoveUnit Test + Functional Programming = Love
Unit Test + Functional Programming = LoveAlvaro Videla
 
RabbitMQ Data Ingestion
RabbitMQ Data IngestionRabbitMQ Data Ingestion
RabbitMQ Data IngestionAlvaro Videla
 
Dissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal ArchitectureDissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal ArchitectureAlvaro Videla
 
Writing testable code
Writing testable codeWriting testable code
Writing testable codeAlvaro Videla
 
Rabbitmq Boot System
Rabbitmq Boot SystemRabbitmq Boot System
Rabbitmq Boot SystemAlvaro Videla
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry BootcampAlvaro Videla
 
Código Fácil De Testear
Código Fácil De TestearCódigo Fácil De Testear
Código Fácil De TestearAlvaro Videla
 
Desacoplando aplicaciones
Desacoplando aplicacionesDesacoplando aplicaciones
Desacoplando aplicacionesAlvaro Videla
 
Theres a rabbit on my symfony
Theres a rabbit on my symfonyTheres a rabbit on my symfony
Theres a rabbit on my symfonyAlvaro Videla
 
Scaling Web Apps With RabbitMQ - Erlang Factory Lite
Scaling Web Apps With RabbitMQ - Erlang Factory LiteScaling Web Apps With RabbitMQ - Erlang Factory Lite
Scaling Web Apps With RabbitMQ - Erlang Factory LiteAlvaro Videla
 
Integrating php withrabbitmq_zendcon
Integrating php withrabbitmq_zendconIntegrating php withrabbitmq_zendcon
Integrating php withrabbitmq_zendconAlvaro Videla
 
Scaling webappswithrabbitmq
Scaling webappswithrabbitmqScaling webappswithrabbitmq
Scaling webappswithrabbitmqAlvaro Videla
 
Integrating RabbitMQ with PHP
Integrating RabbitMQ with PHPIntegrating RabbitMQ with PHP
Integrating RabbitMQ with PHPAlvaro Videla
 

More from Alvaro Videla (20)

Improvements in RabbitMQ
Improvements in RabbitMQImprovements in RabbitMQ
Improvements in RabbitMQ
 
Data Migration at Scale with RabbitMQ and Spring Integration
Data Migration at Scale with RabbitMQ and Spring IntegrationData Migration at Scale with RabbitMQ and Spring Integration
Data Migration at Scale with RabbitMQ and Spring Integration
 
RabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft ConfRabbitMQ Data Ingestion at Craft Conf
RabbitMQ Data Ingestion at Craft Conf
 
Scaling applications with RabbitMQ at SunshinePHP
Scaling applications with RabbitMQ   at SunshinePHPScaling applications with RabbitMQ   at SunshinePHP
Scaling applications with RabbitMQ at SunshinePHP
 
Unit Test + Functional Programming = Love
Unit Test + Functional Programming = LoveUnit Test + Functional Programming = Love
Unit Test + Functional Programming = Love
 
RabbitMQ Data Ingestion
RabbitMQ Data IngestionRabbitMQ Data Ingestion
RabbitMQ Data Ingestion
 
Dissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal ArchitectureDissecting the rabbit: RabbitMQ Internal Architecture
Dissecting the rabbit: RabbitMQ Internal Architecture
 
Writing testable code
Writing testable codeWriting testable code
Writing testable code
 
Rabbitmq Boot System
Rabbitmq Boot SystemRabbitmq Boot System
Rabbitmq Boot System
 
Cloud Foundry Bootcamp
Cloud Foundry BootcampCloud Foundry Bootcamp
Cloud Foundry Bootcamp
 
Taming the rabbit
Taming the rabbitTaming the rabbit
Taming the rabbit
 
Vertx
VertxVertx
Vertx
 
Código Fácil De Testear
Código Fácil De TestearCódigo Fácil De Testear
Código Fácil De Testear
 
Desacoplando aplicaciones
Desacoplando aplicacionesDesacoplando aplicaciones
Desacoplando aplicaciones
 
Messaging patterns
Messaging patternsMessaging patterns
Messaging patterns
 
Theres a rabbit on my symfony
Theres a rabbit on my symfonyTheres a rabbit on my symfony
Theres a rabbit on my symfony
 
Scaling Web Apps With RabbitMQ - Erlang Factory Lite
Scaling Web Apps With RabbitMQ - Erlang Factory LiteScaling Web Apps With RabbitMQ - Erlang Factory Lite
Scaling Web Apps With RabbitMQ - Erlang Factory Lite
 
Integrating php withrabbitmq_zendcon
Integrating php withrabbitmq_zendconIntegrating php withrabbitmq_zendcon
Integrating php withrabbitmq_zendcon
 
Scaling webappswithrabbitmq
Scaling webappswithrabbitmqScaling webappswithrabbitmq
Scaling webappswithrabbitmq
 
Integrating RabbitMQ with PHP
Integrating RabbitMQ with PHPIntegrating RabbitMQ with PHP
Integrating RabbitMQ with PHP
 

Recently uploaded

Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024SkyPlanner
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1DianaGray10
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXTarek Kalaji
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...DianaGray10
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemAsko Soukka
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostMatt Ray
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...Aggregage
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioChristian Posta
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintMahmoud Rabie
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1DianaGray10
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Commit University
 

Recently uploaded (20)

Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024Salesforce Miami User Group Event - 1st Quarter 2024
Salesforce Miami User Group Event - 1st Quarter 2024
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1Secure your environment with UiPath and CyberArk technologies - Session 1
Secure your environment with UiPath and CyberArk technologies - Session 1
 
VoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBXVoIP Service and Marketing using Odoo and Asterisk PBX
VoIP Service and Marketing using Odoo and Asterisk PBX
 
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
Connector Corner: Extending LLM automation use cases with UiPath GenAI connec...
 
Bird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystemBird eye's view on Camunda open source ecosystem
Bird eye's view on Camunda open source ecosystem
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCostKubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
KubeConEU24-Monitoring Kubernetes and Cloud Spend with OpenCost
 
20150722 - AGV
20150722 - AGV20150722 - AGV
20150722 - AGV
 
20230104 - machine vision
20230104 - machine vision20230104 - machine vision
20230104 - machine vision
 
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
The Data Metaverse: Unpacking the Roles, Use Cases, and Tech Trends in Data a...
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
Comparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and IstioComparing Sidecar-less Service Mesh from Cilium and Istio
Comparing Sidecar-less Service Mesh from Cilium and Istio
 
Empowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership BlueprintEmpowering Africa's Next Generation: The AI Leadership Blueprint
Empowering Africa's Next Generation: The AI Leadership Blueprint
 
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1UiPath Platform: The Backend Engine Powering Your Automation - Session 1
UiPath Platform: The Backend Engine Powering Your Automation - Session 1
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)Crea il tuo assistente AI con lo Stregatto (open source python framework)
Crea il tuo assistente AI con lo Stregatto (open source python framework)
 

RabbitMQ Hands On

  • 1. RabbitMQ Hands On Álvaro Videla - VMware Monday, February 25, 13
  • 2. About Me • Developer Advocate for Cloud Foundry • Blog: http://videlalvaro.github.com/ • Twitter: @old_sound Monday, February 25, 13
  • 3. About Me • Developer Advocate for Cloud Foundry • Blog: http://videlalvaro.github.com/ • Twitter: @old_sound • I created gifsockets™ Monday, February 25, 13
  • 4. About Me Co-authored RabbitMQ in Action http://bit.ly/rabbitmq Monday, February 25, 13
  • 5. Why do you need messaging? Monday, February 25, 13
  • 6. Classic Web Apps Monday, February 25, 13
  • 7. Implement a Photo Gallery Monday, February 25, 13
  • 10. ‘Till new requirements arrive Monday, February 25, 13
  • 11. The Product Owner Monday, February 25, 13
  • 12. Can we also notify the user friends when she uploads a new image? Monday, February 25, 13
  • 13. Can we also notify the user friends when she uploads a new image? I forgot to mention we need it for tomorrow… Monday, February 25, 13
  • 15. The Social Media Guru Monday, February 25, 13
  • 16. We need to give badges to users for each picture upload Monday, February 25, 13
  • 17. We need to give badges to users for each picture upload and post uploads to Twitter Monday, February 25, 13
  • 20. Dumb! You’re delivering full size images! The bandwidth bill has tripled! Monday, February 25, 13
  • 21. Dumb! You’re delivering full size images! The bandwidth bill has tripled! We need this fixed for yesterday! Monday, February 25, 13
  • 23. The Developer in the other team Monday, February 25, 13
  • 24. I need to call your PHP stuff but from Python Monday, February 25, 13
  • 25. I need to call your PHP stuff but from Python And also Java starting next week Monday, February 25, 13
  • 28. I don’t want to wait till your app resizes my image! Monday, February 25, 13
  • 31. Let’s see the code evolution Monday, February 25, 13
  • 32. Pseudo Code Comments %% image_controller handle('PUT', "/user/image", ReqData) -> image_handler:do_upload(ReqData:get_file()), ok. Monday, February 25, 13
  • 33. Pseudo Code Function Name %% image_controller handle('PUT', "/user/image", ReqData) -> image_handler:do_upload(ReqData:get_file()), ok. Monday, February 25, 13
  • 34. Pseudo Code Arguments %% image_controller handle('PUT', "/user/image", ReqData) -> image_handler:do_upload(ReqData:get_file()), ok. Monday, February 25, 13
  • 35. Pseudo Code Function Body %% image_controller handle('PUT', "/user/image", ReqData) -> image_handler:do_upload(ReqData:get_file()), ok. Monday, February 25, 13
  • 36. Pseudo Code Return Value %% image_controller handle('PUT', "/user/image", ReqData) -> image_handler:do_upload(ReqData:get_file()), ok. Monday, February 25, 13
  • 37. First Implementation: %% image_controller handle('PUT', "/user/image", ReqData) -> image_handler:do_upload(ReqData:get_file()), ok. Monday, February 25, 13
  • 38. Second Implementation: %% image_controller handle('PUT', "/user/image", ReqData) -> {ok, Image} = image_handler:do_upload(ReqData:get_file()), resize_image(Image), ok. Monday, February 25, 13
  • 39. Third Implementation: %% image_controller handle('PUT', "/user/image", ReqData) -> {ok, Image} = image_handler:do_upload(ReqData:get_file()), resize_image(Image), notify_friends(ReqData:get_user()), ok. Monday, February 25, 13
  • 40. Fourth Implementation: %% image_controller handle('PUT', "/user/image", ReqData) -> {ok, Image} = image_handler:do_upload(ReqData:get_file()), resize_image(Image), notify_friends(ReqData:get_user()), add_points_to_user(ReqData:get_user()), ok. Monday, February 25, 13
  • 41. Final Implementation: %% image_controller handle('PUT', "/user/image", ReqData) -> {ok, Image} = image_handler:do_upload(ReqData:get_file()), resize_image(Image), notify_friends(ReqData:get_user()), add_points_to_user(ReqData:get_user()), tweet_new_image(User, Image), ok. Monday, February 25, 13
  • 42. Can our code scale to new requirements? Monday, February 25, 13
  • 44. What if • We need to speed up image conversion Monday, February 25, 13
  • 45. What if • We need to speed up image conversion • User notifications sent by email Monday, February 25, 13
  • 46. What if • We need to speed up image conversion • User notifications sent by email • Stop tweeting about new images Monday, February 25, 13
  • 47. What if • We need to speed up image conversion • User notifications sent by email • Stop tweeting about new images • Resize in different formats Monday, February 25, 13
  • 48. What if • We need to speed up image conversion • User notifications sent by email • Stop tweeting about new images • Resize in different formats • Swap Language / Technology (No Down Time) Monday, February 25, 13
  • 49. Can we do better? Monday, February 25, 13
  • 50. Sure. Using messaging Monday, February 25, 13
  • 51. Design Publish / Subscribe Pattern Monday, February 25, 13
  • 52. First Implementation: %% image_controller handle('PUT', "/user/image", ReqData) -> {ok, Image} = image_handler:do_upload(ReqData:get_file()), Msg = #msg{user = ReqData:get_user(), image = Image}, publish_message('new_image', Msg). Monday, February 25, 13
  • 53. First Implementation: %% image_controller handle('PUT', "/user/image", ReqData) -> {ok, Image} = image_handler:do_upload(ReqData:get_file()), Msg = #msg{user = ReqData:get_user(), image = Image}, publish_message('new_image', Msg). %% friends notifier on('new_image', Msg) -> notify_friends(Msg.user, Msg.image). Monday, February 25, 13
  • 54. First Implementation: %% image_controller handle('PUT', "/user/image", ReqData) -> {ok, Image} = image_handler:do_upload(ReqData:get_file()), Msg = #msg{user = ReqData:get_user(), image = Image}, publish_message('new_image', Msg). %% friends notifier on('new_image', Msg) -> notify_friends(Msg.user, Msg.image). %% points manager on('new_image', Msg) -> add_points(Msg.user, 'new_image'). Monday, February 25, 13
  • 55. First Implementation: %% image_controller handle('PUT', "/user/image", ReqData) -> {ok, Image} = image_handler:do_upload(ReqData:get_file()), Msg = #msg{user = ReqData:get_user(), image = Image}, publish_message('new_image', Msg). %% friends notifier on('new_image', Msg) -> notify_friends(Msg.user, Msg.image). %% points manager on('new_image', Msg) -> add_points(Msg.user, 'new_image'). %% resizer on('new_image', Msg) -> resize_image(Msg.image). Monday, February 25, 13
  • 57. Second Implementation: THIS PAGE INTENTIONALLY LEFT BLANK Monday, February 25, 13
  • 59. Messaging and RabbitMQ Monday, February 25, 13
  • 61. RabbitMQ • Multi Protocol Messaging Server Monday, February 25, 13
  • 62. RabbitMQ • Multi Protocol Messaging Server • Open Source (MPL) Monday, February 25, 13
  • 63. RabbitMQ • Multi Protocol Messaging Server • Open Source (MPL) • Part of Spring Source Monday, February 25, 13
  • 64. RabbitMQ • Polyglot • Multi Protocol • Open Source (MPL) • Written in Erlang/OTP Monday, February 25, 13
  • 65. Multi Protocol http://bit.ly/rmq-protocols Monday, February 25, 13
  • 66. Polyglot • PHP • node.js • Erlang • Java • Ruby • .Net • Haskell Monday, February 25, 13
  • 67. TELL ME MORE Monday, February 25, 13
  • 68. CODE OR IT DIDN’T HAPPEN http://github.com/videlalvaro/php-amqplib Monday, February 25, 13
  • 70. Scale Messaging Monday, February 25, 13
  • 71. Scale Decoupling Messaging Monday, February 25, 13
  • 72. Scale Decoupling Messaging Polyglot Apps Monday, February 25, 13
  • 74. Thanks! @old_sound Monday, February 25, 13