Ruby on Rails&Windows Azure@sriramksriramkrishnan.com
July 25th, 1965Newport, Rhode Island
http://www.flickr.com/photos/joegratz/83461579
Windows Azure and the Microsoft cloud
Scalable Computation
Cloud Storage
Utility billing
Automated management
+?!
We love Ruby on Rails
And other languages/frameworks you secretly love ;)
puts'Hello world'
NOT!Useful
THE RAILS“STACK”
loadbalancers
Pound, Varnish, Pen, hardware solutions, etc…LOAD BALANCERS
Part of the platform
 Any available TCP port
 Can pull VMs in/out of rotationLOAD BALANCERS
mod_proxy,Perlbal, nginx, …REVERSE PROXIES
Works the same wayREVERSE PROXIES
app/webservers
Many, many combinations possibleMost work greatAPP& WEB SERVERS
APP& WEB SERVERS
Worker Role (Windows Azure VM)Process.Start()script/serverPort 80Run()Wrapper codeRuby installation.NET
Worker Role (Windows Azure VM)Process.Start()WEBRick/MongrelRun()Wrapper codemod_proxy_balancerPort 80.NETApache
GEMSPackage with app
 At runtime, use Gem::GemRunneror “gem install”
Caveat – Not all gems build/work on 64-bit Windowsdata
MYSQLRuns great on Windows Azure
MYSQLSolution Acceleratorhttp://bit.ly/99Bx9H  Master/slave, scale up and down slaves, periodic backups
WINDOWS AZURECLOUD STORAGE SERVICESSQL AzureBlobsTablesQueues
SQL AzureCloud-based relational database service
Scalable, available, fault-tolerant
 Works with T-SQL based libraries/toolsSQL AzureUseactiverecord-sqlserver-adapterPatch usinghttp://gist.github.com/318780
Storage ServicesPublic REST APIs
waz-storage gem good starting pointBlobsSimple interface for storing named files with metadata
Very large objects (upto 1TB in size per blob)
 Available through a CDN frontendrequire'waz-blobs‘WAZ::Storage::Base.establish_connection!(:account_name => account_name,                                          :access_key => access_key)container =WAZ::Blobs::Container.create('my-container‘)blob =container.store('my_blob.txt’,'somecontent’,'plain/text‘)blob = container['my_blob.txt']
QueuesReliable delivery of messages
Drop-in replacement for beanstalkd, starling, worker systemsWAZ::Storage::Base.establish_connection!(:account_name => account_name,                                 :access_key => access_key)queue =WAZ::Queues::Queue.create('my-queue')queue.enqueue!("some message")
TablesStructured data at scale
 Efficiently insert, query and retrieve millions of entitiesentity = { :first_name => ‘William',               :last_name => ‘Adama',                }service.insert_entity('customer_table', entity)        service.query('customer_table',     {:expression => "(last_nameeq ‘Adama‘)",     :top => 2} )
caching
memcachedhttp://code.msdn.microsoft.com/winazurememcached
day to day
DeploymentComes with the platform.
DeploymentUse service management API to automateE.g : Deploy packages as a part of your Rakefile
ManagementComes with the platform.
ManagementUse service management API to configure, upgrade, scale up/down
Use monitoring/diagnostics API to replacenagios/gangliaDebuggingdebug, to_yaml helpers work OOB

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

Editor's Notes

  • #36 Needs diagram, add content from raw deck
  • #37 http://code.msdn.microsoft.com/winazuremediawiki