Modified REST API with GraphQL Streaming for Data Overhead Reduction
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
The standard REST API lacks data types and data structures, leading to confusion during development, and does not support data hierarchy or robust versioning, resulting in increased processing, storage, and communication overhead, as well as difficulties in retiring older versions without impacting client applications.
Innovation Solution
A modified REST API incorporating a customized GraphQL framework that enables clients to query all tables and fields of a database server instance, allowing for customized queries, rich and complex query construction, and dynamic schema recreation, thereby improving version control and reducing memory usage through response streaming.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Productivity
If standard REST API is used to access server-side resources, then clients can access data through stateless operations, but the API returns a large volume of data including undesired ancillary data which increases processing, storage, and communication overhead
Solution Approach 1:
The patent extracts and returns only the specific data fields requested by the client from the hierarchical data structure, rather than returning the entire dataset. This is achieved through customized query interfaces that allow clients to specify exact data requirements, eliminating unnecessary ancillary data transmission and reducing communication overhead.
Solution Approach 2:
The patent segments the data retrieval process into targeted queries for specific data elements rather than retrieving complete hierarchical structures. By dividing the data access into discrete, selective operations, the system returns only necessary data portions, reducing processing and storage requirements on the client side.
2Adaptability or versatility
If multiple versions of REST service are defined as separate REST endpoints, then versioning is supported, but it becomes difficult to retire older versions without impacting client applications
Solution Approach 1:
The patent implements a universal query interface that handles multiple data versions through a single endpoint. The system can process queries against different versions of the data model without requiring separate endpoints, allowing clients to specify version requirements within the query itself. This multi-functional approach maintains versioning capabilities while reducing endpoint proliferation and simplifying retirement processes.
3Ease of manufacture
If standard REST API is used without data types and data structures, then the API is simple to implement, but developers experience confusion with respect to appropriate data formats
Solution Approach 1:
The patent applies local quality by introducing structured data type definitions and format specifications at specific points in the API interface where needed. Rather than making the entire API complex, localized schemas and data type declarations are provided for specific data elements, giving developers clear guidance on expected formats without overwhelming system-wide complexity.
Data Source
AI summary
A system including a data center hosting a representational state transfer (REST) server in communication with a client network, wherein the REST server includes a GraphQL schema describing tables and fields of a communicatively coupled database. The REST server is configured to: receive a request that includes a GraphQL query; open a streaming connection to the client network; and output a beginning of a response via the streaming connection. The REST server is also configured to process the GraphQL query based on the GraphQL schema to generate a GraphQL result, and to output the GraphQL result in a body of the response via the streaming connection. The REST server is further configured to output an end of the response via the streaming connection, such that the response is correctly formatted in JavaScript Object Notation (JSON).


