Jump to content

OpenSimulator Internals/Package Overview: Difference between revisions

From Open Simulator Technical Help
Jwbshaw (talk | contribs)
mNo edit summary
Jwbshaw (talk | contribs)
m quibbles
Line 54: Line 54:
* '''OpenSim.Data.MySQL''' — MySQL/MariaDB backend (primary for grid deployments).
* '''OpenSim.Data.MySQL''' — MySQL/MariaDB backend (primary for grid deployments).
* '''OpenSim.Data.SQLite''' — SQLite backend (common for standalone/testing).
* '''OpenSim.Data.SQLite''' — SQLite backend (common for standalone/testing).
* '''OpenSim.Data.MSSQL''' — Microsoft SQL Server backend. Perpetually behind; use MySQL/MariaDB or SQLite.


Each backend implements the <code>IAssetData</code> and sibling interfaces defined here.
Each backend implements the <code>IAssetData</code> and sibling interfaces defined here.
Line 88: Line 87:


Two subpackages handle configuration loading from HTTP and XML respectively;
Two subpackages handle configuration loading from HTTP and XML respectively;
both may have decayed and are not considered current deployment paths.
neither is a current deployment path.


== OpenSim.Region ==
== OpenSim.Region ==

Revision as of 20:58, 8 July 2026

  1. Draft: OpenSimulator Internals/Package Overview

Target URL: http://osimdev.org/wiki/index.php/OpenSimulator_Internals/Package_Overview

---

    1. Wiki markup

```mediawiki

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.csMain()
 instantiates an OpenSim object, calls Startup() (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 to
 StartupSpecific().

OpenSim.Addons

Note: not actively maintained. Use with caution.

  • OpenSim.Addons.Groups — group support.
  • OpenSim.Addons.OfflineIM — 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).

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; neither is a current deployment path.

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:

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

```