API Subgraph Generation for Resource Optimization
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Existing API technologies consume significant processing and storage resources due to the compilation of full API code, even though applications may not utilize all features, leading to unnecessary resource usage.
Innovation Solution
Generating a subgraph projection of the API based on queries invoked by an application, which includes only the necessary nodes and edges, and compiling code for this subgraph to reduce resource usage.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Adaptability or versatility
If a monolithic API construct is deployed to provide all functions, then API completeness and versatility are improved, but processing and storage resources are consumed unnecessarily
Solution Approach 1:
The patent segments the monolithic API construct into application-specific subgraphs by analyzing query patterns and extracting only the necessary nodes and edges for each application. This segmentation allows the system to provide complete API functionality when needed while reducing processing resources by compiling only relevant portions for each specific application context.
Solution Approach 2:
The patent extracts unused API functions from the monolithic construct by analyzing which functions are actually invoked by applications. The system removes these unnecessary functions from the compiled API code, thereby reducing storage space and processing overhead while maintaining only the essential functions that applications actually use.
2Adaptability or versatility
If a monolithic API construct is compiled for an application, then API functionality is provided, but compilation time and processing resources are increased
Solution Approach 1:
The patent divides the API into smaller, application-specific subgraphs based on query pattern analysis. This segmentation enables faster compilation times since only relevant portions of the API are compiled for each application, while still providing complete functionality for the subset of API functions that the application actually needs.
Solution Approach 2:
The patent performs preliminary analysis of query patterns and identification of necessary API functions before compilation occurs. By pre-determining which functions are needed based on application usage patterns, the system can optimize the compilation process to only compile necessary portions, significantly reducing compilation time while maintaining required functionality.
3Adaptability or versatility
If all API features are included in the deployed code, then API completeness is maintained, but storage space is consumed unnecessarily
Solution Approach 1:
The patent extracts and removes unused API functions from the deployed code by analyzing actual application usage patterns. This extraction process identifies which API features are never invoked by an application and removes them from the compiled code, thereby reducing storage space requirements while maintaining completeness for only the functions that applications actually use.
Solution Approach 2:
The patent applies local quality optimization by tailoring the API code to match the specific needs of each application. Instead of providing a uniform complete API to all applications, the system customizes the deployed code to include only the relevant API features for each specific application context, optimizing storage space utilization.
4Adaptability or versatility
If a full API graph is traversed and compiled, then all possible queries are supported, but processing resources are wasted on unused features
Solution Approach 1:
The patent applies partial action by compiling only the necessary portions of the API graph that are actually used by applications, rather than compiling the entire full API graph. This partial compilation approach maintains support for all possible queries that applications might need while significantly improving processing efficiency by avoiding the waste of compiling and processing unused features.
Data Source
AI summary
Certain aspects of the present disclosure provide techniques for generating application programming interface (API) code for an application. The method generally includes receiving information indicating a set of queries invoked within an application. A set of nodes in a graph projection of the API accessed by queries in the set of queries is identified by traversing the graph projection of the API for each query in the set of queries. A subgraph projection of the API including the identified set of nodes is identified, and code implementing operations associated with the identified set of nodes is generated from the generated subgraph projection of the API. The generated code is deployed for use with the application.


