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

Tobias Pape Das.Linux at gmx.de
Mon May 25 12:03:30 UTC 2020


> On 25.05.2020, at 13:34, Jakob Reschke <forums.jakob at resfarm.de> wrote:
> 
> 
> 
> Tobias Pape <Das.Linux at gmx.de> schrieb am Mo., 25. Mai 2020, 08:26:
>  
> 
> 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.
> 
> How does using plugins solve this problem?
> 
> If a library breaks compatibility, you would have to update the plugin and maybe think about how to stay compatible with older Squeaks. If it were FFI with a proper facade that finds out how to link to the external library, you would need to update the facade and worry there about staying compatible, but you could do it in Smalltalk. It requires discipline and guidance to only use the facade, of course.
> 
> Do you mean you can hot-fix a plugin underneath the image, so you can run ancient unmodified images on a newer platform/library base? Then maybe we do not really want plugins, but proper modules (Smalltalk shared libraries/image fragments/image components/parcels/...).

Rather the latter. I wouldn't call it hot-fix but rather evolve stuff as they change.
That's how we do with Display and SqueakSSL.
You don't need to touch the image, but you could.
I don't understand how "proper modules" in whatever sense would fix that.

:)

Best regards
	-Tobias





More information about the Vm-dev mailing list