Understanding the Web API Data Source Execution Order in Bold Reports
When designing reports with multiple Web API data sources, understanding the execution model is essential for optimizing performance and managing API load. This article explains the default execution behavior in Bold Reports, describes the scenarios that require sequential execution, and provides recommendations for improving performance.
Data Execution Behavior
Bold Reports is built on an SSRS-compatible RDL (Report Definition Language) engine. In this architecture, the dataset is the primary unit of execution, and the reporting engine determines the data retrieval order based on report dependencies.
Default Behavior: Parallel Execution
By default, the reporting engine executes multiple datasets in parallel. If your report contains several independent Web API data sources, the engine sends the requests concurrently instead of waiting for one API call to complete before starting the next.
Benefits
- Improved Performance: The overall report load time depends on the slowest API call rather than the combined execution time of all API calls.
- Efficient Resource Utilization: Makes efficient use of the available system threads on the Bold Reports Report Server.
- Reduced Latency: Faster API responses are not delayed by slower API calls, allowing report items to render as data becomes available.
Potential Challenges
- API Rate Limiting: Multiple concurrent requests may trigger throttling on the target API server.
- Backend Overload: Simultaneous API calls can increase the load on backend services, especially for resource-intensive APIs.
When Execution Becomes Sequential
Execution changes to a sequential (one-after-another) model only when dependencies exist between datasets or report items.
- Dataset Dependencies (Chaining): If Dataset B depends on a value returned by Dataset A, the engine waits for Dataset A to complete before executing Dataset B. A common example is retrieving an access token from one API and using it in the request header of another API.
- Parameter-Driven Execution: When a dataset provides the Available Values for a report parameter, it must execute first. Any datasets that depend on the selected parameter value are executed only after the parameter is resolved.
- Subreports: Subreports are processed after the main report layout is initialized. Their datasets are executed separately and are typically processed sequentially for each subreport instance.
Comparison Summary
| Scenario | Execution Type | Description |
|---|---|---|
| Independent Datasets | Parallel | Default behavior of the RDL engine. |
| Dataset Dependencies | Sequential | One dataset depends on data returned by another dataset. |
| Parameter-Driven Execution | Sequential | Parameter values must be resolved before dependent datasets are executed. |
| Subreports | Mixed | Typically processed sequentially for each subreport instance. |
Performance Optimization Strategies
If sequential execution or high API latency affects report performance, consider the following approaches.
1. Use an API Gateway
Combine multiple endpoints into a single backend orchestration API.
- Allow the gateway to call multiple Web APIs in parallel.
- Merge the JSON responses into a single payload for Bold Reports.
2. Use Bold Data Hub
Use Bold Data Hub to create a unified data pipeline. It can retrieve data from multiple sources, transform it, and provide a cached, consolidated dataset to your reports, reducing the impact of real-time API latency.