Skip to content

Commit 3a43532

Browse files
authored
Merge pull request #115 from JuliaLang/readme
Reformat README and update development instructions
2 parents c613685 + eb6f6b4 commit 3a43532

File tree

1 file changed

+45
-9
lines changed

1 file changed

+45
-9
lines changed

README.md

+45-9
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,53 @@
11
# Distributed
22

3-
The `Distributed` package provides functionality for creating and controlling multiple Julia processes remotely, and for performing distributed and parallel computing. It uses network sockets or other supported interfaces to communicate between Julia processes, and relies on Julia's `Serialization` stdlib package to transform Julia objects into a format that can be transferred between processes efficiently. It provides a full set of utilities to create and destroy new Julia processes and add them to a "cluster" (a collection of Julia processes connected together), as well as functions to perform Remote Procedure Calls (RPC) between the processes within a cluster. See the `API` section for details.
3+
The `Distributed` package provides functionality for creating and controlling
4+
multiple Julia processes remotely, and for performing distributed and parallel
5+
computing. It uses network sockets or other supported interfaces to communicate
6+
between Julia processes, and relies on Julia's `Serialization` stdlib package to
7+
transform Julia objects into a format that can be transferred between processes
8+
efficiently. It provides a full set of utilities to create and destroy new Julia
9+
processes and add them to a "cluster" (a collection of Julia processes connected
10+
together), as well as functions to perform Remote Procedure Calls (RPC) between
11+
the processes within a cluster. See the `API` section for details.
412

513
This package ships as part of the Julia stdlib.
614

715
## Using development versions of this package
816

9-
To use a newer version of this package, you need to build Julia from scratch. The build process is the same as any other build except that you need to change the commit used in `stdlib/Distributed.version`.
10-
11-
It's also possible to load a development version of the package using [the trick used in the Section named "Using the development version of Pkg.jl" in the `Pkg.jl` repo](https://github.com/JuliaLang/Pkg.jl#using-the-development-version-of-pkgjl), but the capabilities are limited as all other packages will depend on the stdlib version of the package and will not work with the modified package.
17+
### On Julia 1.11+
18+
In Julia 1.11 Distributed was excised from the default system image and became
19+
more of an independent package. As such, to use a different version it's enough
20+
to just `dev` it explicitly:
21+
```julia-repl
22+
pkg> dev https://github.com/JuliaLang/Distributed.jl.git
23+
```
24+
25+
### On older Julia versions
26+
To use a newer version of this package on older Julia versions, you need to build
27+
Julia from scratch. The build process is the same as any other build except that
28+
you need to change the commit used in `stdlib/Distributed.version`.
29+
30+
It's also possible to load a development version of the package using [the trick
31+
used in the Section named "Using the development version of Pkg.jl" in the
32+
`Pkg.jl`
33+
repo](https://github.com/JuliaLang/Pkg.jl#using-the-development-version-of-pkgjl),
34+
but the capabilities are limited as all other packages will depend on the stdlib
35+
version of the package and will not work with the modified package.
1236

1337
## API
1438

15-
The public API of `Distributed` consists of a variety of functions for various tasks; for creating and destroying processes within a cluster:
39+
The public API of `Distributed` consists of a variety of functions for various
40+
tasks; for creating and destroying processes within a cluster:
1641

1742
- `addprocs` - create one or more Julia processes and connect them to the cluster
1843
- `rmprocs` - shutdown and remove one or more Julia processes from the cluster
1944

2045
For controlling other processes via RPC:
2146

2247
- `remotecall` - call a function on another process and return a `Future` referencing the result of that call
23-
- `Future` - an object that references the result of a `remotecall` that hasn't yet completed - use `fetch` to return the call's result, or `wait` to just wait for the remote call to finish
48+
- `Future` - an object that references the result of a `remotecall` that hasn't
49+
yet completed - use `fetch` to return the call's result, or `wait` to just
50+
wait for the remote call to finish.
2451
- `remotecall_fetch` - the same as `fetch(remotecall(...))`
2552
- `remotecall_wait` - the same as `wait(remotecall(...))`
2653
- `remote_do` - like `remotecall`, but does not provide a way to access the result of the call
@@ -49,6 +76,15 @@ For controlling multiple processes at once:
4976

5077
### Process Identifiers
5178

52-
Julia processes connected with `Distributed` are all assigned a cluster-unique `Int` identifier, starting from `1`. The first Julia process within a cluster is given ID `1`, while other processes added via `addprocs` get incrementing IDs (`2`, `3`, etc.). Functions and macros which communicate from one process to another usually take one or more identifiers to determine which process they target - for example, `remotecall_fetch(myid, 2)` calls `myid()` on process 2.
53-
54-
**Note:** Only process 1 (often called the "head", "primary", or "master") may add or remove processes, and manages the rest of the cluster. Other processes (called "workers" or "worker processes") may still call functions on each other and send and receive data, but `addprocs`/`rmprocs` on worker processes will fail with an error.
79+
Julia processes connected with `Distributed` are all assigned a cluster-unique
80+
`Int` identifier, starting from `1`. The first Julia process within a cluster is
81+
given ID `1`, while other processes added via `addprocs` get incrementing IDs
82+
(`2`, `3`, etc.). Functions and macros which communicate from one process to
83+
another usually take one or more identifiers to determine which process they
84+
target - for example, `remotecall_fetch(myid, 2)` calls `myid()` on process 2.
85+
86+
**Note:** Only process 1 (often called the "head", "primary", or "master") may
87+
add or remove processes, and manages the rest of the cluster. Other processes
88+
(called "workers" or "worker processes") may still call functions on each other
89+
and send and receive data, but `addprocs`/`rmprocs` on worker processes will
90+
fail with an error.

0 commit comments

Comments
 (0)