AWS Developer Blog

Happy Birthday, SDK! Now Let’s Celebrate the Future

by Loren Segal | on | in Ruby | Permalink | Comments |  Share

Today marks the second anniversary of the AWS SDK for Ruby. Over the last two years, the SDK has grown and developed to support the full array of available AWS services and high-level features, like resource abstractions, enumeration, as well as Rails email and model layer integration. We are honored by the positive customer feedback we’ve received so far. We hope to continue earning your support as we move forward with the SDK.

One of the things I am personally proud of is the increase in community involvement we’ve received on GitHub within the last year since I joined Amazon. As someone who comes from the open source world, it’s great to see that process working so well in the SDK. The bug reports and pull requests that we’ve gotten from users have been top-notch quality and extremely helpful to everyone else using the gem, and we only want to see that level of engagement get better as time goes on. We want to thank all of our users who have been involved in the process and have helped to improve the SDK.

So here’s to the AWS SDK for Ruby turning 2 years old!

On 2.0 the next one

Of course, having a great SDK with a great community does not mean we should stop innovating, and so today, on its 2nd anniversary, we are also marking the start of development on version 2.0 of the AWS SDK for Ruby. We’re excited to share some of the great ideas we’ve been kicking around that will modernize the SDK and make it even easier to use. More importantly though, we are opening up this dialog because we also want your feedback about the features you believe belong in the next version of the Ruby SDK. There is still time to get your ideas in.

Over the next coming weeks we plan on sharing more information, and code, about version 2.0 of the SDK. If you want a front seat in the development, or even want to help out, watch this space. Until that time, here are some of the things that will be coming to the new version of the SDK:

Memoization by default

Currently, operations called from the high-level abstractions of various services (like Amazon S3’s "bucket collection" resource) are setup to not memoize return values from requests by default. This means that in many cases, your code can end up sending more requests than necessary to get at data you might have already loaded in a previous request. Furthermore, memoization can currently work somewhat inconsistently across services. A great example of this can be illustrated by grabbing user data from an Amazon EC2 instance:

instance = AWS.ec2.instances.first
puts instance.user_data # sends one request
puts instance.user_data # sends ANOTHER request

In version 2.0 of the SDK, we plan on making resources memoize data by default. In other words, when hydrating a resource from a request, that resource will maintain all of the data from the original request. Any further calls on that resource will use only the data from that original request. This will ensure a more consistent experience when dealing with services like EC2, and will improve performance of the SDK in many cases. If you want to explicitly reload fresh data from the service, you will still be able to do so by hydrating a new resource object.

High-level abstractions moved into separate gems

The AWS SDK for Ruby is very extensive, but that also means it is very large. With 30+ supported services, the core SDK gem contains almost 400 classes in over 500 files with more than 26,000 lines of code. That’s a lot of code to manage in just one package. This one package may also contain features that could conflict with your application, like Rails integration and XML libraries that may not be needed, and, in some cases, might require being disabled altogether.

Splitting the SDK into multiple packages will help keep the codebase small and focused while avoiding these integration conflicts. A small core codebase with small extra component libraries also means that contibutors to the SDK will have an easier time navigating the libraries, running tests, and submitting patches. We believe that making it easier for our users to contribute code to the SDK is a feature, not a side effect, of development. Anything we can do to improve the lives of those submitting pull requests is effort well spent.

Built to be extensible: a strong plugin API

In order to support a highly modular SDK with a healthy third-party ecosystem, we need a strong plugin API. Version 2.0 of the AWS SDK for Ruby will be developed with extensibility as a primary concern. More importantly, to help ensure the quality of this API, we plan on eating our own dog food. The plugin architecture, built on top of Seahorse, will be a first class citizen in the new SDK, and will be how we implement all of the core functionality of the library. This means that if you are a third-party developer writing an abstraction for any given service, you should feel comfortable knowing that the APIs you are using will be well supported because they will be the same ones we used to implement the very service you are wrapping.

Dropping support for Ruby 1.8.x

Finally, with the recently announced end of life for Ruby 1.8.7, we believe that it is time to start moving forward, and we will no longer be supporting Ruby 1.8.7 in version 2.0 of the aws-sdk gem. We heard you loud and clear when discussing this issue on GitHub, and we are aware of the maintenance burden that supporting 1.8.7 will bring. We believe that it is in the best interest of our customers to support the latest and greatest versions of Ruby, 1.9.x and 2.0.x.

Note that users on Ruby 1.8.x will still be able to use version 1.0 of the SDK, and we will have more information on how we will continue to support legacy users in upcoming posts.

More to come; help us define the future

Of course there is much more to talk about in this new version of the AWS SDK for Ruby, and we plan on bringing up many of these topics with future posts in the coming weeks. If the features we did manage to talk about sound interesting to you, don’t be shy to get involved. If you think we missed any important details, you should also make your voice heard. This is your opportunity to help us define what the future of the SDK will look like, and we will be listening for your comments. You can get in touch with us either here, the forums, or on GitHub.

Now, let’s take one last moment to say happy birthday to the AWS SDK for Ruby, and another moment to get excited about what’s to come!