[Opensim-dev] Question on Avatar Appearance persistance

Sean Dague sean at dague.net
Sat Apr 12 12:00:22 UTC 2008


On Fri, Apr 11, 2008 at 06:09:56PM +0100, Michael Wright wrote:
> okay will try to make this my last email (before anyone replies) on this. But I think I'm understanding more of what you meant. 
> 
> And while I think there is no reason why we couldn't have
> AvatarAppearance hanging off UserProfile data. I'm still not convinced
> there is a need to try to connect all these things. Avatar Appearance
> is certainly a scene thing. In that every ScenePresence needs a
> reference to one. But we could move the actual Av atar Appearance
> class out to OpenSim.framework, or if going with the "Anemic Domain
> Model" appoach suggested by Stefan then we could have a base
> AvatarAppearance in the model project. Then in the avatar appearance
> module fetch the appearance object that was attached to the user
> profile.
> 
> But I'm not sure I really see any benefit in this over the module
> doing a direct request to the user server for the appearance. I
> actually think its better to decouple things in this way.

By decoupling from the user server, we've coupled AppearanceModule to
DataMapper, and are managing database connections in a RegionModule,
which I think is a worse approach.  

m_scene.CommsManager.UserService.GetUserProfile(id) seems
like a much better approach.  We could just add .GetUserAppearance and
friends to it.

> As I said in my last email, there could also be some bots/NPC's that
> don't have userprofiles. And also I think there is a chance that scene
> presences are created (and the appearance fetched) before the user
> profiles are. But can't be sure of that without looking deeper in the
> code.

If an NPC exists in the environment, I would think it would have a
profile (it needs that for Name for instance).

> But anyway as long as we went through the avatar appearance factory
> module concept to fetch the appearance that was attached to the user
> profile. Then I guess there is nothing stopping it. Just seems a
> coupling that isn't needed.

Yes, that's probably strictly true.  Actually, we don't really need it
hanging off of UserProfile.  What I really meant was that
AvatarAppearance was an object that existed, and was fetchable/updatable
from the UserService by UUID.

> I am very strongly of the opinion that we need to keep the factory
> module concept. So that a different module could be used. Different
> regions/applications might want a completely different approach to how
> the appearance of the avatars are handled. Like a game might want to
> randomly just give each user one of a set of preset avatars.
> 
> But with this factory module. We can actually fetch the appearance
> from where ever we want, including the userprofile if it is decided.

If we move the default storage back into UserService, I don't think
we'll have an issue here.  UserService will just support a persistance
model for appearance, should anyone want to use that.  How appearance is
created remains in the region modules.

    -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.
__________________________________________________________________
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
URL: <http://opensimulator.org/pipermail/opensim-dev/attachments/20080412/394c4b61/attachment-0001.pgp>


More information about the Opensim-dev mailing list