Blog

API First Design & Architecture

Fri, Jun 12, 2015

Why APIs?

Modern scalable architecture is designed for the cloud and multiple customer channels that you may not of thought of yet. Abstracting your functions as a set of micro-services defines an ecosystem where an applications are created as an aggregation of calls to autonomous services and where loose coupling is king. Micro-services promote scalable agile solutions and allow true flexibility to a exploit multiple dimensions when provisioning compute capability. With a monolithic architecture, agility and scalability options are greatly restricted.

APIs and micro-services are a departure from the previous generation of SOA solutions where middleware was employed with mapping to and from canonical models was the norm. This may have been ok when system component provided only scant integration capability but this is no longer the case. Commercial packages now ship with comprehensive APIs as vendors realise that flexibility in channel support is now an out of the box expectation.

But what APIs should be exposed?

There is no secret that poorly designed APIs will promote a difficult to maintain ecosystem where a proliferation of similar services can quickly create a maintenance nightmare and promote higher cost of maintenance. I suggest that APIs be grouped according to business capability, be predominately stateless and exploit elastic IaaS and container capability. A good API will satisfy a customer or staff interaction and will not simply expose functions included in a backend ERP or system.

Some other tips include:

What is the logical layering?

In general, an API ecosystem can consist of many layers depending on the complexity of the environment. The key tip here is to not over do it. Three is generally enough:

And do you still need middleware?

The answer to this will vary based on the application ecosystem. For Enterprise Application Integration such as calls to services requiring guaranteed delivery the answer is yes. But there are other ways to this with many vendors offering overlay models in the form of API gateways that allow layered application of logging, security and a level of syntactical schema enforcement.

Be careful though, it is still important to review, catalog and enforce some governance standards. But this should not come at the expense of business agility and flexibility.

API First Design & Architecture