The Worker app of the PDF Aggregation Service.
Go to file
Lampros Smyrnaios 4cadaf98fc Update the README.md 2022-02-07 20:59:10 +02:00
gradle/wrapper - Allow the user to set a maximum number of assignments-batches for the Worker to handle. After handling those batches, the Worker will shut down. A number of < 0 > indicates an infinite number of batches. 2021-12-24 00:12:34 +02:00
src - Handle the latest download-errors provided by the "PublicationsRetriever" program. 2022-02-07 14:40:33 +02:00
.gitignore
README.md Update the README.md 2022-02-07 20:59:10 +02:00
build.gradle - Fix not prioritizing the gradle version defined inside the "installAndRun.sh" script. 2022-01-21 15:19:52 +02:00
installAndRun.sh - Fix not prioritizing the gradle version defined inside the "installAndRun.sh" script. 2022-01-21 15:19:52 +02:00
settings.gradle

README.md

UrlsWorker

The Worker's Application, requests assignments from the Controller and processes them, downloading the available full-texts.
Then, it posts the results to the Controller, which in turn, requests from the Worker, the full-texts which are not already found by other workers, in batches.
The Worker responds by compressing and sending the requested files in each batch.

To install and run the application:

  • Run git clone and then cd UrlsWorker.
  • [Optional] Create the file inputData.txt , which contains just one line with the workerId, the maxAssignmentsLimitPerBatch, the maxAssignmentsBatchesToHandleBeforeRestart and the controller's base api-url, all seperated by a comma , . For example: worker_1,1000,0,http://IP:PORT/api/.
  • Execute the installAndRun.sh script. In case the above file (inputData.txt) does not exist, it will request the required data from the user, and then it will create the inputData.txt file.

Notes:

  • If the "maxAssignmentsBatchesToHandleBeforeRestart" is zero or negative, then an infinite number of assignments-batches will be handled.
  • The above script, installs the PublicationsRetriever, as a library and then compiles and runs the whole Application.
  • If you want to just run the app, then run the script with the argument "1": ./installAndRun.sh 1.