[Vm-dev] [Vm-beginners] Stability of the external plugin interface

Tobias Pape Das.Linux at gmx.de
Mon May 25 06:26:23 UTC 2020


Hi
> On 25.05.2020, at 05:35, Eliot Miranda <eliot.miranda at gmail.com> wrote:
>> 

>> Moving to ffi-only would allow removing a fair bit of cruft from the VM, though there's our old friend 'backward compatibility' to argue with. It would mean some rewriting (mostly simplification I think?) of existing plugins code. And what to do about stuff that we pretty much always compile as internal plugins? Rewrite as external libraries and pay the (hopefully small) performance cost, or rewrite as appropriate to drop any pretence of being able to be external? SoundPlugin should absolutely be replaced by a bridge class and ffi calls to the OS. LargeInterger? Probably much better to pull properly into the vm core. MiscPlugins? Wouldn't be surprised if they could all be dropped and the cog'd versions would run as fast.
> 
> +1
> 
>> Strip the VM. It should have just the bare abilities to load, run and save images, and call the OS for anything to do with i/o etc. That'll be one meeeeeeeeeeeeeeeeellion dollars please.
> 
> +1000


One thing tho.

This all boils down to "who moves faster".

Here's a story.

When I tried to get the Self VM running again some years ago, one of the agonizing parts was its
extensive use of FFI. Why so? Well, the FFI was coded against a mid-1990 X11. Which, in that form
did not exist on either Mac nor Linux. Some parts worked, but a lot of things needed attention
in _both_ the VM _and_ the Image. In some respect, the "libraries interfaced via FFI" had moved
faster than the VM.

Had Self had a Display Plugin just like Squeak, changes would have been much more simple, since the 
assumptions in the Self world had nod changed at all.

So, if things move slowly in VM/Image land and more quickly in library land, the answer is Plugins.
If things move quickly in VM/Image land and are stable in library land, the answer is FFI.

I see this in SqueakSSL very prominently. The stable interface from the Image land helps a lot.
It would be a nightmare to have this via FFI. The effect would be that we have to
settle on one SSL library on all platforms, and keep that updated and ship it with the VM.
That's by the way what the Pharo VM does and I think it is the wrong way for the problem.

Best regards
	-Tobias


More information about the Vm-dev mailing list