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

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
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesMd Hossain Ali
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
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
 
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
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding TeamAdam Moalla
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaborationbruanjhuli
 
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
 
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
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfinfogdgmi
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
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
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Adtran
 
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...Daniel Zivkovic
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfAijun Zhang
 
The Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API ManagementThe Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API ManagementNuwan Dias
 

Recently uploaded (20)

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
 
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just MinutesAI Fame Rush Review – Virtual Influencer Creation In Just Minutes
AI Fame Rush Review – Virtual Influencer Creation In Just Minutes
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
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
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team9 Steps For Building Winning Founding Team
9 Steps For Building Winning Founding Team
 
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online CollaborationCOMPUTER 10: Lesson 7 - File Storage and Online Collaboration
COMPUTER 10: Lesson 7 - File Storage and Online Collaboration
 
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
 
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
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Videogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdfVideogame localization & technology_ how to enhance the power of translation.pdf
Videogame localization & technology_ how to enhance the power of translation.pdf
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
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
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™Meet the new FSP 3000 M-Flex800™
Meet the new FSP 3000 M-Flex800™
 
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
All in AI: LLM Landscape & RAG in 2024 with Mark Ryan (Google) & Jerry Liu (L...
 
Machine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdfMachine Learning Model Validation (Aijun Zhang 2024).pdf
Machine Learning Model Validation (Aijun Zhang 2024).pdf
 
The Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API ManagementThe Kubernetes Gateway API and its role in Cloud Native API Management
The Kubernetes Gateway API and its role in Cloud Native API Management
 

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