Friday, April 17, 2009

what is an API ?

I met a friend after a couple of years and we started talking about our work. We started talking about API Infrastructure and midway thru the discussion he asked me a very simple question. what is an API and how is it different from a Service , Why is a service Bus infrastructure different from a API Infrastructure. At that moment I realized that this is question that i should have answered first and here i am writing it down.

api definition:
- An api is reusable asset which can be invoked on the web. As a reusable asset the api can be combined/invoked from another website/mashup/application to add value for e.g. retrieving the List of Movies I have watched on Netflix over the last week and displaying it in my website.

what is the difference between a Service Infrastructure and API Infrastructure

I sometimes use services and apis in the same context and there is no difference between the two in my mind however architecturally there are two types of services

a) services which i create within my application/enterprise for business process reuse and loose coupling between the various technology stacks available. This is the soa story and i am not going there. there are enough products out there which can solve the problem

b) service or APIs which i create so that they can be consumed by my partners /consumers or even shared across departments and services which i consume from other guys.

From a technology perspective "a" requires "Service Infrastructure" while "b" is the "API Infrastructure"
  • "Service Infrastructure" is about integration of services while "API Infrastructure" is about producing and consuming apis/services.
  • "Service Infrastructure" is part of the middleware technology while "API Infrastructure" is more of a gateway functionality. In "Service Infrastructure" i am trying to integrate across disparate technologies how to integrate with ftp/email/jms etc while "API Infrastructure" is about exposing apis via http as POX/REST/SOAP
  • the concerns of "API Infrastructure" are security,scale, sla& monitoring,visibility instead of transport mediation/data mediation/process orchestration. If i am 1800Flowers.com and exposing an api to buy flowers then i would be concerned of making it available on the web with regards to scalability and security (for e.g. how can i guard myself against XML xDos/MDos Attacks) on the other hand if i were an enterprise doing service integration i would looking at how can i expose my Messaging (JMS) backend with a HTTP front end and do not end up having duplicate messages , architecturally an API Infrastructure sits in front of the Service Infrastructure.

0 Comments:

Post a Comment

Subscribe to Post Comments [Atom]

<< Home