Ruby on Rails<br />&Windows Azure<br />@sriramk<br />sriramkrishnan.com<br />
July 25th, 1965<br />Newport, Rhode Island<br />
http://www.flickr.com/photos/joegratz/83461579<br />
Windows Azure and the Microsoft cloud<br />
Scalable Computation<br />
Cloud Storage<br />
Utility billing<br />
Automated management<br />
+<br />?!<br />
We love Ruby on Rails<br />
And other languages/frameworks you secretly love ;)<br />
puts'Hello world'<br />
NOT!<br />Useful<br />
THE RAILS“STACK”<br />
loadbalancers<br />
Pound, Varnish, Pen, hardware solutions, etc…<br />LOAD BALANCERS<br />
<ul><li>Part of the platform
 Any available TCP port
 Can pull VMs in/out of rotation</li></ul>LOAD BALANCERS<br />
mod_proxy,Perlbal, nginx, …<br />REVERSE PROXIES<br />
Works the same way<br />REVERSE PROXIES<br />
app/webservers<br />
Many, many combinations possible<br />Most work great<br />APP& WEB SERVERS<br />
APP& WEB SERVERS<br />
Worker Role (Windows Azure VM)<br />Process.Start()<br />script/server<br />Port 80<br />Run()<br />Wrapper code<br />Ruby...
Worker Role (Windows Azure VM)<br />Process.Start()<br />WEBRick/Mongrel<br />Run()<br />Wrapper code<br />mod_proxy_balan...
GEMS<br /><ul><li>Package with app
 At runtime, use Gem::GemRunneror “gem install”
Caveat – Not all gems build/work on 64-bit Windows</li></li></ul><li>data<br />
MYSQL<br />Runs great on Windows Azure<br />
MYSQL<br />Solution Accelerator<br />http://bit.ly/99Bx9H <br /> Master/slave, scale up and down slaves, periodic backups<...
WINDOWS AZURECLOUD STORAGE SERVICES<br />SQL Azure<br />Blobs<br />Tables<br />Queues<br />
SQL Azure<br /><ul><li>Cloud-based relational database service
Scalable, available, fault-tolerant
 Works with T-SQL based libraries/tools</li></li></ul><li>SQL Azure<br />Useactiverecord-sqlserver-adapter<br />Patch usin...
Storage Services<br /><ul><li>Public REST APIs
waz-storage gem good starting point</li></li></ul><li>Blobs<br /><ul><li>Simple interface for storing named files with met...
Very large objects (upto 1TB in size per blob)
 Available through a CDN frontend</li></li></ul><li>require'waz-blobs‘<br />WAZ::Storage::Base.establish_connection!(:acco...
Queues<br /><ul><li>Reliable delivery of messages
Drop-in replacement for beanstalkd, starling, worker systems</li></li></ul><li>WAZ::Storage::Base.establish_connection!(:a...
Tables<br /><ul><li>Structured data at scale
 Efficiently insert, query and retrieve millions of entities</li></li></ul><li>entity = { :first_name => ‘William',       ...
caching<br />
memcached<br />http://code.msdn.microsoft.com/winazurememcached<br />
day to day<br />
Deployment<br />Comes with the platform. <br />
Deployment<br />Use service management API to automate<br />E.g : Deploy packages as a part of your Rakefile<br />
Management<br />Comes with the platform. <br />
Management<br /><ul><li>Use service management API to configure, upgrade, scale up/down
Use monitoring/diagnostics API to replacenagios/ganglia</li></li></ul><li>Debugging<br /><ul><li>debug, to_yaml helpers wo...
Upcoming SlideShare
Loading in...5
×

Building Ruby on Rails apps on Windows Azure (MIX 2010 at Last Vegas))

2,190

Published on

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

No Downloads
Views
Total Views
2,190
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
21
Comments
0
Likes
2
Embeds 0
No embeds

No notes for slide
  • Needs diagram, add content from raw deck
  • http://code.msdn.microsoft.com/winazuremediawiki
  • Building Ruby on Rails apps on Windows Azure (MIX 2010 at Last Vegas))

    1. 1. Ruby on Rails<br />&Windows Azure<br />@sriramk<br />sriramkrishnan.com<br />
    2. 2.
    3. 3. July 25th, 1965<br />Newport, Rhode Island<br />
    4. 4. http://www.flickr.com/photos/joegratz/83461579<br />
    5. 5.
    6. 6. Windows Azure and the Microsoft cloud<br />
    7. 7. Scalable Computation<br />
    8. 8. Cloud Storage<br />
    9. 9. Utility billing<br />
    10. 10. Automated management<br />
    11. 11. +<br />?!<br />
    12. 12. We love Ruby on Rails<br />
    13. 13. And other languages/frameworks you secretly love ;)<br />
    14. 14.
    15. 15. puts'Hello world'<br />
    16. 16.
    17. 17.
    18. 18. NOT!<br />Useful<br />
    19. 19. THE RAILS“STACK”<br />
    20. 20. loadbalancers<br />
    21. 21. Pound, Varnish, Pen, hardware solutions, etc…<br />LOAD BALANCERS<br />
    22. 22. <ul><li>Part of the platform
    23. 23. Any available TCP port
    24. 24. Can pull VMs in/out of rotation</li></ul>LOAD BALANCERS<br />
    25. 25. mod_proxy,Perlbal, nginx, …<br />REVERSE PROXIES<br />
    26. 26. Works the same way<br />REVERSE PROXIES<br />
    27. 27. app/webservers<br />
    28. 28.
    29. 29. Many, many combinations possible<br />Most work great<br />APP& WEB SERVERS<br />
    30. 30. APP& WEB SERVERS<br />
    31. 31.
    32. 32. Worker Role (Windows Azure VM)<br />Process.Start()<br />script/server<br />Port 80<br />Run()<br />Wrapper code<br />Ruby installation<br />.NET<br />
    33. 33. Worker Role (Windows Azure VM)<br />Process.Start()<br />WEBRick/Mongrel<br />Run()<br />Wrapper code<br />mod_proxy_balancer<br />Port 80<br />.NET<br />Apache<br />
    34. 34.
    35. 35. GEMS<br /><ul><li>Package with app
    36. 36. At runtime, use Gem::GemRunneror “gem install”
    37. 37. Caveat – Not all gems build/work on 64-bit Windows</li></li></ul><li>data<br />
    38. 38. MYSQL<br />Runs great on Windows Azure<br />
    39. 39. MYSQL<br />Solution Accelerator<br />http://bit.ly/99Bx9H <br /> Master/slave, scale up and down slaves, periodic backups<br />
    40. 40. WINDOWS AZURECLOUD STORAGE SERVICES<br />SQL Azure<br />Blobs<br />Tables<br />Queues<br />
    41. 41. SQL Azure<br /><ul><li>Cloud-based relational database service
    42. 42. Scalable, available, fault-tolerant
    43. 43. Works with T-SQL based libraries/tools</li></li></ul><li>SQL Azure<br />Useactiverecord-sqlserver-adapter<br />Patch usinghttp://gist.github.com/318780 <br />
    44. 44. Storage Services<br /><ul><li>Public REST APIs
    45. 45. waz-storage gem good starting point</li></li></ul><li>Blobs<br /><ul><li>Simple interface for storing named files with metadata
    46. 46. Very large objects (upto 1TB in size per blob)
    47. 47. Available through a CDN frontend</li></li></ul><li>require'waz-blobs‘<br />WAZ::Storage::Base.establish_connection!(:account_name => account_name,                                          :access_key => access_key)<br />container =WAZ::Blobs::Container.create('my-container‘)<br />blob =container.store('my_blob.txt’,'somecontent’,'plain/text‘)<br />blob = container['my_blob.txt']<br />
    48. 48. Queues<br /><ul><li>Reliable delivery of messages
    49. 49. Drop-in replacement for beanstalkd, starling, worker systems</li></li></ul><li>WAZ::Storage::Base.establish_connection!(:account_name => account_name,                                 :access_key => access_key)<br />queue =WAZ::Queues::Queue.create('my-queue')<br />queue.enqueue!("some message")<br />
    50. 50. Tables<br /><ul><li>Structured data at scale
    51. 51. Efficiently insert, query and retrieve millions of entities</li></li></ul><li>entity = { :first_name => ‘William',               :last_name => ‘Adama',                }<br />service.insert_entity('customer_table', entity)        <br />service.query('customer_table',     {:expression => "(last_nameeq ‘Adama‘)",     :top => 2} )<br />
    52. 52. caching<br />
    53. 53. memcached<br />http://code.msdn.microsoft.com/winazurememcached<br />
    54. 54.
    55. 55. day to day<br />
    56. 56. Deployment<br />Comes with the platform. <br />
    57. 57. Deployment<br />Use service management API to automate<br />E.g : Deploy packages as a part of your Rakefile<br />
    58. 58. Management<br />Comes with the platform. <br />
    59. 59. Management<br /><ul><li>Use service management API to configure, upgrade, scale up/down
    60. 60. Use monitoring/diagnostics API to replacenagios/ganglia</li></li></ul><li>Debugging<br /><ul><li>debug, to_yaml helpers work OOB
    61. 61. Standard logger works great, logs to RAILS_ROOT/logs. Use diagnostics API to retrieve</li></li></ul><li>
    62. 62. THINGS TO REMEMBER<br />Open platform<br />Works well with Ruby world<br />Jump in!<br />
    63. 63.
    64. 64. “louder”<br />
    65. 65. The end.<br />@sriramk<br />sriramkrishnan.com<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×