On Thursday 08 June 2017 09:15 PM, Eliot Miranda wrote:
There are many things one could use this for, but one clear
direction, from the success of docker, is to make a Smalltalk image
observable and configurable by devops people without having to start
up an image and navigate an unfamiliar and foreign UI & IDE.  Such a
direction is probably not well served by a naïve mapping of classes
and methods to directories and files (what about global variables,
what about doits, what about Instantiation?) but the potential is
there.

FUSE is really useful for passive stores like zip, iso or tgz but not for suspended live object graph like an image. The toughest part here is not the mounting and name resolution but the semantic mapping between nodes and live objects.

I have a different suggestion that I feel is more 'Smalltalkish'. It would be easier for us to build an object server thread into the VM to serve live objects in the image as a file hierarchy. It allows a finer control of object graph to filetree mapping. This encapsulates object implementation details in a single place (object manager) and respects platform-neutrality.

There is already a precedence in sysfs of Linux. It shows a live tree of device and drivers object graph - subsystems, buses, devices, their drivers and events. The code is under 1500 lines [1] because it leverages ramfs for name resolution and just has the semantic functions for just four concepts - directory, file, group and mount. It uses special filenames like 'uevents' to pass events between userspace and kernel (equivalent to user processes and vm plugins in our case).

The VM needs to have:
a) a network responder (to listen and translate requests to paths (ordered collection of nodes), b) a name resolver to resolve paths to a name and name to a special object
  c) a semantic getter/setter to interpret these special objects.

So you could have:

  /globals/<name>/value
  /classes -> /globals/classes/
  /classes/Morph/instances/oop1/value, sizeInMemory etc.
  /objects -> /classes/Object/instances/
  /Undefined/doIt
  /Undefined/printIt

Instances don't comes with names one but they do have a unique id (oop) which can be mapped to a file (say oop%d). Indexed variables can be managed as 'group'.

[1] http://elixir.free-electrons.com/linux/latest/source/fs/sysfs

Regards .. Subbu

Reply via email to