A specialized Julia worker for running ADRIA coral reef simulation models within the ReefGuide distributed job processing system. This is a prototype/proof-of-concept implementation that processes ADRIA_MODEL_RUN
jobs.
ADRIAReefGuideWorker.jl is a worker node in the reefguide system.
ReefGuide deploys ReefGuideWorker.jl
and ADRIAReefGuideWorker.jl
as Docker containers on ECS to consume jobs generated by users in the frontend. They each use their respective Julia library, and fork the template repository. Shown below.
graph TD
RG[ReefGuide] -->|deploys| RGW[ReefGuideWorker.jl<br/>Docker Container]
RG -->|deploys| ARGW[ADRIAReefGuideWorker.jl<br/>Docker Container]
RGW -->|uses| RGLib[ReefGuide.jl<br/>Julia Library]
ARGW -->|uses| ADRIALib[ADRIA.jl<br/>Julia Library]
RGW -->|forks| RGWT[ReefGuideWorkerTemplate.jl<br/> Template]
ARGW -->|forks| RGWT
style RG fill:#e1f5fe
style RGW fill:#f3e5f5
style ARGW fill:#f3e5f5
style RGLib fill:#e8f5e8
style ADRIALib fill:#e8f5e8
style RGWT fill:#fff3e0
Related repos include
- ReefGuide - the main ReefGuide repository
- ReefGuideWorker.jl - Julia Job Worker to run ReefGuide algorithms
- ReefGuide.jl - ReefGuide Julia library code
- ADRIA.jl - The ADRIA model Julia library code, used by ADRIAReefGuideWorker.jl
- ReefGuideWorkerTemplate.jl - A foundational template to implement Julia workers
The worker processes ADRIA model run jobs that:
- Load coral reef domain data from specified data packages
- Generate scenarios with customizable model parameters
- Run ADRIA coral reef simulations under different climate scenarios (RCP 2.6, 4.5, 8.5)
- Calculate coral cover metrics and generate visualizations
- Upload results to S3-compatible storage for analysis
Each job produces:
- Complete ADRIA result dataset
- VegaLite visualization specifications showing coral cover trends by scenario type
- Julia 1.11.x via juliaup
- Access to a running ReefGuide API instance
- ADRIA-compatible reef domain data package
- Copy environment configuration:
cp .env.dist .env
- Update
.env
with your settings (see configuration below) - Initialize and start:
cd sandbox/ ./init.sh ./start.sh
NOTE: if step 3 above fails due to an error regarding expecting ADRIA.jl
package to be available, you may need to preinstall it. i.e.
pkg] add https://github.com/open-AIMS/ADRIA.jl.git
Then rerun step 3.
Configure via environment variables in .env
:
API_ENDPOINT
: ReefGuide web API URLJOB_TYPES
: Should beADRIA_MODEL_RUN
WORKER_USERNAME/PASSWORD
: Authentication credentials
DATA_PACKAGE_PATH
: Path to ADRIA domain data package (e.g. Moore reef cluster data)DATA_SCRATCH_SPACE
: Working directory for temporary files
These are consumed directly by the ADRIA.jl library:
ADRIA_OUTPUT_DIR
: Where ADRIA writes simulation outputsADRIA_NUM_CORES
: Number of CPU cores for parallel processingADRIA_DEBUG
: Enable ADRIA debug loggingADRIA_THRESHOLD
: Numerical threshold for ADRIA calculations
For local development with MinIO:
S3_ENDPOINT
: MinIO endpoint (e.g.http://localhost:9000
)MINIO_USERNAME/PASSWORD
: MinIO credentials
Jobs specify:
- Number of scenarios to generate
- Custom model parameters (optional)
- RCP climate scenario (defaults to RCP 4.5)
The worker runs the full ADRIA simulation pipeline and returns paths to the generated results and visualizations in S3 storage.
docker build . -t adria-worker
docker run --env-file .env adria-worker
Based on the ReefGuideWorker julia template for the ReefGuide distributed computing system.