My presentation from the Ruby Hoedown on cloud computing and how Ruby developers can take advantage of cloud services to build scalable web applications.
23. Cloud computing, defined http://www.infoworld.com/article/08/04/07/15FE-cloud-computing-reality_1.html “ A way to increase capacity or add capabilities on the fly without investing in new infrastructure, training new personnel, or licensing new software.” - InfoWorld, April 2008
24.
25. Why is this important? "By 2011, early technology adopters will forgo capital expenditures and instead purchase 40 percent of their IT infrastructure as a service. Increased high-speed bandwidth makes it practical to locate infrastructure at other sites and still receive the same response times. Enterprises believe that as service-oriented architecture (SOA) becomes common, 'cloud computing' will take off, thus untying applications from specific infrastructure.” - Gartner Group
62. SQS # Get an SQS queue q = SQS.get_queue ”my_sqs_queue_name” # Send a message made up of the job id q.send_message “#{self.id}” # Grab a job from the queue message = queue.receive_message # Delete the job from the queue message.delete app/models/job.rb
64. SQS: right_aws gem # Pull a message from the queue and make it invisible message1 = queue2.receive message1.visibility = 0 puts message1 # Clear the queue, add a message, delete first accessible msg queue2.clear(true) queue2.send_message(‘Ola-la!’) message2 = queue2.pop
66. SimpleDB: right_aws gem # Create a new domain sdb.create_domain(‘toys’) # Delete a domain Sdb.delete_domain(‘toys’) # Create and save attributes for Jon and Silvia attributes = {} attributes['Jon'] = %w{ car beer } attributes['Silvia'] = %w{ beetle rolling_pin kids } sdb.put_attributes ‘family’, ‘toys’
67. SimpleDB: right_aws gem # Get attributes sdb.get_attributes(‘family’, ‘toys’) # Get attributes only for cat sdb.get_attributes(‘family’, ‘toys’, ‘cat’) # Query query = ”[‘cat’ = ‘claw’]” sdb.query(‘family’, query) # Query returning 10 items sdb.query(‘family’, query, 10)