[Opensim-dev] So I decided to give this one more shot before I start chopping it up with a chainsaw.......

Justin Clark-Casey jjustincc at googlemail.com
Fri Dec 14 09:55:26 UTC 2007


Michael Wright wrote:
> hmm,  has there been a 100% certain case of LLUUID in the grid 
> communitcations causing a problem ? As we don't actually use the 
> ISerializable interfeace, for the REST postings (which inventory 
> uses). We use XML serialising  and from all the tests I have done 
> (just did another one to be sure before I wrote this email), LLUUID is 
> serializable into XML. If it wasn't then we would no longer be able to 
> take items in and out of inventory as that serialises/deserialises the 
> SceneObjectGroup to and from xml.  Same with load-xml/save-xml.
>
Yes, I thought it was odd that I wasn't seeing the same failures Teravus 
was seeing on my Windows system.  Nonetheless, I've attached another 
patch (a very nasty hack job) to #145 to temporarily store Guids in the 
inventory data structures rather than LLUIDs.  See if this helps.
>
> If possible, I would rather us leave the changing to guids for now as 
> I think we need to think of a longer term plan. As I said, the 
> Sceneobjects are full of LLUUID and using xml serialising and if we 
> want to avoid future problems with changes to LLUUID etc (like old 
> saved xml files or iventory items not working), we need to come up 
> with something to replace those classes in there and not sure Guid is 
> ideal there.
>
>
> Anyway on a slightly different subject, could anyone who is working on 
> inventory, either try to catch me on irc or reply to this and let me 
> know which bits they are working on and which bits would be safe for 
> me to do some changes to. Just I want to do some refactoring to the 
> Inventory Code in scene and most likely the cache code, but don't want 
> to mess up anyone current work.
Since I'm already writing an e-mail, I'm just going to confirm that I'm 
not actively looking at anything in this area (apart from this).  I 
probably won't do so until you've finished the refactoring unless it's 
very minor.
> */Teravus Ovares <teravus at gmail.com>/* wrote:
>
>     Hey Guys'n Gals.. 
>      
>     Digging into Bug number 145 on Mantis..    I discovered profuse
>     and prolific use of the unserializable LLUUID in inventory..   
>     It's used *everywhere*.    
>      
>     It's no wonder inventory is spotty and error prone!
>      
>     It's used in InventoryFolderBase
>     It's used in InventoryItemBase
>     It's used in the REST calls
>     All of this data is being transferred over Grid Communications :/
>      
>     Once again, I restate that the LLUUID is no longer serializable. 
>     It now implements the IComparable interface which is *not*
>     serializable..   Therefore, it can 'never' be used in any grid
>     communications, period.
>      
>     We all need to take a good look at the grid inventory service and
>     'fix' all uses of LLUUID.
>      
>     It's *really* easy to use a Guid instead.     
>      
>     To go from a System.Guid to a LLUUID, you instantiate a new LLUUID
>     and pass the Guid to it's constructor.  
>     ex:
>      
>     Guid gAgentID = 'xxxxxxx-xx-x--x-x--xx';
>      
>     LLUUID AgentID = new LLUUID(gAgentID);
>      
>      
>     To go from a LLUUID to a guid, you use the UUID property of the
>     LLUUID.
>     ex:
>      
>     Guid gAgentID = AgentID.UUID;
>      
>     So, given that you've got a userID LLUUID..      to get it over
>     grid communications reliably..  you have to turn it into a Guid.
>      
>     requester.BeginPostObject<*Guid*>(_inventoryServerUrl +
>     "/GetInventory/", *userID.UUID*);
>      
>     Then on the receiving side,
>      
>      httpServer.AddStreamHandler(
>                     new RestDeserialisehandler<*Guid*,
>     InventoryCollection>("POST", "/GetInventory/",
>                                                                                      
>     m_inventoryService.GetUserInventory));
>      
>     public InventoryCollection GetUserInventory(*Guid userID*)
>             {
>                 InventoryCollection invCollection = new
>     InventoryCollection();
>                 List<InventoryFolderBase> folders;
>                 List<InventoryItemBase> allItems;
>                 if (TryGetUsersInventory(*new LLUUID(userID),* out
>     folders, out allItems))
>                 {
>                     invCollection.AllItems = allItems;
>                     invCollection.Folders = folders;
>                     invCollection.UserID = *new LLUUID(userID);*
>                 }
>                 return invCollection;
>             }
>      
>     Additionally,
>     Any object that encapsulates a LLUUID directly, is NOT
>     serializable...   that means..   the objects;
>      
>     InventoyFolderBase
>     and
>     InventoryItemBase
>      
>     Are not serializable because they encapsulate LLUUIDs.  This is
>     *bad* :D.  They cannot go over Grid Communications reliably.
>      
>     They all need to be changed to Guids, or we'll continue to have
>     spotty inventory.
>      
>      :D
>      
>     I'm mentioning this because it's a big problem..  
>      
>     I don't really know this portion of the code well..   so if I edit
>     it, it's likely to break..  hence the subject.
>      
>     Someone take this on please..   so I don't have to chop it up with
>     a chainsaw..    grind it down with a tree stump grinder, run it
>     over with a steam roller and jack-hammer it to itty bitty bite
>     sized serializable components that can reliably be transferred
>     over grid communications. :D
>      
>     Best Regards
>      
>     Tera
>     _______________________________________________
>     Opensim-dev mailing list
>     Opensim-dev at lists.berlios.de
>     https://lists.berlios.de/mailman/listinfo/opensim-dev
>
>
> ------------------------------------------------------------------------
> Sent from Yahoo! 
> <http://us.rd.yahoo.com/mailuk/taglines/isp/control/*http://us.rd.yahoo.com/evt=51949/*http://uk.docs.yahoo.com/mail/winter07.html> 
> - a smarter inbox.
> ------------------------------------------------------------------------
>
> _______________________________________________
> 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