Jump to content

OpenSimulator Internals/Data Dictionaries

From Open Simulator Technical Help

OpenSimulator Internals/Data Dictionaries

[edit]

ROBUST and region databases share the same database server instance as separate databases.

All tables verified against source code and MySQL migration files. Where the existing wiki disagrees with source, source takes priority. Discrepancies are noted.


assets

[edit]
Field Type Notesid-name-description-assetType-local-temporary-data-create_time-access_time-asset_flags-CreatorID-sha1}

Assets are immutable by design -- no updates, only inserts. No built-in garbage collection.

When an object is rezzed on a foreign HyperGrid grid, assets are copied to that grid's asset table -- same UUID, separate copy, no link between them, no cleanup on either end.

AssetFlags enum (asset_flags column)

[edit]
Value Name Notes0-1-2-4}

Asset type classification (computed, not stored)

[edit]

IsBinaryAsset: Animation, Gesture, Simstate, Unknown, Object, Sound, SoundWAV, Texture, TextureTGA, Folder, ImageJPEG, ImageTGA, Mesh, LSLBytecode IsTextualAsset: everything else ContainsReferences: textual assets excluding Notecard, CallingCard, LSLText, Landmark


InventoryService

[edit]

Unlike AssetService, the xinventory service is an RPC interface exposing a single URI (e.g. http://localhost:8003/xinventory). Different operations (add item, get item, etc.) are controlled via a METHOD parameter.

Inventory Item

[edit]
Field Type NotesID-Name-Description-AssetID-AssetType-InvType-Folder-Owner-CreatorId-CreatorData-CreationDate-BasePermissions-CurrentPermissions-NextPermissions-EveryOnePermissions-GroupPermissions-GroupID-GroupOwned-Flags-SalePrice-SaleType}

Inventory Folder

[edit]
Field Type NotesID-Name-Owner-ParentID-Type-Version}

Note: where multiple folders are returned, the folder element may have an underscore and index appended (e.g. folder_0). This is for historical reasons.


inventoryfolders

[edit]
Field Type NotesfolderID-agentID-parentFolderID-folderName-type-version}


inventoryitems

[edit]
Field Type NotesinventoryID-assetID-assetType-invType-inventoryName-inventoryDescription-creatorID-avatarID-parentFolderID-groupID-groupOwned-inventoryBasePermissions-inventoryCurrentPermissions-inventoryNextPermissions-inventoryEveryOnePermissions-inventoryGroupPermissions-salePrice-saleType-creationDate-flags}

Permissions live here, not in the asset table. The same underlying asset UUID can exist in multiple users' inventories with different permissions on each copy.


auth

[edit]
Field Type NotesUUID-passwordHash-passwordSalt-webLoginKey-accountType}


tokens

[edit]
Field Type NotesUUID-token-validity}

Confirmed unused per wiki.


regions

[edit]
Field Type Notesuuid-regionHandle-regionName-serverIP-serverPort-serverHttpPort-serverURI-locX-locY-locZ-sizeX-sizeY-ScopeID-owner_uuid-PrincipalID-Token-access-flags-last_seen-regionMapTexture-parcelMapTexture-originUUID-eastOverrideHandle-westOverrideHandle-southOverrideHandle-northOverrideHandle-regionRecvKey-regionSendKey-regionSecret-regionDataURI-regionAssetURI-regionAssetRecvKey-regionAssetSendKey-regionUserURI-regionUserRecvKey-regionUserSendKey-serverRemotingPort}


PresenceService

[edit]

RPC interface. Operations controlled via METHOD parameter.

getagents request

[edit]
Field Type Notesuuids[]-METHOD}

If no online users are found, an empty result is returned.


Presence

[edit]
Field Type NotesUserID-RegionID-SessionID-SecureSessionID-LastSeen}


UserAccountService

[edit]

Account fields

[edit]
Field Type NotesPrincipalID-FirstName-LastName-Email-ScopeID-Created-UserLevel-UserFlags-UserTitle-LocalToGrid-ServiceURLs}

Note: where multiple accounts are returned, the account element may have an underscore and index appended. Historical reasons.


UserAccounts

[edit]
Field Type NotesPrincipalID-ScopeID-FirstName-LastName-Email-ServiceURLs-Created-UserLevel-UserFlags-UserTitle-active}


GridUser

[edit]
Field Type NotesUserID-HomeRegionID-HomePosition-HomeLookAt-LastRegionID-LastPosition-LastLookAt-Online-Login-Logout}

Records are added on first login but never removed. Online status less accurate than Presence table. Service ignores users marked online for more than 5 days.


hg_traveling_data

[edit]
Field Type NotesSessionID-UserID-GridExternalName-ServiceToken-ClientIPAddress-MyIPAddress-TMStamp}

DeleteOld() called on UserAgentService startup -- one of the few places active cleanup occurs in the codebase.


Friends

[edit]
Field Type NotesPrincipalID-Friend-Flags-Offered}

TheirFlags is not stored -- computed at query time via self-join. Returns -1 if reverse friendship record does not exist (friendship not yet reciprocated).


Avatars

[edit]
Field Type NotesPrincipalID-Name-Value}

No fixed columns -- all appearance data stored as named key-value pairs. Each appearance attribute is a separate row. Schema is open-ended by design.

Ghost fields in API responses (OpenSimulator 0.7.4 and before): MAXVERSION, MINVERSION, METHOD, and UserID were accidentally serialized into responses and may appear in data from old servers. All can be ignored.

Known attribute names (Name column values)

[edit]
Name Value format NotesAvatarHeight-AvatarType-Serial-VisualParams-Wearable

:<n>}


GroupsService

[edit]

Core groups service is not enabled by default. The external XmlRpc/Flotsam groups service is the common alternative.

Field Type NotesGroupID-GroupName-Charter-FounderID-FounderUUI-InsigniaID-MembershipFee-OpenEnrollment-OwnerRoleID-AllowPublish-MaturePublish-ShownInList-ServiceLocation-MembershipCount-RoleCount}


os_groups_groups

[edit]
Field Type NotesGroupID-Name-Charter-Location-InsigniaID-FounderID-MembershipFee-OpenEnrollment-ShowInList-AllowPublish-MaturePublish-OwnerRoleID}


os_groups_membership

[edit]
Field Type NotesGroupID-PrincipalID-SelectedRoleID-Contribution-ListInProfile-AcceptNotices-AccessToken}


os_groups_roles

[edit]
Field Type NotesGroupID-RoleID-Name-Description-Title-Powers}

Default role power sets:


Everyone: AllowSetHome, Accountable, JoinChat, AllowVoiceChat, ReceiveNotices, StartProposal, VoteOnProposal Officers: Everyone powers plus land, object, and member management powers Owners: Officer powers plus CreateRole, DeleteRole, AssignMember, RemoveMember, GroupBanAccess, and others


os_groups_rolemembership

[edit]
Field Type NotesGroupID-RoleID-PrincipalID}

Junction table only. Links principals to roles within a group.


os_groups_invites

[edit]
Field Type NotesInviteID-GroupID-RoleID-PrincipalID-TMStamp}

A user can only have one pending invite per group at a time (GroupID+PrincipalID unique key).


os_groups_notices

[edit]
Field Type NotesNoticeID-GroupID-TMStamp-FromName-Subject-Message-HasAttachment-AttachmentType-AttachmentName-AttachmentItemID-AttachmentOwnerID}


os_groups_principals

[edit]
Field Type NotesPrincipalID-ActiveGroupID}

Originally from Diva Distro (diva_groups_* tables). Migrated to os_groups_* in version 2 of the migration file.


Filesystem Storage

[edit]

MapImageService

[edit]

Not stored in the database. All map tiles are JPEG files on the filesystem.

Config key: TilesStoragePath in [MapImageService] section. Defaults to maptiles/

Directory structure: maptiles/{scopeID}/

File naming: map-{zoomLevel}-{x}-{y}-objects.jpg

Zoom levels: 8 levels. Level 1 is full resolution (256x256 pixels). Levels 2-8 generated automatically by downsampling 4 adjacent tiles into 1.


Multi-resolution tile generation is queued and asynchronous. Waits 60 seconds after a tile arrives before building zoom levels. Missing tile returns a pre-cached water-coloured JPEG (RGB 29, 72, 96) rather than an error. All file I/O uses a single mutex. Thread safe but potentially a bottleneck on busy grids.


Simulator Services

[edit]

These are OpenSimulator internal services, not Second Life or viewer-facing services. Run per-simulator, not on ROBUST. All interfaces in OpenSim.Services.Interfaces.

Service DescriptionLand-Library-Simulation}


Simulator Database

[edit]

Run per-simulator. Not yet fully documented.

Table Descriptionland-landaccesslist-primitems-prims-primshapes-regionban-regionsettings-regionwindlight-terrain}

Estate Database

[edit]

Run per-simulator. Not yet fully documented.

Table Descriptionestate_groups-estate_managers-estate_map-estate_settings-estate_users-estateban}


See Also

[edit]

OpenSimulator Internals/ROBUST Services OpenSimulator Internals/GridService