Cloud developers use application programming interfaces to integrate their applications with an existing cloud service. A cloud provider typically releases an API suite, allowing third-party developers to achieve this integration without the need for manual, Web-based console controls. But having an API doesn't guarantee success for cloud providers or software developers. Poorly designed or implemented APIs can waste engineering talent, cause poor performance, squander computing resources and waste potential revenue.
Let's consider three issues that can plague a cloud computing API.
Too many API operations
In software, there is a distinction between operations and objects. A software operation is usually a specific action, such as creating a folder or allocating storage space. By comparison, a software object is conceptually the same as a real-world object, such as a closet, which has various states. Look for APIs that operate through objects rather than operations.
The problem with using operations as API calls is that more individual calls -- and more network traffic -- are required to get anything done. This bloats the number of API functions and requires developers to use a lot of API calls in their software. It's also harder and more time-consuming to develop and debug software that uses such granular API calls.
A cloud computing API, operating through objects, provides more efficient service access. In this model, objects hide the underlying attributes of the API call and limit the caller -- or the software developer -- to what they can see and do, which makes the service more resilient.
Poor performance management
API design and performance isn't just a matter of coding the service properly. Cloud computing API calls result in additional computing load for the cloud service provider. When lots of API calls occur -- likely because many users access the service at the same time -- performance can falter. This is bad for the API provider, the software developer hooking into the API and the software users.
To maintain stable and predictable performance, cloud providers queue and throttle calls to the API. API management and tools like gist, Mashery API management and the Django REST framework can throttle API calls and smooth spikes in compute utilization. In most cases, API usage is throttled to a certain number of thousands of calls per hour or per day. An API call designed to return a variable or unpredictable number of responses can also divide the response into groups or pages. The calling software can then assemble and present the groups to users in a more organized fashion.
API throttling benefits users by ensuring the service doesn't bog down as usage builds. Generally, a software developer or user should not need to pay for additional throttling, since the cloud allows for greater elasticity in resource expansion.
Inconsistent schema and service design
In the software world, a schema refers to organization or structure. The schema used for cloud computing API calls profoundly affect how quickly and easily software developers adopt the API. Ideally, every call or object type within a cloud provider's API should follow the same schema because it promotes consistency and is easier for developers to learn.
But many APIs don't adopt a uniform schema for common actions like add, query, update and delete. This makes the API inconsistent and creates unnecessary complexity for developers. Even when certain arguments don't apply, or cannot be passed for certain calls, it's better for the API to return an appropriate error or just ignore the disallowed argument than to adopt a different schema.
Another common API headache occurs when software developers must explicitly declare the type of data being passed to the API. Data declarations and data type restrictions require significantly more work for software developers using the API. What's more, such restrictions often change as the API evolves, forcing developers to update their code accordingly.
Ultimately, developers should look for cloud computing APIs with consistent design calls and few, if any, data type restrictions.
While developers grapple with a variety of API considerations, such as design, performance and consistency, the one area they should never compromise is cost. Because they are table stakes for any modern cloud service, API access should never carry additional fees or have cost-based restrictions.
About the author:
Stephen J. Bigelow is the senior technology editor of the Data Center and Virtualization Media Group. He can be reached at [email protected].
Considerations for effective API design
Without standard cloud APIs, what should a cloud developer do?
Picking the right cloud provider API