APIs are critical for cloud computing services, whether public, private, or mixed. Many developers are not careful about how the APIs they develop should work, and the result is that many of the kernel's good cloud services do not provide a good access interface, and many private, community, and mixed-cloud providers face such problems.
Any cloud and cloud service APIs are different, and the lack of standards and unified methodologies has led to confusion over the use of cloud computing. As a result, cloud-computing deployments, as well as clouds, are not keeping up with the changes in the API.
The design of the API should be purposeful and simple. Damian Conway once gave some good advice on API design.
1. Do one thing really.
2. Design by job.
3. Evolve by subtraction.
4. Declarative trumps imperative.
5. Preserve the metadata.
6. Leverage the familiar.
7. The best code is no code in all.
Summing up the above points is to pay attention to three points:
First, simplicity is most important. Many APIs are designed to be all things, and often this high demand design makes the API useless in practical applications. My simple rule is: If you hesitate, break them. Think of a better way.
Second, consider performance. This is usually done after the design is finished, and the API's poor performance seems to be a common problem. This requires that you do as much performance testing as possible when coding.
Third, the overall overall. APIs are important to be able to communicate and work well with each other, so they need to have a common data structure and usage model. APIs are not independent, they are part of the system. They need to follow the same design principles and support infrastructure, including management methods, security, data, and so on.