GitHunt
ES

estebanlm/pharo-remoteinterface

The remote interface is a very simple framework to spawn and comunicate pharo processes (images), through the standard IO

Pharo Remote Interface

The Pharo Remote Interface (RI) is a very simple framework to spawn and comunicate pharo processes (images), using the standard IO files and STON (Smalltalk Object Notation) as communicating pipes.

CI

The RI package uses the GIO functionality present in Glib (bindings can be found here) to spawn and communicate process.

Install

Metacello new
	repository: 'github://estebanlm/pharo-remoteinterface';
	baseline: 'PharoRI';
	load.

Usage

The easiest way to use it is just executing:

runner := RmRemoteRunner new.
runner spawn.

and then you can execute commands synchronously:

runner runCommand: [ 42 factorial ]

or asynchronously:

runner 
	runCommand: [ 42 factorial ]
	onSuccess: [ :result | result inspect ]

IMPORTANT: The blocks passed to the spawned image need to be "clean blocks", for obvious reasons they can't have references to self, super or local variables.

Monitoring the remote image

There is a small tool that help to monitor what happens in the spawned image, you can open it by executing:

RmRunnerMonitorPresenter open.

To use it, you need first to enable the logging on the remote image:

runner listenToLog.

Using PharoRI for testing

TODO

Contributors

MIT License
Created December 28, 2022
Updated January 20, 2023