-
Notifications
You must be signed in to change notification settings - Fork 10
Open
Description
Pure computations always run on the local worker with the current Ssh.do implementation. How to compute whole data flow on remote?
For instance, let's think about the following code:
basedir = "/etc"
dirs <- Ssh.do { user: "user", host: "example.com" } (
files <- File.listStatus basedir,
dirs = (file <- files, [file.name | file.isDirectory]),
Task.of dirs
)At first glance, it seems that files are listed up and directries of them are selected on the remote server, and then the directories are returned to local, like the following shell script line:
echo /etc | ssh user@example.com 'xargs -L1 ls -lA | grep ^d | sed -E "s/([^ ]+ +){8}//"'Actually it doesn't work so. Only actions are sent to and run on remote. Pure computations and the pipeline run on local like:
echo /etc | ssh user@example.com 'xargs -L1 ls -lA' | grep ^d | sed -E "s/([^ ]+ +){8}//"Metadata
Metadata
Assignees
Labels
No labels