Autonomous APIs

The future of APIs is true machine-to-machine communication. Autonomous APIs, decoupled components and self-driving clients are the foundation for voice interfaces and artificial intelligence.
 — VS — 

Mechanical Turks Not Accepted

In current APIs, what seems to be a machine to machine communication is a mechanical Turk. A hand-crafted API client written for a specific API provider is relying on human-authored documentation and its interpretation by another person. This approach is tightly coupling clients and server and thus preventing the independent evolution. The human-written documentation leaves room for misinterpretation and often gets out-of-date. Furthermore, machine Turk APIs rely on human interventions whenever one component of the system changes.
“Autonomy: freedom from external control or influence; independence; sovereignty in making decisions and changes.”
—New Oxford American Dictionary


Attacking the complexity with autonomy.

Self-driving Clients

Clients can self-navigate the API landscape, perform self-configuration, self-repair, self-optimization, and make choices at various decision points automatically.

High-level, declarative programming

A higher level of abstraction reduces the cognitive algorithmic complexity, leads to the decoupling of client components from implementation—programming for a domain, not service.

Hierarchical and context-bound knowledge

Divide and conquer size complexity with domain definitions and bounded contexts. Autonomous APIs are a reusable representation of domain knowledge ontologies—published language.

Automated, contract-driven API lifecycle

Automation helps in handling the API provider's complexity by keeping versions, implementations, and deployments in check.
“Autonomy is the solution to the difficulty of managing many components centrally”

Levels of Autonomy

There are five levels of autonomy. The level of autonomy expresses the level of ability for components of the distributed system to both evolve and connect independently.

Level 1: Brittle System

Tightly coupled components, No semantics, interface, or lifecycle metadata. Fast time to delivery for point to point integrations when complexity is low.
Everything breaks when something changes—not scaling with growing complexity.
Example: Any undocumented API, usually backend-for-frontend APIs.

Level 2: Documented System

Tightly coupled components. Interface metadata available. Human only-semantics metadata is available. No lifecycle metadata (is the documentation documenting the interface implementation?).
Possible productization. Reusability. Lock-on changes, unable to evolve independently.
Example: Most of the APIs documented using an API description (API Blueprint, OpenAPI Specification, GraphQL Schema, Avro Schema, Protocol Buffers ...).

Level 3: Automated System

Mostly tightly coupled components. Metadata are verified, valid, and reliable. Metadata are human or machine-readable. Explicit understanding of price and risk of making changes in the API landscape. Quality Control.
Advanced mindset change involving many people is needed. Often meets cultural denial, hard to get buy-in.
Example: Automated Contract-driven API Lifecycle.

Level 4: Decoupled System

Uniform Interface. Decoupled components. Evolvability of the components in their respective environments. Advertisement of the interface, semantics, and lifecycle metadata. Shared understanding-metadata at runtime. Client subscription to future changes. Harmonized within the system. Reducing price and risk of making changes (by design).
No machine autonomy. Complicated taking everything into account, prone to chaotic & size complexity.
Example: Automated Contract-driven API Lifecycle with 100% of REST APIs (incuding HATEOAS—Unifrom Interface subconstraint).

Level 5: Autonomous System

Self-driving clients, landscape discovery, machine understanding, vocabulary over the data structure, declarative programming, autonomy of the components. Leveraging learned data from simulation for infrastructure. The higher level of abstraction. Implicit harmonization. Full autonomy of components. Independent evolution.
High cognitive (Algorithmic) Complexity. Demanding on computational power.
“The level of autonomy is the ability to safely navigate in the API landscape (where the constraints are time and price)”
—Self-driving Client
Copyright © 2020 All rights reserved.