Avatar portability version 2

From OpenSimulator

Revision as of 06:20, 22 July 2008 by Lulurun (Talk | contribs)

Jump to: navigation, search

User:Lulurun

Contents

Agenda

To enable user avatar travel from a grid service to another grid service, There are 3 problems to be considered:

  1. How to enable foreign user login - Authentication
  2. (If a foreign user can login)How to get a foreign user's belongings(including appearance, inventory)
    • This is discussed in this page
  3. AvatarPortability - Security

To achieve the 1st, client side changes are needed. SO, so far, I have only implemented 2nd, and would like to explan my idea:

Basic Idea

definition

  • User U1 resgitered at GridService G1
    • U1's inventory information is stored in InventoryServer I1
    • U1's assets are stored in AssetServer As1
    • U1's appearance information is served by AvatarService Av1
  • RegionServer R2 serves a sim at GridService G2
    • R2 fetches assets from Assetserver As2 by default.
    • R2 gets inventory information from InventoryServer I2 by default.

Avatar portability v2 1.PNG

avatar portability

AvatarPortability (or called "grid interoperability") is

  • U1 login to R2
    • U1's appearance at G1 can be seen from any other client which is connecting to R2.
    • U1 can CRUD(Create/Read/Update/Delete) its inventory/appearance through R2.

This means, (in the fig. 2) R2 should have the ability to connect not only its default UGAI server, but also external Inventory, Asset, Avatar service.

Avatar portability v2 2.PNG

Then "AvatarPortability" can be subdivided into 2 goals

  1. How to let R2 know where are U1's storage services(Inventory,Asset,Avatar,...)
  2. How to enable R2 to interact with mutilple Inventory/Asset/Avatar services

XRDS

more information can be found at:

A sample XRDS for U1 can be like:

 <?xml version="1.0" encoding="UTF-8"?>
 <xrds:XRDS xmlns:xrds="xri://$xrds" xmlns="xri://$xrd*($v*2.0)">
  <XRD>
    <Service priority="0">
      <Type>http://opensim.org/profileservice/1.0</Type>
      <URI>http://osgrid.org:8002/GetUserProfile/12345678-1234-1234-1234-12345678abcd</URI>
    </Service>
    <Service priority="0">
      <Type>http://opensim.org/authservice/1.0</Type>
      <URI>http://osgrid.org:8002/session/12345678-1234-1234-1234-12345678abcd</URI>
    </Service>
    <Service priority="0">
      <Type>http://opensim.org/assetservice/1.0</Type>
      <URI>http://osgrid.org:8003</URI>
    </Service>
    <Service priority="0">
      <Type>http://opensim.org/inventoryservice/1.0</Type>
      <URI>http://osgrid.org:8004</URI>
    </Service>
    <Service priority="0">
      <Type>http://opensim.org/avatarservice/1.0</Type>
      <URI>http://osgrid.org:8005</URI>
    </Service>
  </XRD>
 </xrds:XRDS>

REASONS for proposing XRDS

  1. There are "UserAssetUrl" and "UserInventoryUrl" in "Users" table, they are cab be used to specify users' storage services, but it's lack of scalability, to think we may have "friend service", "currency service", ... we can not simply add a column for each service.
  2. XRDS is widly used, many languages has libs for discovering/parsing it. To use XRDS can increase the compatibility with existing(web) service
  3. XRDS is just a proposal, still, we have many other choice.

ForeignAssetHashTable

implemetation

Avatar Portability

In "users" table, "UserInventoryURL" and "UserAssetURL" have been there for a long time, and they are not used yet. My idea starts from the 2 properties;

1 UserInventoryUrl UserAssetUrl

Avatar portability 1.PNG

  • U1 is an user of GridService G1, so probably, U1's "UserInventoryURL" and "UserAssetURL" are pointing to G1's default Inventory/Asset server.
  • R2 is a regionserver in GridService G2, so R2 fetches assets from G2's Asset server by default.

2 Fetch data from multiple Inventory/Asset Data

Avatar portability 2.PNG

  • U1 login to R2, If U1 want to also bring in its apearance, R2 should have the ability that can get U1's appearance from U1's "UserInventoryUrl" and get U1's assets(textures) from "UserAssetUrl".
  • So, in this case, because an asset request("RequestImagePacket") only sends asset UUID to R2, R2 has to determine which asset server provides the reuqested UUID.

3 ForeginAssetHashTable

Avatar portability 3.PNG

>R1 has to determine which asset server provides the reuqested UUID

  • At the right-bottom of this picture, "ForeginAssetHashTable" is used to solve this.
  • When an user login,
    1. region gets its "inventoryurl", "asseturl" from its "profile"
    2. region gets its appearance(UUIDs) from its "inventoryurl", and add the UUIDs into "ForeginAssetHashTable"
    3. Then when client send a "RequestImage(UUID)", RegionServer can look up into "ForeginAssetHashTable" to get the proper "AssetUrl"

Implementation

Authentication

not prepared yet

Avatar Portability

1 Implementation - ForeginAssetHashTable.Add

Avatar portability 4-1.PNG

2 Implementation - ForeginAssetHashTable.Get

Avatar portability 4-2.PNG

3 Implementation - ForeginAssetHashTable.Remove

Avatar portability 4-3.PNG

Personal tools
General
About This Wiki