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

All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFMichael Gough
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesBernd Ruecker
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Farhan Tariq
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...Karmanjay Verma
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructureitnewsafrica
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesThousandEyes
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxLoriGlavin3
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsYoss Cohen
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkPixlogix Infotech
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Hiroshi SHIBATA
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024TopCSSGallery
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...BookNet Canada
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...itnewsafrica
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfpanagenda
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...itnewsafrica
 

Recently uploaded (20)

All These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDFAll These Sophisticated Attacks, Can We Really Detect Them - PDF
All These Sophisticated Attacks, Can We Really Detect Them - PDF
 
QCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architecturesQCon London: Mastering long-running processes in modern architectures
QCon London: Mastering long-running processes in modern architectures
 
Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...Genislab builds better products and faster go-to-market with Lean project man...
Genislab builds better products and faster go-to-market with Lean project man...
 
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...React JS; all concepts. Contains React Features, JSX, functional & Class comp...
React JS; all concepts. Contains React Features, JSX, functional & Class comp...
 
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical InfrastructureVarsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
Varsha Sewlal- Cyber Attacks on Critical Critical Infrastructure
 
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyesHow to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
How to Effectively Monitor SD-WAN and SASE Environments with ThousandEyes
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptxThe Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
The Role of FIDO in a Cyber Secure Netherlands: FIDO Paris Seminar.pptx
 
Infrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platformsInfrared simulation and processing on Nvidia platforms
Infrared simulation and processing on Nvidia platforms
 
React Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App FrameworkReact Native vs Ionic - The Best Mobile App Framework
React Native vs Ionic - The Best Mobile App Framework
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024Long journey of Ruby standard library at RubyConf AU 2024
Long journey of Ruby standard library at RubyConf AU 2024
 
Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024Top 10 Hubspot Development Companies in 2024
Top 10 Hubspot Development Companies in 2024
 
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
Transcript: New from BookNet Canada for 2024: BNC SalesData and LibraryData -...
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...Abdul Kader Baba- Managing Cybersecurity Risks  and Compliance Requirements i...
Abdul Kader Baba- Managing Cybersecurity Risks and Compliance Requirements i...
 
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdfSo einfach geht modernes Roaming fuer Notes und Nomad.pdf
So einfach geht modernes Roaming fuer Notes und Nomad.pdf
 
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...Zeshan Sattar- Assessing the skill requirements and industry expectations for...
Zeshan Sattar- Assessing the skill requirements and industry expectations for...
 

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