Demo
Walkthrough with the bundled examples: local first, then optional remotes (after Prepare).
Also see User Guide · demo, go, drive, API.
Install
julia --project=. -m DistSSHKit demo install with_kitThat copies demos/with_kit/. For standalone scripts, demo install without_kit.
demos/
with_kit/ # driver scripts — use drive or pipeline!
square_file.jl # file: square_results.csv
square_echo.jl # stdout only
pipeline_square.jl # pipeline!(driver, "local:2")
without_kit/ # after `demo install without_kit`
pi_file.jl # file: pi_results.txt
pi_echo.jl # stdout only
pipeline_pi.jl # go!(script, "local:2") → pi_file.jlEach topic has a *_file.jl and *_echo.jl pair: same job, but *_file.jl writes under the slot's DISTRIBUTED_OUTPUT_DIR (so go / drive can collect results from remotes). Use *_echo.jl when you only want terminal output.
Keep Project.toml at the project root — do not add demos/Project.toml.
Prefer go unless you already need in-script parallelism; use drive for driver scripts that farm work with pmap.
Standalone scripts (without_kit/)
These run on their own — no DistSSHKit import.
julia demos/without_kit/pi_file.jlTwo local slots:
julia --project=. -m DistSSHKit go local:2 demos/without_kit/pi_file.jlSame job through the API (go!):
julia --project=. demos/without_kit/pipeline_pi.jlWith remotes (after First-time remotes):
julia --project=. -m DistSSHKit go \
local:2 YourHost1:2 YourHost2:2 \
demos/without_kit/pi_file.jlDriver scripts (with_kit/)
When you need pmap over workers instead of N independent script runs, use drive (not go):
julia --project=. -m DistSSHKit drive local:2 demos/with_kit/square_file.jlSame driver through the API (pipeline! — local workers, no sync/collect):
julia --project=. demos/with_kit/pipeline_square.jlWith remotes (after First-time remotes):
julia --project=. -m DistSSHKit drive \
local:2 YourHost1:2 YourHost2:2 \
demos/with_kit/square_file.jlDriver contract (init_output_dir! / main) and further topics: see User Guide · drive and API (drive!, pipeline!, worker_pmap).