User:Lulurun

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 4: Line 4:
 
== proposal to subdivide the assets table ==
 
== proposal to subdivide the assets table ==
  
my proposal is to subdivide asset table into 2 tables:
+
=== Main idea ===
user_asset : for user owned assets (mainly in inventory, appearance, attachment, ...)
+
My proposal is to subdivide asset table into 2 tables:
  user_asset is used by UGAI servers
+
* user_asset
region_asset: for region owned assets, sounds, textures(including sun, moon, ...)
+
** used by UGAI servers
  region_asset is used by region servers
+
** for user owned assets
 +
*** objects in inventory
 +
*** appearance
 +
*** attachment, ...
 +
* region_asset
 +
** used by region servers
 +
** for region owned assets
 +
*** background sounds
 +
*** textures on prims
 +
*** sun, moon, ...
 +
*** terrain maptile
  
Advantages (major points first):
+
=== Advantages ===
0. increase the dispersity of asset data, clarify the responsibility of each server
+
Major points first.
Currently, all of the asset data is stored in assets table, managed by assetserver.
+
This would cause some problems:
+
1. assets table keeps growing in a fast pace.
+
2. hard to determine which asset is belongs to inactive regions (when you want to "clean"
+
the assets table).
+
3. assetserver not only serves users' data but also regions' data, if something happened to
+
assetserver both of avatar and prims will become gray.
+
To seperate asset tables can not only solve these problems, but also brings minor benefits
+
such like: reduce the responsibility of assetserver, disperse the asset requests(especially
+
for big grid service), lower the risk of losing data, ...
+
  
1. for Data Portability in virtual world
+
1. increase the dispersity of asset data, clarify the responsibility of each server.
For grid admin,
+
:* Currently, all of the asset data is stored in assets table, managed by assetserver.<br>This would cause some problems:
* you can concentrate on managing only user(not region owner) relavent information
+
::# assets table keeps growing in a fast pace.
  like "users, avatarappearance, inventory"
+
::# hard to determine which asset is belongs to inactive regions (when you want to "clean" the assets  table).
* it can reduce the vulnerability caused by foreign assets.
+
::# assetserver not only serves users' data but also regions' data, if something happened to assetserver both of avatar and prims will become gray.
* no complains about "no texture on prims" any more.
+
* when a region leaves your grid, you don't have to worry about its assets becoming garbage.
+
:* To separate assets table can not only solve these problems, but also brings minor benefits<br>such like:
- on the other hand, this also good for region owners.
+
::* reduce the responsibility of assetserver
For when a user registers their region server with a grid,
+
::* disperse the asset requests(especially for big grid service)
* When you want to switch your sim to a new grid, "prims, primshapes, terrain, region_asset"
+
::* lower the risk of losing data, ...
  are always tied-up together. the only thing you need to do is to edit UGAI servers URI in
+
  your OpenSim.ini
+
2. for Data Portability in virtual world
For standalone-mode user - probably creators,
+
:* For grid admin,
* Avatars and buildings are saved separatly, export/import objects will become more simple.
+
::* you can concentrate on managing only user(not region owner) relevant information like "users, avatarappearance, inventory"
  Or you can provide the DB file directly.
+
::* it can reduce the vulnerability caused by foreign assets.
 +
::* no complains about "no texture on prims" any more.
 +
::* when a region leaves your grid, you don't have to worry about its assets becoming garbage.
 +
:::*on the other hand, this also good for region owners.
 +
:* For when a user registers their region server with a grid,
 +
::* When you want to switch your sim to a new grid, "prims, primshapes, terrain, region_asset" are always tied-up together. the only thing you need to do is to edit UGAI servers URI in your OpenSim.ini
 +
:* For standalone-mode user - probably creators,
 +
::* Avatars and buildings are saved separatly, export/import objects will become more simple. Or you can provide the DB file directly.
  
2. make grid-mode more flexible
+
3. make grid-mode more flexible
Here are some pictures, they are showing some pattern after the subdividing:
+
:*Here are some pictures, they are showing some configuration patterns after the subdividing:
http://openugai.sourceforge.net/?page=assets_subdividing
+
http://openugai.sourceforge.net/?page=assets_subdividing
  
3. reduce the posibility of assetid conflict by reducing the scope of assetid.
+
4. reduce the possibility of assetid conflict by reducing the scope of assetid.
  
To achieve this, regionserver should not fetch assets from only one assetserver, So,
+
=== Implementation ===
One of the main changes we have to do is in "GridAssetCient.cs":
+
*Things need '''not''' to be changed:
L50: protected override AssetBase GetAsset(AssetRequest req)
+
:* The fields of "assets" table need not to be changed (at least for the subdividing).
to
+
:* Current implementation of AssetServer need not to be changed.
protected override AssetBase GetAsset(AssetRequest req, string asset_url)
+
  
L79: protected override AssetBase StoreAsset(AssetRequest req)
+
*Things need to add:
to
+
:* Add new table "RegionAssets".
protected override AssetBase StoreAsset(AssetRequest req, string asset_url)
+
:* Add DB access support for the new table under OpenSim.Data.*
 +
:* Add '''RegionAssetService'''
 +
::* including a '''RegionAssetLoader''' which reads assets/AssetSet.xml stores asset data to RegionAsset table
 +
::* '''LocalRegionAssetService''' (directly select from RegionAssets table)
 +
::* This is the pattern 1 at http://openugai.sourceforge.net/?page=assets_subdividing
 +
:* '''RemoteRegionAssetService'''
 +
::* This is the pattern 2-4 at http://openugai.sourceforge.net/?page=assets_subdividing
 +
:* Of course to use which kind of service should be able to config in "OpenSim.ini".
  
 +
* Things need to be changed
 +
:*regionserver should not fetch assets from only one assetserver, So, One of the major changes we have to do is:
 +
in "GridAssetCient.cs"
 +
L50: protected override AssetBase GetAsset(AssetRequest req)
 +
to
 +
protected override AssetBase GetAsset(AssetRequest req, string asset_url)
 +
 +
L79: protected override AssetBase StoreAsset(AssetRequest req)
 +
to
 +
protected override AssetBase StoreAsset(AssetRequest req, string asset_url)
  
what do you think ?
+
=== Migration From Existing System ===
 +
 
 +
 
 +
 
 +
== what do you think ? ==

Revision as of 23:59, 25 June 2008

Contents

another project

openugai

proposal to subdivide the assets table

Main idea

My proposal is to subdivide asset table into 2 tables:

  • user_asset
    • used by UGAI servers
    • for user owned assets
      • objects in inventory
      • appearance
      • attachment, ...
  • region_asset
    • used by region servers
    • for region owned assets
      • background sounds
      • textures on prims
      • sun, moon, ...
      • terrain maptile

Advantages

Major points first.

1. increase the dispersity of asset data, clarify the responsibility of each server.

  • Currently, all of the asset data is stored in assets table, managed by assetserver.
    This would cause some problems:
  1. assets table keeps growing in a fast pace.
  2. hard to determine which asset is belongs to inactive regions (when you want to "clean" the assets table).
  3. assetserver not only serves users' data but also regions' data, if something happened to assetserver both of avatar and prims will become gray.
  • To separate assets table can not only solve these problems, but also brings minor benefits
    such like:
  • reduce the responsibility of assetserver
  • disperse the asset requests(especially for big grid service)
  • lower the risk of losing data, ...

2. for Data Portability in virtual world

  • For grid admin,
  • you can concentrate on managing only user(not region owner) relevant information like "users, avatarappearance, inventory"
  • it can reduce the vulnerability caused by foreign assets.
  • no complains about "no texture on prims" any more.
  • when a region leaves your grid, you don't have to worry about its assets becoming garbage.
  • on the other hand, this also good for region owners.
  • For when a user registers their region server with a grid,
  • When you want to switch your sim to a new grid, "prims, primshapes, terrain, region_asset" are always tied-up together. the only thing you need to do is to edit UGAI servers URI in your OpenSim.ini
  • For standalone-mode user - probably creators,
  • Avatars and buildings are saved separatly, export/import objects will become more simple. Or you can provide the DB file directly.

3. make grid-mode more flexible

  • Here are some pictures, they are showing some configuration patterns after the subdividing:
http://openugai.sourceforge.net/?page=assets_subdividing

4. reduce the possibility of assetid conflict by reducing the scope of assetid.

Implementation

  • Things need not to be changed:
  • The fields of "assets" table need not to be changed (at least for the subdividing).
  • Current implementation of AssetServer need not to be changed.
  • Things need to add:
  • Add new table "RegionAssets".
  • Add DB access support for the new table under OpenSim.Data.*
  • Add RegionAssetService
  • RemoteRegionAssetService
  • Of course to use which kind of service should be able to config in "OpenSim.ini".
  • Things need to be changed
  • regionserver should not fetch assets from only one assetserver, So, One of the major changes we have to do is:
in "GridAssetCient.cs"
L50: protected override AssetBase GetAsset(AssetRequest req)
to
protected override AssetBase GetAsset(AssetRequest req, string asset_url)

L79: protected override AssetBase StoreAsset(AssetRequest req)
to
protected override AssetBase StoreAsset(AssetRequest req, string asset_url)

Migration From Existing System

what do you think ?

Personal tools
General
About This Wiki