Your SlideShare is downloading. ×
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Cloud Messaging With Cloud Foundry
Upcoming SlideShare
Loading in...5
×

Thanks for flagging this SlideShare!

Oops! An error has occurred.

×
Saving this for later? Get the SlideShare app to save on your phone or tablet. Read anywhere, anytime – even offline.
Text the download link to your phone
Standard text messaging rates apply

Cloud Messaging With Cloud Foundry

3,051

Published on

The Pub/Sub Pattern Image is taken from here: http://www.eaipatterns.com/PublishSubscribeChannel.html

The Pub/Sub Pattern Image is taken from here: http://www.eaipatterns.com/PublishSubscribeChannel.html

Published in: Technology
0 Comments
4 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
3,051
On Slideshare
0
From Embeds
0
Number of Embeds
9
Actions
Shares
0
Downloads
49
Comments
0
Likes
4
Embeds 0
No embeds

Report content
Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
No notes for slide

Transcript

  • 1. Cloud Messaging with Cloud Foundry Álvaro Videla - VMware © 2012 VMware, Inc. All rights reserved.Tuesday, November 13, 12
  • 2. About Me • Developer Advocate for Cloud Foundry • Blog: http://videlalvaro.github.com/ • Twitter: @old_sound 2Tuesday, November 13, 12
  • 3. About Me • Developer Advocate for Cloud Foundry • Blog: http://videlalvaro.github.com/ • Twitter: @old_sound • I created gifsockets™ 3Tuesday, November 13, 12
  • 4. About Me Co-authored RabbitMQ in Action http://bit.ly/rabbitmq 4Tuesday, November 13, 12
  • 5. Classic Apps 5Tuesday, November 13, 12
  • 6. Implement a Photo GalleryTuesday, November 13, 12
  • 7. Two Parts:Tuesday, November 13, 12
  • 8. Pretty SimpleTuesday, November 13, 12
  • 9. ‘Till new requirements arriveTuesday, November 13, 12
  • 10. The Product OwnerTuesday, November 13, 12
  • 11. Can we also notify the user friends when she uploads a new image?Tuesday, November 13, 12
  • 12. Can we also notify the user friends when she uploads a new image? I forgot to mention we need it for tomorrow…Tuesday, November 13, 12
  • 13. Tuesday, November 13, 12
  • 14. The Social Media GuruTuesday, November 13, 12
  • 15. We need to give badges to users for each picture uploadTuesday, November 13, 12
  • 16. We need to give badges to users for each picture upload and post uploads to TwitterTuesday, November 13, 12
  • 17. Tuesday, November 13, 12
  • 18. The SysadminTuesday, November 13, 12
  • 19. Dumb! You’re delivering full size images! The bandwidth bill has tripled!Tuesday, November 13, 12
  • 20. Dumb! You’re delivering full size images! The bandwidth bill has tripled! We need this fixed for yesterday!Tuesday, November 13, 12
  • 21. Tuesday, November 13, 12
  • 22. The Developer in the other teamTuesday, November 13, 12
  • 23. I need to call your PHP stuff but from PythonTuesday, November 13, 12
  • 24. I need to call your PHP stuff but from Python And also Java starting next weekTuesday, November 13, 12
  • 25. Tuesday, November 13, 12
  • 26. The UserTuesday, November 13, 12
  • 27. I don’t want to wait till your app resizes my image!Tuesday, November 13, 12
  • 28. YouTuesday, November 13, 12
  • 29. Tuesday, November 13, 12
  • 30. Let’s see the code evolution 30Tuesday, November 13, 12
  • 31. Pseudo Code Comments %% image_controller handle(PUT, "/user/image", ReqData) -> image_handler:do_upload(ReqData:get_file()), ok.Tuesday, November 13, 12
  • 32. Pseudo Code Function Name %% image_controller handle(PUT, "/user/image", ReqData) -> image_handler:do_upload(ReqData:get_file()), ok.Tuesday, November 13, 12
  • 33. Pseudo Code Arguments %% image_controller handle(PUT, "/user/image", ReqData) -> image_handler:do_upload(ReqData:get_file()), ok.Tuesday, November 13, 12
  • 34. Pseudo Code Function Body %% image_controller handle(PUT, "/user/image", ReqData) -> image_handler:do_upload(ReqData:get_file()), ok.Tuesday, November 13, 12
  • 35. Pseudo Code Return Value %% image_controller handle(PUT, "/user/image", ReqData) -> image_handler:do_upload(ReqData:get_file()), ok.Tuesday, November 13, 12
  • 36. First Implementation: %% image_controller handle(PUT, "/user/image", ReqData) -> image_handler:do_upload(ReqData:get_file()), ok.Tuesday, November 13, 12
  • 37. Second Implementation: %% image_controller handle(PUT, "/user/image", ReqData) -> {ok, Image} = image_handler:do_upload(ReqData:get_file()), resize_image(Image), ok.Tuesday, November 13, 12
  • 38. 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.Tuesday, November 13, 12
  • 39. 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.Tuesday, November 13, 12
  • 40. 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.Tuesday, November 13, 12
  • 41. Can our code scale to new requirements? 41Tuesday, November 13, 12
  • 42. What if 42Tuesday, November 13, 12
  • 43. What if • We need to speed up image conversion 43Tuesday, November 13, 12
  • 44. What if • We need to speed up image conversion • User notification has to be sent by email 44Tuesday, November 13, 12
  • 45. What if • We need to speed up image conversion • User notification has to be sent by email • Stop tweeting about new images 45Tuesday, November 13, 12
  • 46. What if • We need to speed up image conversion • User notification has to be sent by email • Stop tweeting about new images • Resize in different formats 46Tuesday, November 13, 12
  • 47. What if • We need to speed up image conversion • User notification has to be sent by email • Stop tweeting about new images • Resize in different formats • Swap Language / Technology 47Tuesday, November 13, 12
  • 48. What if • We need to speed up image conversion • User notification has to be sent by email • Stop tweeting about new images • Resize in different formats • Swap Language / Technology (No Down Time) 48Tuesday, November 13, 12
  • 49. Can we do better? 49Tuesday, November 13, 12
  • 50. Sure. Using messaging 50Tuesday, November 13, 12
  • 51. Design Publish / Subscribe PatternTuesday, November 13, 12
  • 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).Tuesday, November 13, 12
  • 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).Tuesday, November 13, 12
  • 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).Tuesday, November 13, 12
  • 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).Tuesday, November 13, 12
  • 56. Second Implementation:Tuesday, November 13, 12
  • 57. Second Implementation: THIS PAGE INTENTIONALLY LEFT BLANKTuesday, November 13, 12
  • 58. Tuesday, November 13, 12
  • 59. Messaging 59Tuesday, November 13, 12
  • 60. Messaging • Share data across processes 60Tuesday, November 13, 12
  • 61. Messaging • Share data across processes • Processes can be part of different apps 61Tuesday, November 13, 12
  • 62. Messaging • Share data across processes • Processes can be part of different apps • Apps can live in different machines 62Tuesday, November 13, 12
  • 63. Messaging • Share data across processes • Processes can be part of different apps • Apps can live in different machines • Communication is Asynchronous 63Tuesday, November 13, 12
  • 64. Main Concepts 64Tuesday, November 13, 12
  • 65. Main Concepts • Messages are sent by Producers 65Tuesday, November 13, 12
  • 66. Main Concepts • Messages are sent by Producers • Messages are delivered to Consumers 66Tuesday, November 13, 12
  • 67. How can we start using messaging today? 67Tuesday, November 13, 12
  • 68. Enter 68Tuesday, November 13, 12
  • 69. Why Cloud Foundry is Good™ for Messaging? 69Tuesday, November 13, 12
  • 70. Key aspects of Cloud Foundry 70Tuesday, November 13, 12
  • 71. Key aspects of Cloud Foundry • Supports many apps per account 71Tuesday, November 13, 12
  • 72. Key aspects of Cloud Foundry • Supports many apps per account • Supports many services per account 72Tuesday, November 13, 12
  • 73. Key aspects of Cloud Foundry • Supports many apps per account • Supports many services per account • Services can be shared across apps 73Tuesday, November 13, 12
  • 74. Key aspects of Cloud Foundry • Supports many apps per account • Supports many services per account • Services can be shared across apps • Supports RabbitMQ by default 74Tuesday, November 13, 12
  • 75. Intermission: What is RabbitMQ 75Tuesday, November 13, 12
  • 76. RabbitMQ 76Tuesday, November 13, 12
  • 77. RabbitMQ • Multi Protocol Messaging Server 77Tuesday, November 13, 12
  • 78. RabbitMQ • Multi Protocol Messaging Server • Open Source (MPL) 78Tuesday, November 13, 12
  • 79. RabbitMQ • Multi Protocol Messaging Server • Open Source (MPL) • Part of Spring Source 79Tuesday, November 13, 12
  • 80. RabbitMQ • Multi Protocol Messaging Server • Open Source (MPL) • Part of Spring Source • Supports AMQP, STOMP, MQTT 80Tuesday, November 13, 12
  • 81. RabbitMQ • Multi Protocol Messaging Server • Open Source (MPL) • Part of Spring Source • Supports AMQP, STOMP, MQTT • Has Clients for Many Platforms: Java, Ruby, node.js, PHP, Erlang, .Net., more 81Tuesday, November 13, 12
  • 82. TELL ME MORE 82Tuesday, November 13, 12
  • 83. TELL ME MORE RabbitMQ Simulator Demo 83Tuesday, November 13, 12
  • 84. Sample App: CloudStagram 84Tuesday, November 13, 12
  • 85. Sample App: CloudStagram 85Tuesday, November 13, 12
  • 86. Sample App: CloudStagram 86Tuesday, November 13, 12
  • 87. Sample App: CloudStagram 87Tuesday, November 13, 12
  • 88. Sample App: CloudStagram 88Tuesday, November 13, 12
  • 89. Sample App: CloudStagram 89Tuesday, November 13, 12
  • 90. Sample App: CloudStagram 90Tuesday, November 13, 12
  • 91. Sample App: CloudStagram Frontend App node.js 91Tuesday, November 13, 12
  • 92. Sample App: CloudStagram Frontend App node.js Image Resizers node.js 92Tuesday, November 13, 12
  • 93. Sample App: CloudStagram Frontend App node.js Image Resizers Clojure 93Tuesday, November 13, 12
  • 94. CODE OR IT DIDN’T HAPPEN 94Tuesday, November 13, 12
  • 95. CODA 95Tuesday, November 13, 12
  • 96. Messaging 96Tuesday, November 13, 12
  • 97. Scale Messaging 97Tuesday, November 13, 12
  • 98. Scale Decoupling Messaging 98Tuesday, November 13, 12
  • 99. Scale Decoupling Messaging Polyglot 99Tuesday, November 13, 12
  • 100. 100Tuesday, November 13, 12
  • 101. Heavy Lifting 101Tuesday, November 13, 12
  • 102. Heavy Multi Lifting Apps 102Tuesday, November 13, 12
  • 103. Heavy Multi Lifting Apps Multi Services 103Tuesday, November 13, 12
  • 104. Heavy Multi Lifting Apps Multi Cloud Services Messaging 104Tuesday, November 13, 12
  • 105. Sign Up Today https://my.cloudfoundry.com/signup 105Tuesday, November 13, 12
  • 106. Questions? 106Tuesday, November 13, 12
  • 107. Thanks! Álvaro Videla http://twitter.com/old_sound http://github.com/videlalvaro http://www.slideshare.net/old_sound 107Tuesday, November 13, 12

×