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

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
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI AgeCprime
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialJoão Esperancinha
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentPim van der Noll
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesThousandEyes
 
QMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfQMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfROWELL MARQUINA
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Mark Simos
 
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
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Karmanjay Verma
 
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
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesManik S Magar
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
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
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Nikki Chapple
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfAarwolf Industries LLC
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 

Recently uploaded (20)

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
 
A Framework for Development in the AI Age
A Framework for Development in the AI AgeA Framework for Development in the AI Age
A Framework for Development in the AI Age
 
How Tech Giants Cut Corners to Harvest Data for A.I.
How Tech Giants Cut Corners to Harvest Data for A.I.How Tech Giants Cut Corners to Harvest Data for A.I.
How Tech Giants Cut Corners to Harvest Data for A.I.
 
Kuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorialKuma Meshes Part I - The basics - A tutorial
Kuma Meshes Part I - The basics - A tutorial
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native developmentEmixa Mendix Meetup 11 April 2024 about Mendix Native development
Emixa Mendix Meetup 11 April 2024 about Mendix Native development
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyesAssure Ecommerce and Retail Operations Uptime with ThousandEyes
Assure Ecommerce and Retail Operations Uptime with ThousandEyes
 
QMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdfQMMS Lesson 2 - Using MS Excel Formula.pdf
QMMS Lesson 2 - Using MS Excel Formula.pdf
 
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
Tampa BSides - The No BS SOC (slides from April 6, 2024 talk)
 
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...
 
Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#Microservices, Docker deploy and Microservices source code in C#
Microservices, Docker deploy and Microservices source code in C#
 
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
 
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotesMuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
MuleSoft Online Meetup Group - B2B Crash Course: Release SparkNotes
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
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 -...
 
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
Microsoft 365 Copilot: How to boost your productivity with AI – Part two: Dat...
 
Landscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdfLandscape Catalogue 2024 Australia-1.pdf
Landscape Catalogue 2024 Australia-1.pdf
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 

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