Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Release branch for 1.5.0 (SDB support)

git-svn-id: https://wush.net/svn/rightscale/right_aws/release_1_5_0@2786 9f0cbaf6-ce18-0410-ad37-d14a22affa91
  • Loading branch information...
commit 99b188dacdfb2f8cbd2486505da8589e29504c71 1 parent f561794
@trbryan trbryan authored
View
29 README.txt
@@ -5,15 +5,16 @@ For information about RightScale, see http://www.rightscale.com
== DESCRIPTION:
-The RightScale AWS gems have been designed to provide a robust, fast, and secure interface to Amazon EC2, Amazon, S3, and Amazon SQS. These gems have been used in production by RightScale since late 2006 and are being maintained to track enhancements made by Amazon. The RightScale AWS gems comprise:
+The RightScale AWS gems have been designed to provide a robust, fast, and secure interface to Amazon EC2, Amazon S3, Amazon SQS, and Amazon SDB. These gems have been used in production by RightScale since late 2006 and are being maintained to track enhancements made by Amazon. The RightScale AWS gems comprise:
- RightAws::Ec2 -- interface to Amazon EC2 (Elastic Compute Cloud)
- RightAws::S3 and RightAws::S3Interface -- interface to Amazon S3 (Simple Storage Service)
- RightAws::Sqs and RightAws::SqsInterface -- interface to Amazon SQS (Simple Queue Service)
+- RightAws::SdbInterface -- interface to Amazon SDB (SimpleDB)
== FEATURES:
-- Full programmmatic access to EC2, S3, and SQS.
+- Full programmmatic access to EC2, S3, SQS, and SDB.
- Complete error handling: all operations check for errors and report complete
error information by raising an AwsError.
- Persistent HTTP connections with robust network-level retry layer using
@@ -47,7 +48,7 @@ threads, you may want or need an HTTP connection per thread to enable
concurrent requests to AWS. The way this plays out in practice is:
1. If you have a non-multithreaded Ruby program, use the non-multithreaded setting.
2. If you have a multi-threaded Ruby program, use the multithreaded setting to enable
- concurrent requests to S3 (or SQS, or EC2).
+ concurrent requests to S3 (or SQS, or SDB, or EC2).
3. For running under Mongrel/Rails, use the non-multithreaded setting even though
mongrel is multithreaded. This is because only one Rails handler is invoked at
time (i.e. it acts like a single-threaded program)
@@ -55,7 +56,7 @@ concurrent requests to AWS. The way this plays out in practice is:
Note that due to limitations in the I/O of the Ruby interpreter you
may not get the degree of parallelism you may expect with the multi-threaded setting.
-By default, EC2/S3/SQS interface instances are created in single-threaded mode. Set
+By default, EC2/S3/SQS/SDB interface instances are created in single-threaded mode. Set
"params[:multi_thread]" to "true" in the initialization arguments to use
multithreaded mode.
@@ -67,10 +68,26 @@ multithreaded mode.
http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=48
* For SQS read RightAws::Sqs and consult the Amazon SQS API documentation at
http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=31
+* For SDB read RightAws::Sdb and consult the Amazon SDB API documentation at
+ http://developer.amazonwebservices.com/connect/kbcategory.jspa?categoryID=141
== KNOWN ISSUES:
-- Amazon recently (8/07) changed the semantics of the SQS service. A
+- 2/11/08: If you use RightAws in conjunction with attachment_fu, the
+ right_aws gem must be included (using the require statement) AFTER
+ attachment_fu. If right_aws is loaded before attachment_fu, you'll
+ encounter errors similar to:
+
+ s3.amazonaws.com temporarily unavailable: (wrong number of arguments (5 for 4))
+
+ or
+
+ 'incompatible Net::HTTP monkey-patch'
+
+ This is due to a conflict between the right_http_connection gem and another
+ gem required by attachment_fu.
+
+- 8/07: Amazon has changed the semantics of the SQS service. A
new queue may not be created within 60 seconds of the destruction of any
older queue with the same name. Certain methods of RightAws::Sqs and
RightAws::SqsInterface will fail with the message:
@@ -91,7 +108,7 @@ sudo gem install
== LICENSE:
-Copyright (c) 2007 RightScale, Inc.
+Copyright (c) 2007-2008 RightScale, Inc.
Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
View
2  lib/right_aws.rb
@@ -1,5 +1,5 @@
#
-# Copyright (c) 2007 RightScale Inc
+# Copyright (c) 2007-2008 RightScale Inc
#
# Permission is hereby granted, free of charge, to any person obtaining
# a copy of this software and associated documentation files (the
View
7 lib/s3/right_s3_interface.rb
@@ -303,7 +303,7 @@ def incrementally_list_bucket(bucket, options={}, headers={}, &block)
# when you retrieve the object. The total size of the HTTP
# request, not including the body, must be less than 4 KB.
#
- # s3.put('my_awesome_bucket', 'log/curent/1.log', 'Ola-la!', 'x-amz-meta-family'=>'Woho556!') #=> true
+ # s3.put('my_awesome_bucket', 'log/current/1.log', 'Ola-la!', 'x-amz-meta-family'=>'Woho556!') #=> true
#
# This method is capable of 'streaming' uploads; that is, it can upload
# data from a file or other IO object without first reading all the data
@@ -323,9 +323,8 @@ def incrementally_list_bucket(bucket, options={}, headers={}, &block)
# 'Content-Length' bytes have been uploaded, and HttpConnection will
# interpret this as an error.
#
- # Note: This method does not yet support very large PUTs, where very large
- # is > 2 GB. This is due to the underlying Net::HTTP library, which does
- # not send Expect: 100-Continue headers for these large requests.
+ # This method now supports very large PUTs, where very large
+ # is > 2 GB.
#
# For Win32 users: Files and IO objects should be opened in binary mode. If
# a text mode IO object is passed to PUT, it will be converted to binary
View
27 lib/sdb/right_sdb_interface.rb
@@ -159,8 +159,8 @@ def query_expression_from_array(params) #:nodoc:
# Retrieve a list of SDB domains from Amazon.
#
# Returns a hash:
- # { :domails => [domain1, ..., domainN],
- # :next_tocken => string || nil,
+ # { :domains => [domain1, ..., domainN],
+ # :next_token => string || nil,
# :box_usage => string,
# :request_id => string }
#
@@ -171,7 +171,8 @@ def query_expression_from_array(params) #:nodoc:
# :request_id => "976709f9-0111-2345-92cb-9ce90acd0982",
# :domains => ["toys", "dolls"]}
#
- # if block is given then yields it in a loop till block returns true and SDB has the data.
+ # If a block is given, this method yields to it. If the block returns true, list_domains will continue looping the request. If the block returns false,
+ # list_domains will end.
#
# sdb.list_domains(10) do |result| # list by 10 domains per iteration
# puts result.inspect
@@ -202,8 +203,8 @@ def list_domains(max_number_of_domains = nil, next_token = nil )
# Create new SDB domain at Amazon.
#
- # Returns a hash: { :box_usage, :request_id } on success or exception on error.
- # (Amazon raises no errors if the domain already exists)
+ # Returns a hash: { :box_usage, :request_id } on success or an exception on error.
+ # (Amazon raises no errors if the domain already exists).
#
# Example:
#
@@ -222,8 +223,8 @@ def create_domain(domain_name)
# Delete SDB domain at Amazon.
#
- # Returns a hash: { :box_usage, :request_id } on success or exception on error.
- # (Amazon raises no errors if the domain does not exist)
+ # Returns a hash: { :box_usage, :request_id } on success or an exception on error.
+ # (Amazon raises no errors if the domain does not exist).
#
# Example:
#
@@ -241,7 +242,7 @@ def delete_domain(domain_name)
on_exception
end
- # Add/Replace Item attributes.
+ # Add/Replace item attributes.
#
# Params:
# domain_name = DomainName
@@ -253,8 +254,8 @@ def delete_domain(domain_name)
# }
# replace = :replace | any other value to skip replacement
#
- # Returns a hash: { :box_usage, :request_id } on success or exception on error.
- # (Amazon raises no errors if the attribute was not overriden due to :replace param unset)
+ # Returns a hash: { :box_usage, :request_id } on success or an exception on error.
+ # (Amazon raises no errors if the attribute was not overridden, as when the :replace param is unset).
#
# Example:
#
@@ -366,9 +367,9 @@ def delete_attributes(domain_name, item_name, attributes = nil)
# sdb.query('family', query) #=> hash of data
# sdb.query('family', query, 10) #=> hash of data with max of 10 items
#
- # if block is given then yields it in a loop till block returns true and SDB has the data.
+ # If a block is given, query will iteratively yield results to it as long as the block continues to return true.
#
- # # list by 10 items per iteration dont
+ # # List 10 items per iteration. Don't
# # forget to escape single quotes and backslashes and wrap all the items in single quotes.
# query = "['cat'='clew'] union ['dog'='Jon\\'s boot']"
# sdb.query('family', query, 10) do |result|
@@ -376,7 +377,7 @@ def delete_attributes(domain_name, item_name, attributes = nil)
# true
# end
#
- # # same query using the auto escape way (pass the query and it's params as an array)
+ # # Same query using automatic escaping...to use the auto escape, pass the query and its params as an array:
# query = [ "['cat'=?] union ['dog'=?]", "clew", "Jon's boot" ]
# sdb.query('family', query)
#
Please sign in to comment.
Something went wrong with that request. Please try again.