OpenSimulator Internals/Package Overview
Package Overview
OpenSimulator's source tree is organized into a hierarchy of packages (C# projects). This page gives a top-level map. For detailed internals of individual classes, see the Code Map pages.
OpenSim
The top-level package launches the region server and manages the console.
- Entry point:
OpenSim/Region/Application/Application.cs—Main()
instantiates anOpenSimobject, callsStartup()(which spins up worker threads), then blocks the initial thread on the main console prompt.
OpenSim.Startup()is inherited from
OpenSim.Framework.Servers.BaseOpenSimServer; it delegates toStartupSpecific().
OpenSim.Addons
Components originally from the Diva distribution; organized differently from the main tree as a result.
- OpenSim.Addons.Groups — core group support.
- OpenSim.Addons.OfflineIM — core offline IM support.
OpenSim.ApplicationPlugins
Application plugins: modular code that affects the entire region server (as distinct from region modules, which affect individual regions).
OpenSim.Capabilities
Basic data structures for capability (HTTPS/event-queue) support.
OpenSim.ConsoleClient
REST console client for remote connection to a running OpenSimulator instance.
Not widely deployed; most operators use a screen session on Linux
or separate terminals on Windows.
OpenSim.Data
All low-level database access code. Contains per-backend packages:
- OpenSim.Data.MySQL — MySQL/MariaDB backend (primary for grid deployments).
- OpenSim.Data.SQLite — SQLite backend (common for standalone/testing).
- OpenSim.Data.MSSQL — Microsoft SQL Server backend (tends to lag behind the others).
Each backend implements the IAssetData and sibling interfaces defined here.
The interface hierarchy is: OpenSim.Data defines the interfaces;
per-DB packages provide the implementations.
See also: Useful Queries.
OpenSim.Framework
General framework code shared across the simulator and ROBUST. Not region-specific.
Subpackages of note:
| Subpackage | Purpose |
|---|---|
| OpenSim.Framework.AssetLoader.Filesystem | Loads library assets from the local filesystem. |
| OpenSim.Framework.Console | Console infrastructure. |
| OpenSim.Framework.Monitoring | Statistics gathering and monitoring. |
| OpenSim.Framework.RegionLoader.FileSystem | Loads region config from filesystem (e.g. bin/Regions/Regions.ini).
|
| OpenSim.Framework.RegionLoader.Web | Loads region config from a remote URL. |
| OpenSim.Framework.Serialization | OAR and IAR read/write infrastructure. |
| OpenSim.Framework.Servers | Generic server base classes, HTTP server infrastructure. |
Two subpackages handle configuration loading from HTTP and XML respectively; both may have decayed and are not considered current deployment paths.
OpenSim.Region
Most of the region-specific code lives here.
OpenSim.Region.ClientStack
Infrastructure for pluggable UDP client stacks. In practice only one stack exists (LLUDP); the abstraction remains in case alternatives are ever needed.
- OpenSim.Region.ClientStack.LindenCaps — HTTP/capability side of the Second Life
protocol. Glues cap requests to region modules.
- OpenSim.Region.ClientStack.LindenUDP — UDP side of the Second Life protocol.
Glues UDP packets to scene and region module code.
Future Code Map page: LLUDPServer (planned).
OpenSim.Region.CoreModules
The bundled region modules. This is a large package covering a wide range of functionality. Key modules documented in the Code Map:
- AttachmentsModule — avatar attachment lifecycle.
- EntityTransferModule — region crossings and teleports.
- HGEntityTransferModule — Hypergrid teleport handling.
- InventoryAccessModule — inventory access during rez/derez.
- AvatarFactoryModule — avatar appearance management.
OpenSim.Region.DataSnapshot
Generates an XML summary of region contents; can be exposed to external search engines.
OpenSim.Region.Framework
The core of the simulator: scene graph, ScenePresence, scene object classes, inventory structures, and the Scene itself.
OpenSim.Region.OptionalModules
Region modules not considered core; could in principle be removed while retaining a functional Second Life-compatible simulator.
OpenSim.Region.Physics
Physics framework and engine plugins: BulletSim, ubODE, ODE.
OpenSim.Region.ScriptEngine
Script engine infrastructure. Current engines: XEngine (older), YEngine (current).
OpenSim.Region.UserStatistics
Exposes simulator statistics via a web page.
OpenSim.Server
Server infrastructure shared between the region simulator and ROBUST.
- OpenSim.Server.Base — common server infrastructure.
- OpenSim.Server.Handlers — translates raw incoming HTTP requests to
service calls. Used primarily in grid mode for ROBUST instances.
Example: Asset/AssetServerGetHandler translates an asset fetch
request into a call to the asset service and returns the result.
OpenSim.Services
Service implementations and the connectors that invoke them remotely over HTTP.
- In grid mode: service implementations run inside ROBUST instances.
- In standalone mode: service implementations are instantiated directly
inside OpenSim.exe.
OpenSim.Services.Connectors contains the HTTP client code that
region simulators use to talk to remote ROBUST services.
See Connector Architecture for the full connector and service table.
OpenSim.Tests
Test infrastructure and some standalone client test code.
Actual regression tests live in *.Tests subpackages throughout
the tree (e.g. OpenSim.Region.Framework.Tests).
OpenSim.Tools
Utility tools associated with OpenSimulator but not used in normal operation.
See Also
- Code Map — per-class internals
- Connector Architecture — service/connector table
- Useful Queries — database reference
- Walkthroughs — runtime flow documentation