[Opensim-dev] users and agents table, and other oddities?

Stefan Andersson stefan at tribalmedia.se
Tue Oct 16 09:57:44 UTC 2007


My vote is for TypeId, ie AgentId, UserId as this greatly simplifies code that juggles many ID fields on objects, and minimizes incidental bugs based on confusion. Since all 'ID' have the same type, one should discern one 'type of Id' from another.
 
ie the GroupId that is on Group, is the GroupId that is on Part.
 
/Stefan



> Date: Mon, 15 Oct 2007 15:54:58 -0400> From: sean at dague.net> To: opensim-dev at lists.berlios.de> Subject: Re: [Opensim-dev] users and agents table, and other oddities?> > On Sun, Oct 14, 2007 at 09:30:39AM +0200, Tleiades wrote:> > Hi> > > > I am a little mystified about the users table and the agents table.> > > > I am afraid this boils down to definitions of:> > > > What is a user?, What is an agent? and what is an avatar?, well mostly the > > difference between a user and an agent.> > > > In the SQLite implementation both tables are maintained, in the MySQL > > implementation, only the user table is maintained.> > Actually, the agents table is only maintained in memory, it is never> written back to disk. This is effectively the same behavior as the> mysql approach.> > > According to the defintions of user vs agent in UserProfileData.cs the UUID > > of UserAgentData is not the same as the UUID of UserProfileData, but if this > > is so, how do you relate an agent to a user? the SQLite implementation, > > violates the comment made in the cs code, and assigns the same value to both > > UUID of agents and users.> > > > <rant>> > who on earth, has decided that the datatype (UUID) is a propper name for a > > column in a database or a property on a class? UserID of type UUID, and > > AgentID of type UUID would be more fitting, or perhaps just ID of type UUID > > (depending on temperament)> > </rant>> > .ID is probably the best thing. What it is the idea for should be> evident based on the object it is attached to.> > > > > > So I guess my primary question regarding agents and users is?> > What is the difference? and do we need to distinguish between the two?> > > > now on to regions..> > First some definitions.> > a regionhandle, identifies a region based on it's x,y position in the grid, > > which is combined into one integer value.> > a regionid, identifies a region based on a UUID.> > > > Regions have the regionid as the primary key, in both SQLite and MySQL. In > > the agents table we store both the handle and the id , in the users table we > > store the handle but not the id.> > IMHO, We should stop storing handle, and should construct it when we> need it (as it is 100% computable from region location). Having> multiple things that behave like keys in the objects continues to ask> for trouble.> > > This gives rise to the question.. "Is the users home" tied to the handle or > > the id. What is really the primary id of a region, the handle or the> > id?> > My vote is for ID.> > -Sean> > -- > __________________________________________________________________> > Sean Dague Mid-Hudson Valley> sean at dague dot net Linux Users Group> http://dague.net http://mhvlug.org> > There is no silver bullet. Plus, werewolves make better neighbors> than zombies, and they tend to keep the vampire population down.> __________________________________________________________________> _______________________________________________> Opensim-dev mailing list> Opensim-dev at lists.berlios.de> https://lists.berlios.de/mailman/listinfo/opensim-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20071016/0f6a0e71/attachment-0001.html>


More information about the Opensim-dev mailing list