* Adds flag to enable/disable EventQueueGet.

* If EventQueueGet is enabled, use that instead of a few UDP packets, if it's disabled use the UDP packets like normal.
* We *really* suggest users do not turn on EventQueueGet yet..  as it's highly experimental, broken, and resource intensive
* Updated OpenSim.ini.example
* Testers of EventQueueGet..   in OpenSim.ini, it's in the [Startup] Section..   change EventQueue = false, to EventQueue = true.
0.6.0-stable
Teravus Ovares 2008-09-27 23:06:28 +00:00
parent 07b32c9320
commit 21bf26e9b4
3 changed files with 36 additions and 10 deletions

View File

@ -63,6 +63,7 @@ namespace OpenSim.Region.Environment.Modules.Framework
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private Scene m_scene = null; private Scene m_scene = null;
private IConfigSource m_gConfig; private IConfigSource m_gConfig;
bool enabledYN = false;
private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>(); private Dictionary<UUID, int> m_ids = new Dictionary<UUID, int>();
@ -72,13 +73,16 @@ namespace OpenSim.Region.Environment.Modules.Framework
public void Initialise(Scene scene, IConfigSource config) public void Initialise(Scene scene, IConfigSource config)
{ {
m_gConfig = config; m_gConfig = config;
m_scene = scene;
IConfig startupConfig = m_gConfig.Configs["Startup"]; IConfig startupConfig = m_gConfig.Configs["Startup"];
ReadConfigAndPopulate(scene, startupConfig, "Startup"); ReadConfigAndPopulate(scene, startupConfig, "Startup");
if (enabledYN)
{
m_scene = scene;
scene.RegisterModuleInterface<IEventQueue>(this); scene.RegisterModuleInterface<IEventQueue>(this);
scene.EventManager.OnNewClient += OnNewClient; scene.EventManager.OnNewClient += OnNewClient;
@ -86,12 +90,17 @@ namespace OpenSim.Region.Environment.Modules.Framework
scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel; scene.EventManager.OnAvatarEnteringNewParcel += AvatarEnteringParcel;
scene.EventManager.OnMakeChildAgent += MakeChildAgent; scene.EventManager.OnMakeChildAgent += MakeChildAgent;
scene.EventManager.OnRegisterCaps += OnRegisterCaps; scene.EventManager.OnRegisterCaps += OnRegisterCaps;
}
else
{
m_gConfig = null;
}
} }
private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p) private void ReadConfigAndPopulate(Scene scene, IConfig startupConfig, string p)
{ {
enabledYN = startupConfig.GetBoolean("EventQueue", false);
} }
public void PostInitialise() public void PostInitialise()

View File

@ -31,9 +31,12 @@ using System.Net;
using System.Reflection; using System.Reflection;
using System.Threading; using System.Threading;
using OpenMetaverse; using OpenMetaverse;
using OpenMetaverse.StructuredData;
using log4net; using log4net;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Region.Interfaces;
using LLSD = OpenMetaverse.StructuredData.LLSD;
namespace OpenSim.Region.Environment.Scenes namespace OpenSim.Region.Environment.Scenes
{ {
@ -282,8 +285,19 @@ namespace OpenSim.Region.Environment.Scenes
bool regionAccepted = m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, a); bool regionAccepted = m_commsProvider.InterRegion.InformRegionOfChildAgent(regionHandle, a);
if (regionAccepted) if (regionAccepted)
{
IEventQueue eq = avatar.Scene.RequestModuleInterface<IEventQueue>();
if (eq != null)
{
LLSD Item = EventQueueHelper.EnableSimulator(regionHandle, endPoint);
eq.Enqueue(Item, avatar.UUID);
}
else
{ {
avatar.ControllingClient.InformClientOfNeighbour(regionHandle, endPoint); avatar.ControllingClient.InformClientOfNeighbour(regionHandle, endPoint);
// TODO: make Event Queue disablable!
}
avatar.AddNeighbourRegion(regionHandle); avatar.AddNeighbourRegion(regionHandle);
m_log.Info("[INTERGRID]: Completed inform client about neighbours"); m_log.Info("[INTERGRID]: Completed inform client about neighbours");
} }

View File

@ -4,6 +4,9 @@
; Set this to false if you are running OpenSimulator in standalone mode ; Set this to false if you are running OpenSimulator in standalone mode
gridmode = false gridmode = false
; Experimental! Enables EventQueueGet which is highly broken right now.
EventQueue = false
; ## ; ##
; ## REGIONS ; ## REGIONS
; ## ; ##