« Help Wanted - Manager and Senior Developers for new AWS Media Product | Main | EC2 Instance Status Checks and Reporting »

TrackBack

TrackBack URL for this entry:
http://www.typepad.com/services/trackback/6a00d8341c534853ef0162fdcecbed970d

Listed below are links to weblogs that reference How Collections Work in the AWS SDK for Ruby:

Comments

Feed You can follow this conversation by subscribing to the comment feed for this post.

Jay Feldblum

People who use ActiveRecord or Mongoid will already be familiar with this behavior. But they will know this behavior under the name "IdentityMap". They already know that recent versions of ActiveRecord and Mongoid always re-fetch the entity from the backing store/service, unless you have the identity-map setting enabled causing both libraries to check the identity-map before fetching entities from the remote store/service.

"Identity Map" seems like a better word than "Memoize" in this context.

* http://martinfowler.com/eaaCatalog/identityMap.html
* http://en.wikipedia.org/wiki/Identity_map

The #with_identity_map method (a renamed #memoize method) should also be a method on each collection instance:

ec2.images.with_identity_map {|images| images.map(&:description) }

When called as AWS.with_identity_map, all fetches to any AWS service within the block should be preceded by a cache check. When called as ec2.images.with_identity_map, only fetches to the AWS Images service within the block should be preceded by a cache check.

Finally, there should be non-block versions. AWS.enable_identity_map!, AWS.disable_identity_map!, ec2.images.enable_identity_map!, and ec2.images.disable_identity_map!.

Matty Noble

Thanks for the feedback! It does sound like "identity map" is a similar concept, however I feel that there might be some subtle but important differences between what identity mapping means for ActiveRecord and what AWS.memoize means for the Ruby SDK. We'll have to think about that one a bit more.

It sounds like you are also interested in being able to scope memoize (or identity mapping) to a single service or to a single type of resource. This sounds like a good feature, and I'd love to hear more about how and when you would use it.

Finally, you mentioned that you would like to start and stop memoizing without a block. This feature exists today in the SDK, and is documented here:

http://docs.amazonwebservices.com/AWSRubySDK/latest/AWS.html#start_memoizing-class_method

AWS.memoize is implemented using AWS.start_memoizing and AWS.stop_memoizing.

The comments to this entry are closed.

Featured Events

Learn the Benefits of Running a Private Social Network on AWS
[Online]

Tuesday, May 21, 2013
9:00 AM PT / 12:00 PM ET

Amazon Web Services and tibbr, an AWS Technology Partner invite you to learn how to foster innovation, improve customer support, employee motivation and breakdown departmental silos with a tibbr Private Social Network application running on AWS.
Register Now

Deliver High Performance and Scalable SQL Databases on AWS
[Online]

Wednesday, May 22, 2013
10:00 AM PT / 1:00 PM ET

Amazon Web Services (AWS) and NuoDB, an AWS Partner Network (APN) Technology Partner, invite you to attend this live webinar where you will learn how to use NuoDB to manage your data across multiple data centers and geographies to enable a highly available, secure and scalable system.
Register Now

Maximize Your Microsoft SharePoint Solutions on AWS
[Online]

Tuesday, June 4, 2013
8:00 AM PT / 11:00 AM ET

Join Amazon Web Services (AWS) and Capgemini, an AWS Premier Consulting Partner, to explore how the latest technology innovations with Microsoft SharePoint may be combined to deliver maximum business value to your customers.
Register Now

Deploying Your Business Critical SQL Server Apps on Amazon EC2
[Online]

Wednesday, June 5, 2013
10:00 AM PT / 1:00 PM ET

Amazon Web Services (AWS) and SIOS Technology Corp, an AWS Technology Partner, invite you to attend this live webinar to learn key considerations for deployment of mission critical SQL Server applications to Amazon EC2.
Register Now

Manage Big Data Analytics Using SAP HANA One On AWS
[Online]

Tuesday, June 11, 2013
10:00 AM PT / 1:00 PM ET

Jump Start Your Big Data Analytics using SAP HANA One with RunE2E and AWS. Amazon Web Services (AWS) and RunE2E, an Advanced Consulting Partner, invite you to join this live webinar to learn how SAP HANA One provides the ideal platform to manage your Big Data solutions on AWS.
Register Now

The AWS Report


Brought to You By

Jeff Barr (@jeffbarr):



Jinesh Varia (@jinman):


Email Subscription

Enter your email address:

Delivered by FeedBurner

May 2013

Sun Mon Tue Wed Thu Fri Sat
      1 2 3 4
5 6 7 8 9 10 11
12 13 14 15 16 17 18
19 20 21 22 23 24 25
26 27 28 29 30 31