Jump to content

OpenSimulator Internals/Code Map/ROBUST

From Open Simulator Technical Help
Revision as of 10:08, 28 June 2026 by Jwbshaw (talk | contribs) (first)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

OpenSimulator Internals/Code Map/ROBUST

Overview

ROBUST is the grid services process. It reads configuration, starts HTTP listeners, loads service connector plugins, then sits waiting for incoming HTTP requests from simulators.


Entry Point

OpenSim/Server/Base/OpenSimServer.cs -- Main()

Sequence:

  1. Instantiates HttpServerBase ("R.O.B.U.S.T.", args)
  2. Config loaded in layers (see below)
  3. HTTP server(s) started
  4. Service connector plugins loaded from [ServiceList] in Robust.ini
  5. Main loop -- console prompt, watchdog, waits for shutdown

Config Loading

OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
OpenSim/Server/Base/ServicesServerBase.cs

Config is loaded in layers, each overriding the previous:

  1. Command line args parsed (-i ini file, -c console, -l logfile, -p prompt, -g logconfig)
  2. Ini file loaded -- defaults to Robust.ini, derived from executable name. Can be a local file or remote HTTP/HTTPS URL.
  3. Include-* keys scanned -- additional ini files merged in. Supports wildcards and URLs. Loop repeats until no new includes found.
  4. Environment variables merged in
  5. Command line args merged on top -- command line always wins
  6. Variable substitution run (ReplaceKeyValues) -- expands ${Section|Key} references
  7. ReadConfig() called -- reads [Network] section for port and SSL settings

[Network] minimum requirements:

  • port -- required, no default, ROBUST will not start without it
  • https_main, https_listener, https_external -- optional SSL flags
  • cert_path, cert_pass -- required if SSL enabled
  • ConsolePort -- optional remote console port

HTTP Servers

OpenSim/Framework/Servers/HttpServer/BaseHttpServer.cs
  • Main HTTP server created on port from [Network]
  • Optional second SSL listener if https_listener = true
  • All servers started before connectors are loaded -- handlers register into a running server

Service Connector Loading

OpenSim/Server/Base/ServicesServerBase.cs -- LoadPlugins()
OpenSim/Server/Base/ServerUtils.cs -- LoadPlugin()

Each entry in [ServiceList] in Robust.ini is loaded as a plugin:

AssetServiceConnector = "${Const|PrivatePort}/OpenSim.Server.Handlers.dll:AssetServiceConnector"

Format: Port/DllName:ClassName

LoadPlugin() uses .NET reflection to instantiate each connector class, passing IConfigSource and IHttpServer. Each connector registers its HTTP handlers on the running server during construction.

See OpenSimulator Internals/Connector Architecture for the full connector pattern.


Main Loop

OpenSim/Server/Base/ServicesServerBase.cs -- Run()
  • Watchdog and MemoryWatchdog threads enabled
  • Sits in a console prompt loop
  • Shutdown signal (quit/shutdown command or SIGTERM) triggers:
    • HTTP server shutdown
    • Watchdog disposal
    • Thread pool shutdown
    • PID file removal

Service Implementations

Each service connector loaded from [ServiceList] handles one service domain. See OpenSimulator Internals/ROBUST Services for the full list.

Service Implementation Handler
AssetService OpenSim/Services/AssetService/AssetService.cs OpenSim/Server/Handlers/Asset/
GridService OpenSim/Services/GridService/GridService.cs OpenSim/Server/Handlers/Grid/
UserAccountService OpenSim/Services/UserAccountService/UserAccountService.cs OpenSim/Server/Handlers/UserAccounts/
PresenceService OpenSim/Services/PresenceService/PresenceService.cs OpenSim/Server/Handlers/Presence/
InventoryService OpenSim/Services/InventoryService/XInventoryService.cs OpenSim/Server/Handlers/Inventory/
AuthenticationService OpenSim/Services/AuthenticationService/PasswordAuthenticationService.cs OpenSim/Server/Handlers/Authentication/
LoginService OpenSim/Services/LLLoginService/LLLoginService.cs OpenSim/Server/Handlers/Login/
GatekeeperService OpenSim/Services/HypergridService/GatekeeperService.cs OpenSim/Server/Handlers/Hypergrid/
UserAgentService OpenSim/Services/HypergridService/UserAgentService.cs OpenSim/Server/Handlers/Hypergrid/

See Also