Ruby on Rails & Windows sriramkrishnan.com
July 25 th, 1965 Newport, Rhode Island
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'
Useful NOT!
THE RAILS “STACK”
load balancers
LOAD BALANCERS Pound, Varnish, Pen, hardware solutions, etc…
LOAD BALANCERS Part of the platform Any available TCP port Can pull VMs in/out of rotation
REVERSE PROXIES mod_proxy, Perlbal, nginx, …
REVERSE PROXIES Works the same way
app/web servers
APP & WEB SERVERS Many, many combinations possible Most work great
APP & WEB SERVERS
GEMS Package with app At runtime, use Gem::GemRunner or “ gem install ” Caveat – Not all gems build/work on 64-bit Windows
data
MYSQL Runs great on Windows Azure
MYSQL Solution Accelerator Master/slave, scale up and down slaves, periodic backups
WINDOWS AZURE CLOUD STORAGE SERVICES SQL Azure BlobsTablesQueues
SQL Azure Cloud-based relational database service Scalable, available, fault-tolerant Works with T-SQL based libraries/tools
SQL Azure Use activerecord-sqlserver- adapter Patch using
Storage Services Public REST APIs waz-storage gem good starting point
Blobs Simple interface for storing named files with metadata Very large objects (upto 1TB in size per blob) Available through a CDN frontend
require '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’,'some content’) blob = container['my_blob.txt']
Queues Reliable delivery of messages Drop-in replacement for beanstalkd, starling, worker systems
WAZ::Storage::Base.establish_connection!( :account_name => account_name, :access_key => access_key) queue = WAZ::Queues::Queue.create('my-queue') queue.enqueue!("some message")
Tables Structured data at scale Efficiently insert, query and retrieve millions of entities
entity = { :first_name => ‘William', :last_name => ‘Adama', } service.insert_entity('customer_table', entity) service.query('customer_table', {:expression => "(last_name eq ‘Adama‘)", :top => 2} )
caching
memcached winazurememcached
day to day
Deployment Comes with the platform.
Deployment Use service management API to automate E.g : Deploy packages as a part of your Rakefile
Management Comes with the platform.
Management Use service management API to configure, upgrade, scale up/down Use monitoring/diagnostics API to replace nagios/ganglia
Debugging debug, to_yaml helpers work OOB Standard logger works great, logs to RAILS_ROOT/logs. Use diagnostics API to retrieve
THINGS TO REMEMBER Open platform Works well with Ruby world Jump in!
“louder”
The sriramkrishnan.com