Client Batch API Manager for Web Page Rendering
Find Innovative SolutionsGenerate Solutions
Solution Overview
Problem
Interactive websites often experience slow performance due to numerous asynchronous API calls made by client computing devices to backend servers, resulting in multiple round-trip connections that cause speed slowdowns and sluggish behavior.
Innovation Solution
Implementing a client batch API manager and a server batch API manager to queue and batch multiple API calls into a single request, reducing connection overhead by using a single round-trip connection between the client and server, and automatically managing the batching process transparently to the web application.
Engineering Contradictions & Design Principles
Engineering Contradiction Analysis
1Reliability
If multiple individual API calls are made to obtain information and data for rendering a web page, then the web application can retrieve necessary information, but the user experience becomes slow due to multiple round-trip connections
Solution Approach 1:
Multiple individual API calls are merged into a single batch API call. The system collects multiple API calls that would otherwise be made separately and combines them into one unified request, reducing the number of round-trip connections between client and server while ensuring all necessary information is retrieved for web page rendering.
Solution Approach 2:
The system performs preliminary actions by collecting and queueing API calls before executing them in a batch. Rather than making immediate individual calls, the system prepares a batch of calls in advance and executes them together, optimizing the timing and efficiency of data retrieval operations.
2Quantity of substance
If multiple round-trip connections are established between client and server, then all necessary data can be retrieved, but connection overhead increases causing sluggish behavior
Solution Approach 1:
Multiple separate connection operations are merged into a single connection operation. By batching API calls, the system reduces the number of times a connection must be established and torn down, thereby reducing connection overhead and complexity while still retrieving all necessary data.
3Speed
If API calls are batched into a single request, then the number of connections is reduced improving performance, but the system complexity increases due to batching management
Solution Approach 1:
The batching system operates autonomously without requiring manual intervention or complex configuration. The system automatically collects, queues, and batches API calls based on predefined criteria, managing the complexity internally while presenting a simple interface to the web application.
Solution Approach 2:
A batching layer is introduced as an intermediary between the web application and the API execution mechanism. This intermediary automatically manages the complexity of batching, collecting calls from the application and coordinating their execution, thereby isolating the complexity from both the application and the core execution logic.
Data Source
AI summary
In one general aspect, a method for rendering a web page can include receiving, from an interactive web application executing on a computing device, a plurality of application programming interface (API) calls for information and data for including in the rendering of the web page by the interactive web application, determining, for each of the plurality of API calls, whether an API call satisfies at least one criterion, storing, in a memory included on a computing device, an API call for inclusion in a batch of API calls if the API call satisfies the at least one criterion, and sending, in a single API call, the batch of API calls stored in the memory, the sending based on an occurrence of an event in the computing device.


