This Job Service is an HTTP service for tracking progress of background jobs.
The job is represented by:
id
- unique job’s identifiertotal
- a number representing total size of the jobprogress
- a number representing current progress of the job (ie. job is considered completed when progress == total)
The service interface supports the following actions:
- Register a job - accept
total
attribute, generates and return an ID for the job. - Update a job based on ID - allows incrementing job's
progress
by some arbitrary number or setting absoluteprogress
. This supports a large volume of (potentially concurrent) update requests to the same job. - Show all jobs
- Show individual job by ID
Additional features:
- Jobs expire after they have not been updated for 1 minute via a cron job.
- The job state is cached in memory.
- Java 8
- Docker
- IntelliJ recommended (run-configs provided)
- IntelliJ enable annotation processing (for Lombok)
Tests can be run with ./gradlew checkstyleMain checkstyleTest test
.
Spin up dependencies with:
docker-compose -f local-dev.yml up
The server can be started by using the IntelliJ run configuration run-local
.
Navigate to http://localhost:8080/swagger.
- environment variables
- integration tests
- CI/CD
- metrics/monitoring