Demo

Bundled examples: local first, then optional remotes (after Prepare).

Also see User Guide · demo, go, ride, drive, API.

Install

Run this from a job project, not the DistSSHKit checkout (that dest is refused; use --dest DIR there).

julia --project=. -m DistSSHKit demo install with_kit
julia --project=. -m DistSSHKit demo install without_kit
julia --project=. -m DistSSHKit demo install ride
One family per command

Bare demo install is refused. Copy only the family you will run. ride is experimental (User Guide · ride).

That copies each family into ./distsshkit_demos/ (not ./demos/, so a job's own demos/ is untouched). The sources ship with DistSSHRun.

distsshkit_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, "parent: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, "parent:2") → pi_file.jl
  ride/              # after `demo install ride` (plain scripts)
    map_echo.jl      # stdout: map
    map_file.jl      # file: map_results.csv
    filter_echo.jl   # stdout: filter
    for_loop.jl      # indexed for (ride candidate)

with_kit/ and without_kit/ pair *_file.jl with *_echo.jl: same job, but *_file.jl writes under the slot's DISTRIBUTED_OUTPUT_DIR (so go / drive can collect from remotes). Use *_echo.jl for terminal output only. ride/ has map_file / map_echo; filter_echo and for_loop are echo-only.

Keep Project.toml at the project root — do not add distsshkit_demos/Project.toml.

Prefer go unless you already need in-script parallelism; use drive for driver scripts that farm work with pmap. ride is experimental: plain map / filter / indexed for without Distributed in the file. plan suggests which of the three.

Standalone scripts (without_kit/)

These run on their own — no DistSSHKit import.

julia distsshkit_demos/without_kit/pi_file.jl --n 5000

Two local slots:

julia --project=. -m DistSSHKit go parent:2 \
  distsshkit_demos/without_kit/pi_file.jl --n 5000

Same job through the API (go!):

julia --project=. distsshkit_demos/without_kit/pipeline_pi.jl --n 5000

With remotes (after First-time remotes):

julia --project=. -m DistSSHKit go \
    parent:2 child:YourHost1:2 child:YourHost2:2 \
    distsshkit_demos/without_kit/pi_file.jl --n 5000

Driver scripts (with_kit/)

When you need pmap over workers instead of N independent script runs, use drive (not go):

julia --project=. -m DistSSHKit drive parent:2 \
  distsshkit_demos/with_kit/square_file.jl --n 4

Same driver through the API (pipeline! — local workers, no sync/collect):

julia --project=. distsshkit_demos/with_kit/pipeline_square.jl --n 4

With remotes (after First-time remotes):

julia --project=. -m DistSSHKit drive \
    parent:2 child:YourHost1:2 child:YourHost2:2 \
    distsshkit_demos/with_kit/square_file.jl --n 4

Driver contract (init_output_dir! / main) and further topics: see User Guide · drive and API (drive!, pipeline!, worker_pmap).

Plain scripts for ride (ride/)

Same family as without_kit/: no DistSSHKit import, no pmap. The run may split independent map / filter / indexed for. Experimental; details in User Guide · ride.

julia --project=. -m DistSSHKit plan \
  distsshkit_demos/ride/map_echo.jl
julia --project=. -m DistSSHKit ride parent:2 \
  distsshkit_demos/ride/map_echo.jl

Indexed for (dest[i] = …):

julia --project=. -m DistSSHKit plan \
  distsshkit_demos/ride/for_loop.jl
julia --project=. -m DistSSHKit ride parent:2 \
  distsshkit_demos/ride/for_loop.jl

If plan says drive, the file already uses Distributed; do not ride.