The Statistics app of the PDF Aggregation Service.
Go to file
Lampros Smyrnaios 1ee1a94eff - Handle the case where the "gatherNumberOfPayloadsPerDatasource()"-query-method is executed while some tables of the DB are in a "merge" state. In this case, the queries fail and the App retries up to 10 times.
- Handle the case when the aforementioned query-method fails with some unhandleable error. In this case the app retries 1 time and if it fails again, then if this has happened during initialization, the app shuts down, else the incident is ignored and the app will retry after 6 hours when the method is scheduled to run again.
2023-07-26 16:41:44 +03:00
gradle/wrapper Fully functional "PDF Aggregation Statistics" Service. 2023-06-20 22:16:07 +03:00
src - Handle the case where the "gatherNumberOfPayloadsPerDatasource()"-query-method is executed while some tables of the DB are in a "merge" state. In this case, the queries fail and the App retries up to 10 times. 2023-07-26 16:41:44 +03:00
.gitignore Fully functional "PDF Aggregation Statistics" Service. 2023-06-20 22:16:07 +03:00
Dockerfile Fully functional "PDF Aggregation Statistics" Service. 2023-06-20 22:16:07 +03:00
README.md - Improve performance by avoiding checking if the huge ConcurrentHashMap is empty, on every request. After the first data-gathering, it will neven be empty and the checking-code is expensive. 2023-06-22 01:54:47 +03:00
build.gradle - Improve performance by avoiding checking if the huge ConcurrentHashMap is empty, on every request. After the first data-gathering, it will neven be empty and the checking-code is expensive. 2023-06-22 01:54:47 +03:00
docker-compose.yml Fully functional "PDF Aggregation Statistics" Service. 2023-06-20 22:16:07 +03:00
gradle.properties Fully functional "PDF Aggregation Statistics" Service. 2023-06-20 22:16:07 +03:00
installAndRun.sh - Improve performance by avoiding checking if the huge ConcurrentHashMap is empty, on every request. After the first data-gathering, it will neven be empty and the checking-code is expensive. 2023-06-22 01:54:47 +03:00
settings.gradle Fully functional "PDF Aggregation Statistics" Service. 2023-06-20 22:16:07 +03:00

README.md

PDF Aggregation Statistics

This is a public API to get specific statistics from the PDF Aggregation Service.
This service is designed to respond as fast as possible, by cashing the relevant data in memory, instead of running new queries to the database, for every request. The cached data is updated every 6 hours.

Statistics API:

  • "getNumberOfPayloadsForDatasource" endpoint: http://<IP>:<PORT>/api/stats/getNumberOfPayloadsForDatasource?datasourceId=<givenDatasourceId>
    This endpoint returns the number of payloads which belong to the datasource specified by the given datasourceID.

To install and run the application:

  • Run git clone and then cd pdf_aggregation_statistics.
  • Set the preferable values inside the application.yml file.
  • Execute the installAndRun.sh script which builds and runs the app.
    If you want to just run the app, then run the script with the argument "1": ./installAndRun.sh 1.
    If you want to build and run the app on a Docker Container, then run the script with the argument "0" followed by the argument "1": ./installAndRun.sh 0 1.