API Version Adapter for Backwards Compatibility

Resolve Bottlenecks,
Find Innovative Solutions
Generate Solutions

Solution Overview

Problem

The introduction of new functionalities in software programs often leads to changes in data structures, breaking backwards compatibility with existing clients and customizations, resulting in costly development and testing cycles due to the need for code replication and compatibility across multiple versions.

Innovation Solution

A system and method that allows multiple API versions to interact with a single version of implementation code by automatically converting data objects from one data structure version to another, ensuring compatibility and reducing the complexity and cost of maintaining multiple code versions.

Engineering Contradictions & Design Principles

VSEngineering Contradiction Analysis

1Adaptability or versatility

If multiple versions of APIs are exposed to maintain backwards compatibility, then existing clients and customizations can continue to use old APIs, but code replication is required for all API versions which increases cost and complexity

Engineering Contradiction:
Improvebackwards compatibilityVSAvoidcode replication
Core Design Contradiction:
Adaptability or versatilityVSDevice complexity

Solution Approach 1:

An adapter layer is introduced as an intermediary component that sits between multiple API versions and a single implementation codebase. The adapter translates requests from different API versions into a unified internal format that the single implementation can process, eliminating the need to replicate code for each version while maintaining backwards compatibility.

Inventive Principle:
Principle #24Intermediary (Mediator)

Solution Approach 2:

A single implementation codebase is designed to handle multiple API versions through a universal interface. The system uses version detection and adaptive routing to direct requests to the appropriate handling logic within the same codebase, allowing one piece of code to serve multiple version requirements without replication.

Inventive Principle:
Principle #6Universality (Multi-functionality)

2Productivity

If data structures are changed to introduce new functionalities, then new features can be added, but backwards compatibility with existing clients is broken

Engineering Contradiction:
Improvenew functionalitiesVSAvoidbackwards compatibility
Core Design Contradiction:
ProductivityVSAdaptability or versatility

Solution Approach 1:

The data structure is segmented into core immutable elements and extensible optional elements. New functionalities are added as optional extensions to the existing data structure rather than changing the core structure. This allows new features to be introduced while existing clients that don't use the new optional elements continue to function with the original data structure format.

Inventive Principle:
Principle #1Segmentation

Solution Approach 2:

The data structure is made dynamic and adaptive through version tagging and optional field inclusion. The system can dynamically adjust to different data structure versions by detecting the version identifier and selectively processing only the relevant fields, allowing new functionalities to coexist with legacy client expectations.

Inventive Principle:
Principle #15Dynamics

3Ease of operation

If code is replicated for multiple API versions, then each version can be independently maintained, but development and testing cycles become costly and span multiple vendors

Engineering Contradiction:
Improveindependent version maintenanceVSAvoiddevelopment and testing cycles
Core Design Contradiction:
Ease of operationVSLoss of time

Solution Approach 1:

Multiple API version handlers are merged into a single unified implementation codebase. The system combines version detection, routing logic, and implementation into one consolidated code structure, eliminating the need for separate codebases for each version and reducing development and testing coordination across multiple vendors.

Inventive Principle:
Principle #5Merging (Combining)

Data Source

PatentUS9063748B1System, method, and computer program for allowing a plurality of application programming interface (API) versions to interact with a single version of implementation code
Publication Date: 2015.06.23 AMDOCS DEV LTD
  • US9063748B1 patent drawing
  • US9063748B1 patent drawing
  • US9063748B1 patent drawing

AI summary

A system, method, and computer program product are provided for allowing a plurality of application programming interface (API) versions to interact with a single version of implementation code. A system, method, and computer program product are provided for allowing a single version of core code to interact with a plurality of customization versions. In use, at least one first data object is received. Additionally, it is determined whether the at least one first data object is associated with a first data object version corresponding to a first data structure associated with a first API version. Additionally, it is determined whether the first data object version associated with the first data structure is compatible with an implementation code, the implementation code being compatible with a second data object version corresponding to a second data structure associated with a second API version. Moreover, the at least one first data object associated with the first data object version is automatically converted to the second data object version corresponding to the second data structure, such that the at least one first data object is compatible with the implementation code and the second API version. Computer generated code is used to convert data objects to compatible versions. The versions of data objects and data structures are determined dynamically at runtime. The data objects are converted to compatible versions dynamically at runtime.