[Opensim-dev] Module/Plugin Loading
Melanie
melanie at t-data.com
Wed Jun 25 20:17:48 UTC 2008
Actually, DLL loading is a rather simple process. While it may be
open to debate, whether to use mono addins or not, one thing we all
agree on is that we would shoot for a clean, reusable class that can
do all dynamic loading in the project, rather than having 8
different ways scattered all over.
So, what is the advantage of using mono addins over a clean reusable
implementation of our own?
Melanie
Stefan Andersson wrote:
> Well, I know one way, and that would be to have the Mono-Addin enabled
> classes and interfaces be subclasses of a base Non-Mono-Addin Module
> classes and interfaces.
>
> Ie, we have our own simple module interface(s) and then mono addin
> subclasses can decorate those.
>
> This would mean that each mono addin would exist in two separate dlls.
>
> Which, in the case of distributed repos, wouldn't be all that bad. It
> would actually be a very neat abstraction between core functionality and
> deployment environment.
>
> But if the core modules are all supposed to be in separate dlls (which
> one surely can debate) it will double the number of projects. Which
> would probably be absurd.
>
> I would really see a clear case of us gaining something specific from
> using the Mono addins before trying to solve swallowing the whole deal?
>
> (No this is not trying to not use addins, merely to approach the problem
> constructively. Use cases!)
>
> Best regards,
> Stefan Andersson
> Tribal Media AB
>
> Join the 3d web revolution : http://tribalnet.se/
>
>
>
>
> ------------------------------------------------------------------------
> Date: Wed, 25 Jun 2008 20:08:36 +0100
> From: michaelwri22 at yahoo.co.uk
> To: opensim-dev at lists.berlios.de
> Subject: Re: [Opensim-dev] Module/Plugin Loading
>
> Yes those are great if we can acheive them. I'm just not sure how we
> create a "clean" wrapper that is independant of Mono.addins, as it
> uses various attributes to define the interfaces and plugins
> (TypeExtensionPoint, Extension, etc) . So those classes need
> references to mono.addins.
>
> Like for example our current IApplicationPlugin:
>
> using Mono.Addins;
>
> [assembly : AddinRoot("OpenSim", "0.5")]
>
> namespace OpenSim
> {
> [TypeExtensionPoint("/OpenSim/Startup")]
> public interface IApplicationPlugin
> {
> void Initialise(OpenSimBase openSim);
> void Close();
> }
> }
>
> and to implement a Application plugin:
>
> assembly : Addin]
> [assembly : AddinDependency("OpenSim", "0.5")]
> [assembly : AddinDependency("RegionProxy", "0.1")]
>
> namespace OpenSim.ApplicationPlugins.LoadBalancer
> {
> [Extension("/OpenSim/Startup")]
> public class LoadBalancerPlugin : IApplicationPlugin
> {
>
>
> So if we had more classes that used were loaded by mono.addins, we
> would need the interfaces to have a TypeExtensionPoint attribute and
> the implementations to have the Extension. Tthe only other way I saw
> for Mono.addings to load plugins without those attributes, is by
> using its xml manifest files. And one of our requirements is listed
> as that we don't use third party config files.
>
> I most likely haven't dug deep enough into mono.addins and there
> could well be a method to do cut out the attributes and not require
> manifest files. But anyway my point is that I believe a implied
> effect of those requirements is that we don't have references to
> Mono.addins in the core opensim assemblys. (OpenSim.Framework.X , etc)
>
> */Dr Scofield <DrScofield at xyzzyxyzzy.net>/* wrote:
>
> Stefan Andersson wrote:
> > Just to get this straight, is what we're saying
> >
> > 1) Yes, we will have a common loader architecture
> > 2) Yes, it will be implemented as a set of interfaces
> > 3) Yes, we will create one implementation as a wrapper around
> Mono.Addins
> > 4) Yes, we will aim at having a common setup file structure for
> > OpenSim, not depend on lots of different third-party
> components config.
> >
> > That sounds excellent to me.
> +1
> >
> > Best regards,
> > Stefan Andersson
> > Tribal Media AB
> >
> > Join the 3d web revolution : http://tribalnet.se/
> >
> >
> >
> >
> >
> ------------------------------------------------------------------------
> >
> > > Date: Wed, 25 Jun 2008 10:16:34 -0400
> > > From: sean at dague.net
> > > To: opensim-dev at lists.berlios.de
> > > Subject: Re: [Opensim-dev] Module/Plugin Loading
> > >
> > > On Wed, Jun 25, 2008 at 03:12:45PM +0100, Melanie wrote:
> > > > I believe that we should use a plugin loader that allows
> us to
> > > > configure plugin loading completely within our own .ini
> files. I
> > > > think that a requirement to tweak complex XML based
> mono/.NET config
> > > > files to get a plugin loaded will put running OpenSim out
> fo reach
> > > > of many users.
> > > >
> > > > That said, I'm all for a standardized way to load a
> plugin. I just
> > > > think it shouldn't be required to edit conifg files
> outside of
> > > > OpenSim's own.
> > >
> > > +1. I think that ryan's plugin loader approach will give us
> that (at
> > > least from what I've seen in his patch and description).
> I'm looking
> > > forward to that work.
> > >
> > > -Sean
> > >
> > > --
> > >
> __________________________________________________________________
> > >
> > > Sean Dague Mid-Hudson Valley
> > > sean at dague dot net Linux Users Group
> > > http://dague.net http://mhvlug.org
> > >
> > > There is no silver bullet. Plus, werewolves make better
> neighbors
> > > than zombies, and they tend to keep the vampire population
> down.
> > >
> __________________________________________________________________
> >
> >
> ------------------------------------------------------------------------
> >
> > _______________________________________________
> > Opensim-dev mailing list
> > Opensim-dev at lists.berlios.de
> > https://lists.berlios.de/mailman/listinfo/opensim-dev
> >
>
>
> --
> dr dirk husemann ---- virtual worlds research ---- ibm zurich
> research lab
> SL: dr scofield ---- drscofield at xyzzyxyzzy.net ----
> http://xyzzyxyzzy.net/
> RL: hud at zurich.ibm.com - +41 44 724 8573 -
> http://www.zurich.ibm.com/~hud/
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>
> ------------------------------------------------------------------------
> Not happy with your email address?
> Get the one you really want
> <http://uk.docs.yahoo.com/ymail/new.html> - millions of new email
> addresses available now at Yahoo!
> <http://uk.docs.yahoo.com/ymail/new.html>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
More information about the Opensim-dev
mailing list