[Opensim-dev] Mono addins within OpenSim -- changes ahead

Diva Canto diva at metaverseink.com
Tue Dec 30 03:56:55 UTC 2014


Since I'm looking at mono addins as a mechanism for managing 3rd party 
packages for OpenSim, I couldn't help it but also look at the way mono 
addins are being used within OpenSim. It is very confusing, with 
extension points being declared on components that have very little to 
do with the extensions. For example, OpenSim.exe itself defines 3 
extension points:

     <ExtensionPoint path="/OpenSim/Startup">
         <ExtensionNode name="Plugin" 
type="OpenSim.Framework.PluginExtensionNode" 
objectType="OpenSim.IApplicationPlugin"/>
     </ExtensionPoint>

     <ExtensionPoint path="/OpenSim/WindModule" name="Wind Module 
Plugins for wind models">
         <ExtensionNode name="WindModel" 
type="Mono.Addins.TypeExtensionNode" 
objectType="OpenSim.Region.Framework.Interfaces.IWindModelPlugin"/>
     </ExtensionPoint>

     <ExtensionPoint path="/OpenSim/RegionModules">
         <ExtensionNode name="RegionModule" 
type="Mono.Addins.TypeExtensionNode" 
objectType="OpenSim.Region.Framework.Interfaces.IRegionModuleBase"/>
     </ExtensionPoint>

While the first one is a genuine extension point of OpenSim.exe (the 
object type is defined in it), the other two aren't. Both the WindModule 
and the RegionModules extension points pertain to types that are defined 
in OpenSim.Region.Framework.dll. In the code, as well as in intention, 
these are extensions of OpenSim.Region.Framework. When we add region 
modules, the main dependency is, indeed, that dll, and it's also the dll 
that most affects the stability of 3rd party region modules. The future 
API for region modules will pertain primarily to this dll. So this is 
the right dll for defining the extension point for region modules.

OpenSim has an intermediate component for loading and activating region 
modules, the RegionModuleControllerPlugin, which happens to be an 
extension of /OpenSim/Startup. If anyone cares to do it, it is possible 
to disable the current
RegionModuleControllerPlugin and plugin another one instead that manages 
region modules differently. I don't see a reason for doing that, and 
honestly I don't see a reason for RegionModuleControllerPlugin to be an 
addin in the first place. But that's what it is, and I don't plan to 
change it. But it adds a layer of confusion about addins in OpenSim that 
I believe is what what led to the current situation of hanging those 2 
extension points from OpenSim.exe.

I really want to fix the broken conceptual model of hanging 
/OpenSim/RegionModules and /OpenSim/WindModule out of OpenSim.exe. They 
belong in OpenSim.Region.Framework.

I have made local changes in my repo that fix this, and it all works 
correctly. However, this implies that everyone who develops region 
modules will need to change the dependency of their region module dlls 
from the mysterious
[assembly: AddinDependency("OpenSim", "0.5")]
to
[assembly: AddinDependency("OpenSim.Region.Framework", "0.8.1")] (or 
whatever version)

Also version numbers will change meaningfully from here on.

This change is trivial -- a global replace will do it.

I have this ready to be pushed, but wanted to give an opportunity for 
discussion before I do it.



More information about the Opensim-dev mailing list