From 4b75353cbf50de3cae4c48ec90b55f30c1612c92 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Thu, 15 Oct 2009 16:35:27 -0700 Subject: Object update prioritization by Jim Greensky of Intel Labs, part one. This implements a simple distance prioritizer based on initial agent positions. Re-prioritizing and more advanced priority algorithms will follow soon --- OpenSim/Client/MXP/ClientStack/MXPClientView.cs | 31 +++++++++------------- .../Client/VWoHTTP/ClientStack/VWHClientView.cs | 13 +++------ 2 files changed, 17 insertions(+), 27 deletions(-) (limited to 'OpenSim/Client') diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index bc02bc4..ea29c41 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs @@ -996,19 +996,19 @@ namespace OpenSim.Client.MXP.ClientStack // Need to translate to MXP somehow } - public void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, uint avatarLocalID, Vector3 position, byte[] textureEntry, uint parentID, Quaternion rotation) + public void SendAvatarData(SendAvatarData data) { //ScenePresence presence=((Scene)this.Scene).GetScenePresence(avatarID); - UUID ownerID = avatarID; - MXPSendAvatarData(firstName + " " + lastName, ownerID, UUID.Zero, avatarID, avatarLocalID, position, rotation); + UUID ownerID = data.avatarID; + MXPSendAvatarData(data.firstName + " " + data.lastName, ownerID, UUID.Zero, data.avatarID, data.avatarLocalID, data.Pos, data.rotation); } - public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, Quaternion rotation, UUID uuid) + public void SendAvatarTerseUpdate(SendAvatarTerseData data) { MovementEventMessage me = new MovementEventMessage(); - me.ObjectIndex = localID; - me.Location =ToOmVector(position); - me.Orientation = ToOmQuaternion(rotation); + me.ObjectIndex = data.localID; + me.Location = ToOmVector(data.position); + me.Orientation = ToOmQuaternion(data.rotation); Session.Send(me); } @@ -1028,22 +1028,17 @@ namespace OpenSim.Client.MXP.ClientStack // Need to translate to MXP somehow } - public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material, byte[] textureanim, bool attachment, uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius) + public void SendPrimitiveToClient(SendPrimitiveData data) { - MXPSendPrimitive(localID, ownerID, acc, rvel, primShape, pos, objectID, vel, rotation, flags,text,color,parentID,particleSystem,clickAction,material,textureanim); + MXPSendPrimitive(data.localID, data.ownerID, data.acc, data.rvel, data.primShape, data.pos, data.objectID, data.vel, data.rotation, data.flags, data.text, data.color, data.parentID, data.particleSystem, data.clickAction, data.material, data.textureanim); } - public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material) - { - MXPSendPrimitive(localID, ownerID, acc, rvel, primShape, pos, objectID, vel, rotation, flags, text, color, parentID, particleSystem, clickAction, material, new byte[0]); - } - - public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId, UUID owner, int attachPoint) + public void SendPrimTerseUpdate(SendPrimitiveTerseData data) { MovementEventMessage me = new MovementEventMessage(); - me.ObjectIndex = localID; - me.Location = ToOmVector(position); - me.Orientation = ToOmQuaternion(rotation); + me.ObjectIndex = data.localID; + me.Location = ToOmVector(data.position); + me.Orientation = ToOmQuaternion(data.rotation); Session.Send(me); } diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index e3abcf5..3a48a03 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs @@ -560,12 +560,12 @@ namespace OpenSim.Client.VWoHTTP.ClientStack throw new System.NotImplementedException(); } - public void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation) + public void SendAvatarData(SendAvatarData data) { throw new System.NotImplementedException(); } - public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, Quaternion rotation, UUID uuid) + public void SendAvatarTerseUpdate(SendAvatarTerseData data) { throw new System.NotImplementedException(); } @@ -585,17 +585,12 @@ namespace OpenSim.Client.VWoHTTP.ClientStack throw new System.NotImplementedException(); } - public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material, byte[] textureanim, bool attachment, uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius) + public void SendPrimitiveToClient(SendPrimitiveData data) { throw new System.NotImplementedException(); } - public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material) - { - throw new System.NotImplementedException(); - } - - public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId, UUID owner, int attachPoint) + public void SendPrimTerseUpdate(SendPrimitiveTerseData data) { throw new System.NotImplementedException(); } -- cgit v1.1 From fdb2a75ad357668b860fc5055e0630ef75a3ad20 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Sat, 17 Oct 2009 18:01:22 -0700 Subject: Committing the second part of Jim Greensky @ Intel Lab's patch, re-prioritizing updates --- OpenSim/Client/MXP/ClientStack/MXPClientView.cs | 4 ++++ OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs | 5 +++++ 2 files changed, 9 insertions(+) (limited to 'OpenSim/Client') diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index ea29c41..52110d6 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs @@ -1042,6 +1042,10 @@ namespace OpenSim.Client.MXP.ClientStack Session.Send(me); } + public void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler) + { + } + public void FlushPrimUpdates() { } diff --git a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs index d6990de..4a54c67 100644 --- a/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs +++ b/OpenSim/Client/VWoHTTP/ClientStack/VWHClientView.cs @@ -596,6 +596,11 @@ namespace OpenSim.Client.VWoHTTP.ClientStack throw new System.NotImplementedException(); } + public void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler) + { + throw new System.NotImplementedException(); + } + public void FlushPrimUpdates() { throw new System.NotImplementedException(); -- cgit v1.1 From 233e16b99cc80190d41143ecdfe01308eb39932a Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Sun, 18 Oct 2009 20:24:20 -0700 Subject: * Rewrote the methods that build ObjectUpdate and ImprovedTerseObjectUpdate packets to fill in the data more accurately and avoid allocating memory that is immediately thrown away * Changed the Send*Data structs in IClientAPI to use public readonly members instead of private members and getters * Made Parallel.ProcessorCount public * Started switching over packet building methods in LLClientView to use Util.StringToBytes[256/1024]() instead of Utils.StringToBytes() * More cleanup of the ScenePresences vs. ClientManager nightmare * ScenePresence.HandleAgentUpdate() will now time out and drop incoming AgentUpdate packets after three seconds. This fixes a deadlock on m_AgentUpdates that was blocking up the LLUDP server --- OpenSim/Client/MXP/ClientStack/MXPClientView.cs | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) (limited to 'OpenSim/Client') diff --git a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs index 52110d6..204603d 100644 --- a/OpenSim/Client/MXP/ClientStack/MXPClientView.cs +++ b/OpenSim/Client/MXP/ClientStack/MXPClientView.cs @@ -999,16 +999,16 @@ namespace OpenSim.Client.MXP.ClientStack public void SendAvatarData(SendAvatarData data) { //ScenePresence presence=((Scene)this.Scene).GetScenePresence(avatarID); - UUID ownerID = data.avatarID; - MXPSendAvatarData(data.firstName + " " + data.lastName, ownerID, UUID.Zero, data.avatarID, data.avatarLocalID, data.Pos, data.rotation); + UUID ownerID = data.AvatarID; + MXPSendAvatarData(data.FirstName + " " + data.LastName, ownerID, UUID.Zero, data.AvatarID, data.AvatarLocalID, data.Position, data.Rotation); } public void SendAvatarTerseUpdate(SendAvatarTerseData data) { MovementEventMessage me = new MovementEventMessage(); - me.ObjectIndex = data.localID; - me.Location = ToOmVector(data.position); - me.Orientation = ToOmQuaternion(data.rotation); + me.ObjectIndex = data.LocalID; + me.Location = ToOmVector(data.Position); + me.Orientation = ToOmQuaternion(data.Rotation); Session.Send(me); } @@ -1030,15 +1030,17 @@ namespace OpenSim.Client.MXP.ClientStack public void SendPrimitiveToClient(SendPrimitiveData data) { - MXPSendPrimitive(data.localID, data.ownerID, data.acc, data.rvel, data.primShape, data.pos, data.objectID, data.vel, data.rotation, data.flags, data.text, data.color, data.parentID, data.particleSystem, data.clickAction, data.material, data.textureanim); + MXPSendPrimitive(data.localID, data.ownerID, data.acc, data.rvel, data.primShape, data.pos, data.objectID, data.vel, + data.rotation, (uint)data.flags, data.text, data.color, data.parentID, data.particleSystem, data.clickAction, + data.material, data.textureanim); } public void SendPrimTerseUpdate(SendPrimitiveTerseData data) { MovementEventMessage me = new MovementEventMessage(); - me.ObjectIndex = data.localID; - me.Location = ToOmVector(data.position); - me.Orientation = ToOmQuaternion(data.rotation); + me.ObjectIndex = data.LocalID; + me.Location = ToOmVector(data.Position); + me.Orientation = ToOmQuaternion(data.Rotation); Session.Send(me); } -- cgit v1.1 From 2a886fd76c9df972fa3096d19b37047f7eda672f Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 21 Oct 2009 02:19:45 +0100 Subject: Really make module port selection work. Implement port setting in LLProxyLoginModule. --- OpenSim/Client/Linden/LLProxyLoginModule.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'OpenSim/Client') diff --git a/OpenSim/Client/Linden/LLProxyLoginModule.cs b/OpenSim/Client/Linden/LLProxyLoginModule.cs index 2da774f..ad67c44 100644 --- a/OpenSim/Client/Linden/LLProxyLoginModule.cs +++ b/OpenSim/Client/Linden/LLProxyLoginModule.cs @@ -50,8 +50,16 @@ namespace OpenSim.Client.Linden /// public class LLProxyLoginModule : ISharedRegionModule { + private uint m_port = 0; + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + public LLProxyLoginModule(uint port) + { + m_log.DebugFormat("[CLIENT]: LLProxyLoginModule port {0}", port); + m_port = port; + } + protected bool RegionLoginsEnabled { get @@ -148,8 +156,8 @@ namespace OpenSim.Client.Linden protected void AddHttpHandlers() { //we will add our handlers to the first scene we received, as all scenes share a http server. But will this ever change? - MainServer.Instance.AddXmlRPCHandler("expect_user", ExpectUser, false); - MainServer.Instance.AddXmlRPCHandler("logoff_user", LogOffUser, false); + MainServer.GetHttpServer(m_port).AddXmlRPCHandler("expect_user", ExpectUser, false); + MainServer.GetHttpServer(m_port).AddXmlRPCHandler("logoff_user", LogOffUser, false); } protected void AddScene(Scene scene) -- cgit v1.1