Jump to content

OpenSimulator Internals/Connector Architecture

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

OpenSimulator Internals/Connector Architecture

Overview

The connector handles network calls transparently. Calling code does not need to know whether the service is local (standalone) or remote (grid mode) -- the connector abstracts that distinction.

In standalone mode the connector calls the service directly in-process. In grid mode it makes an HTTP call to ROBUST. Same interface either way.


The Five Components

Up to five components are involved in connecting simulator code to a grid service.

Component Location Description
Simulator code OpenSimulator core or a module Makes the initial service call to get or set data.
Simulator service connector OpenSim/Region/CoreModules/ServiceConnectorsOut (outbound), ServiceConnectorsIn (inbound) Two flavours: local (same process, standalone -- calls service directly) and remote (grid mode -- delegates to remote service connector for network call).
Remote service connector OpenSim/Services/Connectors Marshals data and makes the network call to the remote service. Not used for in-process connections.
Remote service handler OpenSim/Server/Handlers Unpacks the incoming network call and passes it to the service. Not used for in-process connections.
The service OpenSim/Services/[ServiceName] (e.g. OpenSim/Services/AssetService) Actually services the call and returns data.

Configuration

Standalone

Connectors and service in the same process:

[Modules]
AssetServices = "LocalAssetServicesConnector"

[AssetService]
LocalServiceModule = "OpenSim.Services.AssetService.dll:AssetService"

Grid

Service runs remotely:

[Modules]
AssetServices = "RemoteAssetServicesConnector"

[AssetService]
AssetServerURI = "http://myassetserver.com:8003"

Example: Asset Get

Standalone path

  1. Simulator calls Scene.AssetService.Get()
  2. Routes to LocalAssetServiceConnector.Get()
  3. Checks cache
  4. On miss, calls AssetService.Get()
  5. AssetService retrieves from persistent storage

Grid path

  1. Simulator calls Scene.AssetService.Get()
  2. Routes to RemoteAssetServiceConnector.Get()
  3. Inherits from OpenSim/Services/Connectors/AssetServiceConnector
  4. Makes HTTP GET to http://yourassetserver/assets/assetId
  5. Received by OpenSim/Server/Handlers/Asset/AssetServerConnector
  6. AssetServerGetHandler unpacks request, calls AssetService
  7. Returns asset as XML on success, 404 on miss

See Also