How to Achieve Hot-swappable Reports?
The report hot-swap (hot deployment) means that any modifications of an existing report will take effect immediately without restarting the application. Usually, report templates(which is interpreted execution) developed with reporting tools are hot-swappable. It is the report data source preparation phrase that demands special attention. The data preparation implemented in the stored procedure or Java needs to be compiled before execution and is non-hot-swappable. Yet as we often depend on stored procedures and Java to achieve complicated reporting tasks, hot-swap capability has become an issue.
esProc SPL helps to achieve the best hot-swap capability. esProc is an open-source data processing engine best at computing structured data. It has rich class libraries for performing complex report data source preparation, as well as support for diverse data sources (RDB, NoSQL, JSON, CSV, and Webservice, etc.) to achieve cross-data-source mixed computing.
The independent SPL syntax on which esProc is based enables stepwise data source preparation processes. Most importantly, the interpreted-execution SPL is great at realizing hot-swappable report data sources.
It has concise syntax. For instance:
We are trying to find stocks that have risen for over five consecutive days, count the rising days for each (treat days with same prices as rising), and display the results in a report.
A |
||
1 |
=db.query("select * from stock_record order by ddate") |
|
2 |
=A1.group(code) |
|
3 |
=A2.new(code,~.group@i(price<price[-1]).max(~.len())-1:maxrisedays) |
Count the consecutively rising days for each stock |
4 |
=A3.select(maxrisedays>=5) |
Get eligible records |
The advantage of agile SPL syntax is obvious. By contrast, SQL implements the computation using nested queries.
esProc can be used as the embedded JDBC to be integrated with the reporting tool. As it accesses the database, the latter can access the result of executing the SPL code via JDBC.
Simply put, achieving report hot-swap requires interpreted-execution presentation templates (provided by reporting tools) plus an interpreted-execution data preparation tool (esProc).
SPL Official Website 👉 https://www.scudata.com
SPL Feedback and Help 👉 https://www.reddit.com/r/esProcSPL
SPL Learning Material 👉 https://c.scudata.com
SPL Source Code and Package 👉 https://github.com/SPLWare/esProc
Discord 👉 https://discord.gg/cFTcUNs7
Youtube 👉 https://www.youtube.com/@esProc_SPL