Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This builds on #9309 and supports user definable transports.
It supersedes #9046 - the discussion there outlines much of the motivations for this PR.
To implement this, custom cluster managers would need to provide their own
connect(manager::FooManager, pid::Integer, config::WorkerConfig)
methodconnect
should return a pair ofAsyncStream
objects, one for reading data sent from workerpid
, and the other to write data that needs to be sent to workerpid
. custom cluster managers can use an in-memoryBufferStream
as the plumbing to ferry data between the custom, non AsyncStream transport and the Julia parallel infrastructure.A
BufferStream
wraps aPipeBuffer
and condition variables to make a waitable stream.examples/clustermanager/0mq
is an example of how they are used to setup a star network with a 0MQ broker in the middle.connect
is optional, and the default implementation is based on TCP as a transport mechanism.Another optional method is
kill(manager::FooManager, pid::Int, config::WorkerConfig)
, which is called to remove a worker from the cluster.Two example implementations are provided:
examples/clustermanager/simple
shows the use of unix domain sockets as transportexamples/clustermanager/0mq
shows the use of 0MQ as transportOne thought is to move the examples to package
ClusterManagers.jl
instead of adding it here. Have kept it in this PR so that folks can have a look. Will move it based on feedback.Documentation still needs to updated.