[squeak-dev] Question about RemoteTask

David T. Lewis lewis at mail.msen.com
Tue Sep 29 00:33:06 UTC 2020


Hi Chris,

RemoteTask is entirely in memory, no disk access, it forks an exact copy
of the image and VM. The block is evaluated in the child image, and the
result is serialized back to your parent image. The parent and child
image are identical at the point of the fork, so neither is any more or
less secure than the other.

Regarding your convenience method, please try using OSProcess class>>outputOf:
instead. This will probably do a much better job for you because it
handles all of the stdio piping without using files, and it also will
present any external command errors in the form of an exception in Squeak.

Dave

On Mon, Sep 28, 2020 at 04:23:23PM -0500, Chris Muller wrote:
> Hi Dave,
> 
> I saw your RemoteTask the other day and had a quick question about it.
> 
> Do you see any pitfalls doing operations that require or provide sensitive
> security key information as input, or output.
> 
> As an analogy, I've been using my own convenience method on OSProcess to
> give me a way get Linux command output into the image, but it does so by
> simply redirecting the command's output to a file, reading that file into
> an in-image String, then deleting the file.  But that's not something I
> would want to use if it involved passing a password, for example.
> 
> My hope is RemoteTask operates all in memory and does not utilize the hard
> drive to accomplish that.
> 
> Thanks,
>   Chris
> 
> On Sat, Sep 26, 2020 at 7:06 PM David T. Lewis <lewis at mail.msen.com> wrote:
> 
> >
> > On Sat, Sep 26, 2020 at 03:20:10PM -0700, tim Rowledge wrote:
> > >
> > > And multi-core? Well yes I suppose. Except that one can very easily
> > spawn multiple running images using Dave Lewis' OSProcess package,
> > including in ways that do some work and return the results.The spawning
> > takes very little time; for example on said Pi4 it takes 39mS to do
> > >     UnixProcess forkHeadlessSqueakAndDoThenQuit: [UnixProcess helloWorld]
> >
> > <OT>
> > Or the somewhat more interesting example:
> >
> >    RemoteTask do: [3 + 4] ==> 7
> >
> > which completes in on the order of 10ms on my PC, and hopefully not too
> > much worse on Pi4. The [3 + 4] block is evaluated in a spawned image with
> > results returned to the parent image.
> > </OT>
> >
> > Dave
> >
> >
> >

> 



More information about the Squeak-dev mailing list