OpenSimulator:Introduction and Definitions

From OpenSimulator

Jump to: navigation, search

Introduction to OpenSimulator

The OpenSim project is an extensible platform which can simulate virtual 3-dimensional spaces. These virtual spaces can allow for the dynamic creation, modification, deletion, and scripting of primitive objects -- some of which, when properly linked, instruct the 3D viewer application to render them in new ways.

As a demonstration of the power of this platform, it is coded in its default configuration to be somewhat compatible with the Second Life viewer application, released under GPL by Linden Lab.

Based on the original design of the Linden Lab network, there are five major services which need to be provided to any region that wants to talk to the OpenSim viewer. These services are known by the acronym UGAIM -- User, Grid, Asset, Inventory, Messaging.

UGAIM Services

Each of the servers plays a very specific -- and vital -- role in the OpenSim system.

UserServer: This is the server responsible for authenticating the user to the grid. What this means is that it is responsible for a very important task: it creates a session identifier for the client which can be used to authenticate requests to the other servers in the same grid, and associates that session identifier with a UUID. (This may involve a cryptographic authentication, OpenID authentication, or even the current Resident Name/Password authentication.)

GridServer: This is responsible for authenticating something else to the grid: the regions. Because the grid is 2-dimensional, and because there are X,Y coordinates that each region thus has, it is necessary to ensure that particular X,Y coordinates are assigned properly (whatever 'properly' means to the grid in question -- but OpenSim's current default is to do two-way authentication with the region servers, based on a dual shared-secret scheme (called "incoming password" and "outgoing password"). Each region is assigned a UUID.

AssetServer: This is essentially a WFRM database (write few, read many). Once an asset goes in, there are two things that you can say about it: One, it's got a UUID as a label... and two, it's in for life (although in future OpenSim development, unused assets may be detected and reaped). Sounds, textures, images, notecards, scripts, serialized inventory objects are added, and never modified again (they're "immutable"). If you decide that you need to change a graphic to be two pixels left of where it is for your virtual house's trim to look right, you have to upload a new asset, which gets a new UUID, and associate that new UUID with the texture. The old one stays there forever.

InventoryServer: That's all well and good, of course, but if it's all jumbled up into a key-value database like that, then what's the point? How could you keep anything straight? The UUID may be great for a computer, but it doesn't have anything to do with a human-readable label -- and how does it keep track of where I put it? That's the job of a much different database server -- one designed for a lot of little writes and a lot of little reads. This is the Inventory server. It works by -- you guessed it -- linking UUIDs together. The User has a UUID, which is used to get his InventoryRoot folder's UUID, and the InventoryRoot has a list of UUIDs that it links to, and each of those that are folders have lists of UUIDs, and those that aren't contain a link to a UUID, a type, and a descriptive name for the asset. The inventory server also retains permission information about items in inventory.

MessagingServer: This one came later, and it's not quite as essential as the first four. However, if you want the people using your simulator to be able to communicate with each other via anything other than the creation of sky-writing primitive letters, you need this. This keeps track of who's supposed to be able to listen to whoever else, keeps track of long-distance messages sent from one user to another (think 'SMS' for a real-world analogue), and keeps unread direct messages until they're read (also very much like SMS).

All of these servers are important, and because they're so important, they all share a specific property: There Can Be Only One (of each, known to any given region).


Oh yeah, the Region. The Region runs physics, runs scripts (though this may one day be moved off of the Region), keeps track of objects in the scene, keeps track of any observers connected, and sends scene updates to all of the observers. To it, everything it knows about is a UUID. Every last little thing -- a user connected is a UUID, an observer is a UUID, its terrain heightmap is a UUID, an asset is a UUID, a primitive is a UUID, the script running is a UUID... get the picture? It's a glorified data processor.

A Region is, not to put too fine a point on it, a memory space and behavior simulator which can share its state with observers. In short, it is a 3-dimensional MUD.

OpenSim has two modes of operation -- they're called "standalone mode" and "grid mode" (there is also an experimental Hypergrid intergrid mode). These modes are distinct only in where they get their UGAIM services from. In standalone mode, the region provides its own UGAIM service interfaces and these are run in a single process. In grid mode, each service is run in a separate process, and each process can in principle be run on a different machine.

In grid mode, the UGAIM servers are all run as centralized grid services. All of the users have to be known by all regions, for example, and also have to interact with the Grid itself (which is defined, somewhat arbitrarily, as a 2-dimensional map akin to township and range specification for real property). The region keeps a temporary cached copy of assets (currently set to 24 hours), but not a permanent local copy of its assets. Other entities such as users, messages, or inventory aren't peristently cached. In fact, region servers will opportunistically cache many things to reduce perceptual lag for the client.

See Also

Personal tools
About This Wiki