Initial Release
Solution for Employee Programming Challenge #1 — identifying variable stars from Gaia DR3 epoch photometry data using InterSystems IRIS.
Clone the repository:
git clone https://github.com/lynnwux/intersystems-challenge1-docker-template.git
cd intersystems-challenge1-docker-template
Build and start the container:
docker-compose up --build -d
The build decompresses the input data and compiles the IRIS routine. On first startup, a background worker daemon pre-loads all data files into memory — this takes about 30–60 seconds. Once ready, the benchmark runs in under 1 second.
docker-compose exec iris iris session iris
USER>do ^RunScript
Expected output:
Found 20 files
Objects with >100% flux change: 57099
Output written to: /home/irisowner/dev/data/out/variable_objects.csv
Elapsed time: 0.7 seconds
The output CSV is written to data/out/variable_objects.csv.
Build time — the Dockerfile decompresses the 20 gzipped Gaia epoch photometry CSV files into /tmp/gaia_data (bypassing the Docker bind-mount, which is slow on Windows hosts).
Container startup — CacheRunner.mac is executed automatically via merge.cpf on every container start. It calls cache_data.py, which:
/tmp/gaia_datagaia_daemon.py as a background process and waits for it to be readyBackground daemon (gaia_daemon.py) — the core of the performance optimization:
multiprocessing.fork; each worker inherits the loaded data via copy-on-write/tmp/gaia_daemon.sock) for RUN commandsdo ^RunScript — calls analyze_variability.py via $ZF(-1, ...). The script:
RUNmultiprocessing.Pool run if the daemon is unavailableanalyze_variability.py / gaia_daemon.py)Each worker processes one CSV file:
source_id, bp_flux array, and rp_flux array(max − min) / min > 1.0)| Scenario | Time |
|---|---|
Cold container start (first do ^RunScript) |
~0.7–0.9 s |
| Subsequent calls | ~0.7–0.8 s |
| Daemon unavailable (fallback) | ~2 s |
The daemon eliminates Python interpreter startup, process fork, and disk I/O costs on every benchmark call — the workers are already live with data in memory.