APIs and SPIs

1 minute read

Lately, web APIs (Application Programming Interfaces) have been getting a lot of attention. For those of us who have been working on and promoting them for the past 4 or 5 years, I think I can safely say “Finally!” In 2002 we saw Amazon and Google roll out first-generation services, followed a bit later by eBay, FlickR, Yahoo, and lots of of others.

With an API, some organization defines and implements an interface and invites developers to call it. That organization decides what the service will look like and how it will behave. There’s usually one implementation of the service and lots of client applications.

APIs are great; I’ve been saying that for a long time. But we shouldn’t overlook the concept of the SPI, or Service Provider Interface.

With an SPI, the organization effectively delegates or outsources some type of processing to an external service, allowing this external service to return data that can be used by the organization in some way. The definer of the SPI says, in effect, “build a service with the interface that I define, and we can use it to do something useful.” There’s one client and lots of implementations of the same SPI. The existence of an SPI allows outside plug-ins to customize or supplant existing behavior in some way.

Right now I am aware of just a few web-based SPIs:

  • The A9.Com OpenSearch is essentially an SPI. Any service that chooses to implement A9′s extensions to RSS can be plugged into and participate in any search done on A9.
  • The new version of Google Earth introduces the concept of a Network Link. That’s a fine name, but it is really an SPI! Using this link, Google Earth can call out to an external service each tiem the user navigates to a new geographic location. The service provider receives the bounding box (a pair of longitudes and latitudes) and must return a KML document in return. The KML can include place markers, paths, and polygons. Anyone with a large collection of geographically indexed data should think about creating a Network Link for it. Imagine, for example, linking this to the Rhode Island GovTracker service that I mentioned yesterday.

If you know of other web-based SPIs, drop me some mail!