3 essential approaches to good cloud API design

APIs are important to cloud computing, but few out there understand the basic principles of their design

APIs are critical to cloud computing services, regardless of whether they're public, private, or hybrid. However, most developers don't consider how their APIs should work; as a consequence, many otherwise solid clouds don't provide good programmatic access. This applies to those creating private, community, and hybrid clouds for the enterprise, as well as full-blown public cloud providers.

All clouds and cloud APIs are very different, and the lack of standards and common approaches has led to confusion around the use of APIs. The results are unproductive cloud deployments and APIs that are changing faster to correct bad past designs than cloud managers can keep up with.

[ Get the no-nonsense explanations and advice you need to take real advantage of cloud computing in the InfoWorld editors' 21-page Cloud Computing Deep Dive PDF special report. | Stay up on the cloud with InfoWorld's Cloud Computing Report newsletter. ]

API design should focus on purpose and simplicity. Damian Conway offers good advice on cloud API design:

  1. Do one thing really well.
  2. Design by coding.
  3. Evolve by subtraction.
  4. Declarative trumps imperative.
  5. Preserve the metadata.
  6. Leverage the familiar.
  7. The best code is no code at all.

I boil all of this down into three key approaches.

First, simplicity leads the day. Many APIs are built to do everything, but with such high demands placed on them, the APIs become much less useful for practical applications. My simple rule: When in doubt, break them out. Consider a finer-grained approach.

Second, consider performance. Often created as an afterthought, poorly performing APIs seem to be an epidemic. Make sure to code as efficiently as you can and test, test, test.

Finally, design holistically. APIs have to work and play well together, so they need common data structures and usage patterns. APIs support systems -- they are not systems unto themselves. They need to adhere to common design patterns and supporting infrastructure, including governance, security, and data.

This article, "3 essential approaches to good cloud API design," originally appeared at InfoWorld.com. Read more of David Linthicum's Cloud Computing blog and follow the latest developments in cloud computing at InfoWorld.com.

Related:

Copyright © 2010 IDG Communications, Inc.