[Opensim-dev] Comms Manager
Melanie
melanie at t-data.com
Thu Feb 26 13:14:55 UTC 2009
Hi,
one of the paradigms is that no Scene should directly access another
Scene.
Therefore, providing a clear path to the global registry from the
DLL Scene is in would break that isolation.
Really, global modules that want/need to be accessed from Scene can
register an interface there.
Also, processing will probably need to be broken up into a part that
has the Scene type and a part that doesn't.
This is where I think a global module and a region module as well as
the interfaces used between them can share a dll.
The global module would register that interface on the region, and
the region modules uses it.
That is much cleaner.
Melanie
MW wrote:
> Well I hadn't really thought out all the details but what I meant is we
> can have a IApplicationPlugin that can load other plugin types itself.
>
>
>
> So if we look at the code in OpenSimBase that loads IApplicationplugins it is:
>
>
>
> protected virtual void LoadPlugins()
>
> {
>
> PluginLoader<IApplicationPlugin> loader =
>
> new PluginLoader<IApplicationPlugin>(new ApplicationPluginInitialiser(this));
>
>
>
> loader.Load("/OpenSim/Startup");
>
> m_plugins = loader.Plugins;
>
> }
>
>
>
> and the plugin initialiser is :
>
>
>
> public class ApplicationPluginInitialiser : PluginInitialiserBase
>
> {
>
> private OpenSimBase server;
>
> public ApplicationPluginInitialiser (OpenSimBase s) { server = s; }
>
> public override void Initialise (IPlugin plugin)
>
> {
>
> IApplicationPlugin p = plugin as IApplicationPlugin;
>
> p.Initialise (server);
>
> }
>
> }
>
>
>
> so there is no reason why inside a ApplicationPlugin we can't do something like:
>
>
>
> public void Initialise(OpenSimBase openSim)
>
> {
>
> LoadGridServiceModules(openSim);
>
> }
>
>
>
> Protected virtual void LoadGridServiceModules(OpenSimBase openSimBase)
>
>
>
> {
>
>
>
> PluginLoader<IGridServiceModule> loader =
>
>
>
> new PluginLoader<IGridServiceModule>(new GridServicePluginInitialiser(openSimBase.GlobalRegistry));
>
>
>
>
>
>
>
> loader.Load("/OpenSim/GridService");
>
>
>
> m_plugins = loader.Plugins;
>
>
>
> }
>
>
>
> public class GridServicePluginInitialiser : PluginInitialiserBase
>
> {
>
> private IGridServiceCore m_core;
>
> public ApplicationPluginInitialiser (IGridService core) { m_core = core; }
>
> public override void Initialise (IPlugin plugin)
>
> {
>
> IGridServiceModule p = plugin as IGridServiceModule;
>
> p.Initialise (m_core);
>
> }
>
> }
>
>
>
>
> So its then loaded the IGridServiceModules and passed them only a reference to the GlobalRegistry (from OpenSimBase).
>
>
>
> And for plugins/modules that want to register with scenes, we could
> either have another plugin type and loader, or just use
> IApplicationPlugin directly for them.
>
>
>
> Of course this opens up the question if at any point the GlobalRegistry
> should be accessable from scenes. If we are going to go with the
> approach that modules that should be accessable from scenes should
> register with them then I guess the answer is no. But I can see people
> wanting to be able to access the GlobalRegistry from Region modules and
> trying to do hacks so they can.
>
> --- On Thu, 26/2/09, Melanie <melanie at t-data.com> wrote:
> From: Melanie <melanie at t-data.com>
> Subject: Re: [Opensim-dev] Comms Manager
> To: michaelwri22 at yahoo.co.uk, opensim-dev at lists.berlios.de
> Date: Thursday, 26 February, 2009, 12:50 PM
>
> I'd have to see that, but it sounds good.
>
> Can you illustrate?
>
> Melanie
>
> MW wrote:
>> Just a though,t but maybe we are trying to be too generic in finding a
> single interface that meets all needs. We have a plugin loader (Mono.addins)
> that can quite easily load different plugin types. So by using the
> IApplicationPlugin system, we can have them also loading other plugin types.
>>
>> If basically we are saying that we want two different Module/Interface
> registeries (Global and Scene), then there is no reason that as long as all the
> plugins only register interfaces with those registeries why we can't have
> the multiple plugin types. So we have a type (and loader) that is able to
> register event handlers so it can be informed about scenes. And we a loader that
> can load the modules from the Grid servers directly.
>>
>> The loaders would be minor things basically just using PluginLoader to
> load the plugins.
>>
>> We could say this increases the complexity, but I actually think by having
> initialisation interfaces that are right for the task that the modules are going
> to do makes sense.
>>
>> --- On Thu, 26/2/09, Melanie <melanie at t-data.com> wrote:
>> From: Melanie <melanie at t-data.com>
>> Subject: Re: [Opensim-dev] Comms Manager
>> To: opensim-dev at lists.berlios.de
>> Date: Thursday, 26 February, 2009, 12:36 PM
>>
>> I don't think Grid and Asset modules need to load into region
>> servers, and vice versa. At least not by the same interface. That
>> interchangeability makes other things that are useful almost
>> impossibly complex.
>>
>> Melanie
>>
>> Stefan Andersson wrote:
>>> No, didn't notice that, but I question why Grid or Asset server
>> modules should even be aware of that, regardless of how the IScene
> interface
>> looks or what types that, in turn, pulls in.
>>>
>>> Best regards,
>>> Stefan Andersson
>>> Tribal Media AB
>>>
>>>
>>>> Date: Thu, 26 Feb 2009 12:29:19 +0000
>>>> From: melanie at t-data.com
>>>> To: opensim-dev at lists.berlios.de
>>>> Subject: Re: [Opensim-dev] Comms Manager
>>>>
>>>> Hi,
>>>>
>>>> note that I used IScene sxclusively?
>>>>
>>>> Melanie
>>>>
>>>> Stefan Andersson wrote:
>>>> > Um, yeah, having 'Scene' as a type in anyhting
> outside of
>> the Region will lead to grief.
>>>> >
>>>> >
>>>> > Suggestion:
>>>> >
>>>> >
>>>> >
>>>> > --- OpenSim.Framework: ---
>>>> >
>>>> >
>>>> >
>>>> > IGenericModule
>>>> >
>>>> > {
>>>> >
>>>> > Initialise();
>>>> >
>>>> > PostInitialise();
>>>> >
>>>> > }
>>>> >
>>>> >
>>>> >
>>>> > --- OpenSim.Region.Framework: ---
>>>> >
>>>> >
>>>> >
>>>> > IRegionModule : IGenericModule
>>>> >
>>>> > {
>>>> >
>>>> > OnNewScene();
>>>> >
>>>> > OnSceneRemoved();
>>>> >
>>>> > }
>>>> >
>>>> >
>>>> >
>>>> > Best regards,
>>>> > Stefan Andersson
>>>> > Tribal Media AB
>>>
>>>
>>>
>>>
>>>
> ------------------------------------------------------------------------
>>>
>>> _______________________________________________
>>> Opensim-dev mailing list
>>> Opensim-dev at lists.berlios.de
>>> https://lists.berlios.de/mailman/listinfo/opensim-dev
>> _______________________________________________
>> Opensim-dev mailing list
>> Opensim-dev at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/opensim-dev
>>
>>
>>
>>
>>
>>
>> ------------------------------------------------------------------------
>>
>> _______________________________________________
>> Opensim-dev mailing list
>> Opensim-dev at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/opensim-dev
> _______________________________________________
> Opensim-dev mailing list
> Opensim-dev at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>
>
>
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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