<table cellspacing="0" cellpadding="0" border="0" ><tr><td valign="top" style="font: inherit;">I still think we should have a SharedRegistry that all Scenes have access to. Some of the current shared RegionModules could move to using it as well. And I know some of the other devs want one to; Adam and Stefan were talking about one in IRC the other day.<br><br>But if we all agree that we actually don't want one of them. Then a possible compromise might be adding a extra RegisterToAllRegistries method to the core Global registry interface so something like:<br><br>public interface IGridServiceCore<br> {<br> T Get<T>();<br> void RegisterInterface<T>(T iface);<br> void RegisterInterfaceToAllRegistries<T>(T iface);<br> bool TryGet<T>(out T iface);<br>
}<br><br>This would add the interface to a list, that then is "copied" to each region that starts up, so a kind of auto registration. Without the modules having to be given scene references if the interface type they are using doesn't support that. <br><br>So all we would be doing is making OpenSimBase implement that interface and provide the support for the "auto registration" to Scenes with RegisterInterfaceToAllRegistries. Any module/plugin using RegisterInterface would only register with the Global/Application registry that wouldn't be accessable from regions. Of course they could then manually register themselves with the regions.<br><br>I just really dislike trying Scene/IScene into all the plugin interfaces. I'm fine with plugins being able to access them via a IApplicationPlugin if thats the way the plugin creator did things. But I also want a more generic module type that can still offer services to regions/scenes. Most likely using the plugin
loader approach I mentioned earlier. If this extra plugin loading was done by a ApplicationPlugin then anyone who didn't want to support those types could easily remove that loader.<br><br>--- On <b>Thu, 26/2/09, Melanie <i><melanie@t-data.com></i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;">From: Melanie <melanie@t-data.com><br>Subject: Re: [Opensim-dev] Comms Manager<br>To: michaelwri22@yahoo.co.uk, opensim-dev@lists.berlios.de<br>Date: Thursday, 26 February, 2009, 2:40 PM<br><br><pre>I think that would introduce a layer of complexity in core, where i think that<br>complexity (e.g. registering to scenes) s better off distributed inside the<br>modules that actually need it. Keep it simple. I believe my approach is what<br>will work with the least amount of core code, and provide the greatest<br>flexibility.<br><br>Melanie<br><br>MW wrote:<br>> I know I said we should
wait for other people to give some input, but just<br>one last suggestion.<br>> <br>> Maybe we should have three registeries. A ApplicationServiceRegistry that<br>is only accessable from the application level), A SharedServiceRegistry that is<br>accessable from the application and all scenes/regions. And then the current<br>Registry in Scene.<br>> <br>> Then its upto the modules/components/plugins to which registries they want<br>to register.<br>> <br>> And certain plugin types might only get references allowing them to<br>register to certain registeries. <br>> --- On Thu, 26/2/09, MW <michaelwri22@yahoo.co.uk> wrote:<br>> From: MW <michaelwri22@yahoo.co.uk><br>> Subject: Re: [Opensim-dev] Comms Manager<br>> To: opensim-dev@lists.berlios.de<br>> Date: Thursday, 26 February, 2009, 1:48 PM<br>> <br>> Well actually my suggestion of supporting multiple plugin interfaces<br>allowed both approaches and left
everything up to the module creator. <br>> But I think we should wait for input from others now as we aren't<br>really getting anywhere on the fine details. I think we have the basis of a<br>system just need to get other peope's input so we can work out those small<br>details. Like the main one being should the global registry be accessable from<br>regions. And if we decide it shouldn't, is it okay for it be in the short<br>term so we can refactor comms manager easiest. ie comms manager becomes the<br>global registry for now. <br>> --- On Thu, 26/2/09, Melanie <melanie@t-data.com> wrote:<br>> From: Melanie <melanie@t-data.com><br>> Subject: Re:<br>> [Opensim-dev] Comms Manager<br>> To: michaelwri22@yahoo.co.uk, opensim-dev@lists.berlios.de<br>> Date: Thursday, 26 February, 2009, 1:36 PM<br>> <br>> If you want to be more flexible, then my approach is better. In your<br>model, a global module has not way to
_prevent_ being accessed by Scene.<br>> <br>> I believe Scene has no business holding a ref to the application, or<br>accessing the global registry.<br>> <br>> In my design, each module has the power to decide whether it wants to be<br>accessible from Scene and what methods it exposes to it. Your method reduces<br>that duality into a single interface and makes all scenes be able to access all<br>methods on all interfaces. That leaves no room for isolation, even if a module<br>writer would want it.<br>> <br>> I believe the modules _should_ indeed register with each scene in a<br>callback, and that would actually let them register only to specific scenes if<br>they wanted to. More flexibility<br>> yet.<br>> <br>> Melanie<br>> <br>> MW wrote:<br>>> Hmm, I never suggested anything that would mean one scene be able to<br>> directly access another.<br>>> <br>>> I see the GlobalRegistry as a very basic
interface something like:<br>>> <br>>> public interface IGridServiceCore<br>>> {<br>>> T Get<T>();<br>>> void RegisterInterface<T>(T iface);<br>>> bool TryGet<T>(out T iface);<br>>> }<br>>> <br>>> [Which would be in OpenSim.Framework or wherever]<br>>> <br>>> So if we did want a Scene to be able to access it, all it would need<br>on<br>> creation is pass a IGridServiceCore reference in its parameters. So it<br>> doesn't actually change anything compared to how things are now with<br>the<br>> shared modules.<br>>> <br>>> I just am still not sure that GlobalServices should have to<br>indivudally<br>> register with the Scenes even if they want to provide services to region<br>> modules. I see the<br>> module that handled User server comms as a global service but<br>> don't think it should have to register
with all regions. I'm more<br>in<br>> mind that it should just register with the global registry and then region<br>> modules than access that.<br>>> <br>>> And yes nothing I have suggested stops a ApplicationModule and a<br>> RegionModule from sharing a dll, and the ApplicationModule starts up and<br>> registers the RegionModule or whatever. I just don't think its the<br>solution<br>> for everything. So am trying to think of way of being more flexible.<br>>> <br>>> <br>>> --- On Thu, 26/2/09, Melanie <melanie@t-data.com> wrote:<br>>> From: Melanie <melanie@t-data.com><br>>> Subject: Re: [Opensim-dev] Comms Manager<br>>> To: michaelwri22@yahoo.co.uk, opensim-dev@lists.berlios.de<br>>> Date: Thursday, 26 February, 2009, 1:14 PM<br>>> <br>>> Hi,<br>>> <br>>> one of the paradigms is that no Scene should directly access another<br>> <br>>>
Scene.<br>>> <br>>> Therefore, providing a clear path to the global registry from the DLL<br>Scene is in would break that isolation.<br>>> <br>>> Really, global modules that want/need to be accessed from Scene can<br>register an interface there.<br>>> Also, processing will probably need to be broken up into a part that<br>has the Scene type and a part that doesn't.<br>>> <br>>> This is where I think a global module and a region module as well as<br>the interfaces used between them can share a dll.<br>>> <br>>> The global module would register that interface on the region, and the<br>region modules uses it.<br>>> <br>>> That is much cleaner.<br>>> <br>>> Melanie<br>>> <br>>> MW wrote:<br>>>> Well I hadn't really thought out all the details but what I<br>meant<br>> is<br>>> we<br>>>> can have a IApplicationPlugin that can load other plugin
types<br>itself.<br>> <br>>>> <br>> <br>>>> <br>>>> <br>>>> So if we look at the code in OpenSimBase that loads<br>> IApplicationplugins it<br>>> is:<br>>>> <br>>>> <br>>>> <br>>>> protected virtual void LoadPlugins()<br>>>> <br>>>> {<br>>>> <br>>>> PluginLoader<IApplicationPlugin> loader =<br>>>> <br>>>> new PluginLoader<IApplicationPlugin>(new<br>>> ApplicationPluginInitialiser(this));<br>>>> <br>>>> <br>>>> <br>>>> loader.Load("/OpenSim/Startup");<br>>>> <br>>>> m_plugins = loader.Plugins;<br>>>> <br>>>> }<br>>>> <br>>>> <br>>>> <br>>>> and the plugin initialiser is :<br>>>> <br>>>> <br>>>>
<br>>>> public class ApplicationPluginInitialiser :<br>PluginInitialiserBase<br>>>> <br>>>> {<br>>>> <br>>>> private OpenSimBase<br>> server;<br>>>> <br>>>> public ApplicationPluginInitialiser (OpenSimBase s) {<br>server =<br>> s;<br>>> }<br>>>> <br>>>> public override void Initialise (IPlugin plugin)<br>>>> <br>>>> {<br>>>> <br>>>> IApplicationPlugin p = plugin as IApplicationPlugin;<br>>>> <br>>>> p.Initialise (server);<br>>>> <br>>>> }<br>>>> <br>>>> }<br>>>> <br>>>> <br>>>> <br>>>> so there is no reason why inside a ApplicationPlugin we can't<br>do<br>>> something like:<br>>>> <br>>>> <br>>>> <br>>>> public void
Initialise(OpenSimBase openSim)<br>>>> <br>>>> {<br>>>> <br>>>> LoadGridServiceModules(openSim);<br>>>> <br>>>> }<br>>>> <br>>>> <br>>>> <br>>>> Protected virtual void LoadGridServiceModules(OpenSimBase<br>openSimBase)<br>>>> <br>>>> <br>> <br>>>> <br>>>> {<br>>>> <br>>>> <br>>>> <br>>>> PluginLoader<IGridServiceModule> loader =<br>>>> <br>>>> <br>>>> <br>>>> new PluginLoader<IGridServiceModule>(new<br>>> GridServicePluginInitialiser(openSimBase.GlobalRegistry));<br>>>> <br>>>> <br>>>> <br>>>> <br>>>> <br>>>> <br>>>> <br>>>> loader.Load("/OpenSim/GridService");<br>>>> <br>>>>
<br>>>> <br>>>> m_plugins = loader.Plugins;<br>>>> <br>>>> <br>>>> <br>>>> }<br>>>> <br>>>> <br>>>> <br>>>> public class GridServicePluginInitialiser :<br>PluginInitialiserBase<br>>>> <br>>>> {<br>>>> <br>>>> private IGridServiceCore m_core;<br>>>> <br>>>> public ApplicationPluginInitialiser (IGridService core) {<br>> m_core =<br>>> core;<br>> }<br>>>> <br>>>> public override void Initialise (IPlugin plugin)<br>>>> <br>>>> {<br>>>> <br>>>> IGridServiceModule p = plugin as IGridServiceModule;<br>>>> <br>>>> p.Initialise (m_core);<br>>>> <br>>>> }<br>>>> <br>>>> }<br>>>> <br>>>>
<br>>>> <br>>>> <br>>>> So its then loaded the IGridServiceModules and passed them only a<br>>> reference to the GlobalRegistry (from OpenSimBase).<br>>>> <br>>>> <br>>>> <br>>>> And for plugins/modules that want to register with scenes, we<br>could<br>>>> either have another plugin type and loader, or just use<br>>>> IApplicationPlugin directly for them.<br>>>> <br>>>> <br>>>> <br>>>> Of course this opens up the question if at any point the<br>> GlobalRegistry<br>>>> should be accessable from scenes. If we are going to go with<br>> the<br>>>> approach that modules that should be accessable from scenes should<br>>>> register with them then I guess the answer is no. But I can see<br>people<br>>>> wanting to be able to access the GlobalRegistry from Region<br>modules<br>>
and<br>>>> trying to do hacks so they can.<br>>>> <br>>>> --- On Thu, 26/2/09, Melanie <melanie@t-data.com> wrote:<br>>>> From: Melanie <melanie@t-data.com><br>>>> Subject: Re: [Opensim-dev] Comms Manager<br>>>> To: michaelwri22@yahoo.co.uk, opensim-dev@lists.berlios.de<br>>>> Date: Thursday, 26 February, 2009, 12:50 PM<br>>>> <br>>>> I'd have to see that, but it sounds good.<br>>>> <br>>>> Can you illustrate?<br>>>> <br>>>> Melanie<br>>>> <br>>>> MW wrote:<br>>>>> Just a though,t but maybe we are trying to be too generic in<br>> finding a<br>>>> single interface that meets all needs. We have a plugin<br>> loader<br>>> (Mono.addins)<br>>>> that can quite easily load different plugin types. So by using the<br>>>> IApplicationPlugin system, we can have them
also loading other<br>plugin<br>>> types. <br>>>>> <br>>>>> If basically we are saying that we want two different<br>> Module/Interface<br>>>> registeries (Global and Scene), then there is no reason that as<br>long<br>> as<br>>> all the<br>>>> plugins only register interfaces with those registeries why we<br>> can't<br>>> have<br>>>> the multiple plugin types. So we have a type (and loader) that is<br>able<br>> to<br>>>> register event handlers so it can be informed about scenes. And we<br>a<br>>> loader that<br>>>> can load the modules from the Grid servers directly. <br>>>>> <br>>>>> The loaders would be minor things basically just using<br>> PluginLoader to<br>>>> load the plugins. <br>>>>> <br>>>>> We could say this increases<br>> the complexity, but I actually think<br>>
by<br>>> having<br>>>> initialisation interfaces that are right for the task that the<br>modules<br>> are<br>>> going<br>>>> to do makes sense.<br>>>>> <br>>>>> --- On Thu, 26/2/09, Melanie <melanie@t-data.com> wrote:<br>>>>> From: Melanie <melanie@t-data.com><br>>>>> Subject: Re: [Opensim-dev] Comms Manager<br>>>>> To: opensim-dev@lists.berlios.de<br>>>>> Date: Thursday, 26 February, 2009, 12:36 PM<br>>>>> <br>>>>> I don't think Grid and Asset modules need to load into<br>region servers, and vice versa. At least not by the same interface. That<br>interchangeability makes other things that are useful almost impossibly complex.<br>>>>> <br>>>>> Melanie<br>>>>> <br>>>>> Stefan Andersson wrote:<br>>>>>> No, didn't notice that, but I question why<br>>
Grid or Asset<br>>> server<br>>>>> modules should even be aware of that, regardless of how the<br>IScene<br>>>> interface<br>>>>> looks or what types that, in turn, pulls in.<br>>>>>> <br>>>>>> Best regards,<br>>>>>> Stefan Andersson<br>>>>>> Tribal Media AB<br>>>>>> <br>>>>>> <br>>>>>>> Date: Thu, 26 Feb 2009 12:29:19 +0000<br>>>>>>> From: melanie@t-data.com<br>>>>>>> To: opensim-dev@lists.berlios.de<br>>>>>>> Subject: Re: [Opensim-dev] Comms Manager<br>>>>>>> <br>>>>>>> Hi,<br>>>>>>> <br>>>>>>> note that I used IScene sxclusively?<br>>>>>>> <br>>>>>>> Melanie<br>>>>>>> <br>>>>>>> Stefan Andersson
wrote:<br>>>>>>> > Um, yeah, having 'Scene' as a type in<br>> anyhting<br>>>> outside<br>> of<br>>>>> the Region will lead to grief.<br>>>>>>> > > > Suggestion:<br>>>>>>> > > > > --- OpenSim.Framework: ---<br>>>>>>> > > > > IGenericModule<br>>>>>>> > > {<br>>>>>>> > > Initialise();<br>>>>>>> > > PostInitialise();<br>>>>>>> > > }<br>>>>>>> > > > > --- OpenSim.Region.Framework: ---<br>>>>>>> > > ><br>> <br>>>>>>> > IRegionModule : IGenericModule<br>>>>>>> > > {<br>>>>>>> > > OnNewScene();<br>>>>>>> > > OnSceneRemoved();<br>>>>>>> > >
}<br>>>>>>> > > > > Best regards,<br>>>>>>> > Stefan Andersson<br>>>>>>> > Tribal Media AB<br>>>>>> <br>>>>>> <br>>>>>> <br>>>>>> <br>>>>>> <br>>>> <br>> ------------------------------------------------------------------------<br>>>>>> <br>>>>>> _______________________________________________<br>>>>>> Opensim-dev mailing list<br>>>>>> Opensim-dev@lists.berlios.de<br>>>>>> <br>> https://lists.berlios.de/mailman/listinfo/opensim-dev<br>>>>> _______________________________________________<br>>>>> Opensim-dev mailing list<br>>>>> Opensim-dev@lists.berlios.de<br>>>>> https://lists.berlios.de/mailman/listinfo/opensim-dev<br>>>>> <br>>>>>
<br>>>>> <br>>>>> <br>>>>> <br>>>>> <br>>><br>------------------------------------------------------------------------<br>>>>> <br>>>>> _______________________________________________<br>>>>> Opensim-dev mailing list<br>>>>> Opensim-dev@lists.berlios.de<br>>>>> https://lists.berlios.de/mailman/listinfo/opensim-dev<br>>>> _______________________________________________<br>>>> Opensim-dev mailing list<br>>>> Opensim-dev@lists.berlios.de<br>>>> https://lists.berlios.de/mailman/listinfo/opensim-dev<br>>>> <br>>>> <br>>>> <br>> <br>>>> <br>>>> <br>>>> <br>> ------------------------------------------------------------------------<br>>>> <br>>>> _______________________________________________<br>>>> Opensim-dev
mailing list<br>>>> Opensim-dev@lists.berlios.de<br>>>> https://lists.berlios.de/mailman/listinfo/opensim-dev<br>>> _______________________________________________<br>>> Opensim-dev mailing list<br>>> Opensim-dev@lists.berlios.de<br>>> https://lists.berlios.de/mailman/listinfo/opensim-dev<br>>> <br>>> <br>>> <br>>> <br>>> <br>>><br>------------------------------------------------------------------------<br>>> <br>>> _______________________________________________<br>>> Opensim-dev mailing list<br>>> Opensim-dev@lists.berlios.de<br>>> https://lists.berlios.de/mailman/listinfo/opensim-dev<br>> _______________________________________________<br>> Opensim-dev mailing<br>> list<br>> Opensim-dev@lists.berlios.de<br>> https://lists.berlios.de/mailman/listinfo/opensim-dev<br>> <br>> <br>> <br>> <br>> <br>> <br>>
_______________________________________________<br>> Opensim-dev mailing list<br>> Opensim-dev@lists.berlios.de<br>> https://lists.berlios.de/mailman/listinfo/opensim-dev<br>> <br>> <br>> <br>> <br>> <br>> ------------------------------------------------------------------------<br>> <br>> _______________________________________________<br>> Opensim-dev mailing list<br>> Opensim-dev@lists.berlios.de<br>> https://lists.berlios.de/mailman/listinfo/opensim-dev<br></pre></blockquote></td></tr></table><br>