I’m going to China next week to speak at QCon and have spent the last few weeks building up some (hopefully interesting) demos. One of my talks is on “cloud integration patterns” and my corresponding demos involve Windows Azure, a .NET client application, Salesforce.com, Amazon Web Services (AWS) and Cloud Foundry. Much of the integration that I show uses AWS storage and I had to decide whether I should try and use their SDKs or go straight at their web service interface. More and more, that seems to be a tough choice.
- Lack of SDK for every platform. While many vendors do a decent job of providing toolkits and SDKs for key languages, you never see one for everything. So, even if you the SDK for one app, you may not have it for another. In my case, I could have used the AWS SDK for .NET for my “on-premises” application, but would have still likely needed to figure out the native API for the Salesforce.com and Cloud Foundry apps.
- Abstraction of API details. It’s interesting that we continue to see layers of abstraction added to technology stacks. The difference between using the native, RESTful API for the Azure AppFabric Service Bus (think using HttpWebRequest) is pretty different than using the SDK objects. However, there’s something to be said for understanding what’s actually happening when consuming a service. SDKs frequently hide so much detail that the developer has no idea what’s really going on. Sometimes that’s fine, but to point #1, the information about using an SDK is rarely portable to environments where no SDK exists.
I’ll write up the details of my QCon demos in a series of blog posts, but needless to say, using the AWS REST API is much different than going through the SDK. The SDK makes it very simple to query or update SimpleDB for example, but the native API requires some knowledge about formatting the timestamp, creating a hashed signature string and parsing the response. I decided early on to go at the REST API instead of the .NET SDK for AWS, and while it took longer to get my .NET-based integration working, it was relatively easy to take the same code (language changes notwithstanding) and load it into Cloud Foundry (via Ruby) and Salesforce.com (via Apex). Also, I now really understand how to securely interact with AWS storage services, regardless of platform. I wouldn’t know this if I only used the SDK.
I thought of this issue again when reading a great post on using the new Azure Service Bus Queues. The post clearly explains how to use the Azure AppFabric SDK to send and receive messages from Queues. But when I finished, I also realized that I haven’t seen many examples of how to do any of the new Service Bus things in non-.NET environments. I personally think that Microsoft can tell an amazing cloud integration story if they just make it clearer how to use their Service Bus resources on any platform. Would we be better off seeing more examples of leveraging the Service Bus from a diverse set of technologies?
So what do you think? Do SDKs make us lazy developers, or are we smarter for not concerning ourselves with plumbing if a vendor has reliably abstracted it for us? Or should developers first work with the native APIs, and then decide if their production-ready code should use an SDK instead?