600 likes | 708 Views
R uby on Rails & W indows Azure @ sriramk s riramkrishnan.com. July 25 th , 1965 Newport, Rhode Island. http://www.flickr.com/photos/joegratz/83461579. Windows Azure and the Microsoft cloud. S calable C omputation. Cloud Storage. Utility billing. Automated management. +. ?!.
E N D
Ruby on Rails &Windows Azure @sriramk sriramkrishnan.com
July 25th, 1965 Newport, Rhode Island
+ • ?!
NOT! Useful
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 • Many, many combinations possible • Most work great
Worker Role (Windows Azure VM) Process.Start() script/server Port 80 Run() Wrapper code Ruby installation .NET
Worker Role (Windows Azure VM) Process.Start() WEBRick/Mongrel Run() Wrapper code mod_proxy_balancer Port 80 .NET Apache
GEMS • Package with app • At runtime, use Gem::GemRunneror “gem install” • Caveat – Not all gems build/work on 64-bit Windows
MYSQL • Runs great on Windows Azure
MYSQL • Solution Accelerator • http://bit.ly/99Bx9H • Master/slave, scale up and down slaves, periodic backups
WINDOWS AZURECLOUD STORAGE SERVICES SQL Azure Blobs Tables Queues
SQL Azure • Cloud-based relational database service • Scalable, available, fault-tolerant • Works with T-SQL based libraries/tools
SQL Azure Useactiverecord-sqlserver-adapter Patch usinghttp://gist.github.com/318780
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’,'somecontent’) 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_nameeq ‘Adama‘)", :top => 2} )
memcached • http://code.msdn.microsoft.com/winazurememcached