OpenSimulator Internals/Connector Architecture: Difference between revisions
Appearance
fixed revised architecture |
Configuration examples updated to RegionAssetConnector, and Asset Connector added to See Also. |
||
| Line 1: | Line 1: | ||
= OpenSimulator Internals/Connector Architecture = | = OpenSimulator Internals/Connector Architecture = | ||
| Line 30: | Line 31: | ||
== Configuration == | == Configuration == | ||
Note: In OpenSimulator 0.9.2, LocalAssetServiceConnector, RemoteAssetServiceConnector, and HGAssetBroker were replaced by a single module RegionAssetConnector. The examples below reflect the current architecture. | |||
=== Standalone === | === Standalone === | ||
| Line 36: | Line 39: | ||
[Modules] | [Modules] | ||
AssetServices = " | AssetServices = "RegionAssetConnector" | ||
[AssetService] | [AssetService] | ||
LocalGridAssetService = "OpenSim.Services.AssetService.dll:AssetService" | |||
=== Grid === | === Grid === | ||
Service runs remotely: | Service runs remotely on ROBUST: | ||
[Modules] | [Modules] | ||
AssetServices = " | AssetServices = "RegionAssetConnector" | ||
[AssetService] | [AssetService] | ||
LocalGridAssetService = "OpenSim.Services.AssetService.dll:AssetService" | |||
AssetServerURI = "http://myassetserver.com:8003" | AssetServerURI = "http://myassetserver.com:8003" | ||
| Line 54: | Line 58: | ||
== Example: Asset Get == | == Example: Asset Get == | ||
=== Standalone path === | === Standalone path === | ||
| Line 90: | Line 92: | ||
* [[OpenSimulator Internals/ROBUST Services]] | * [[OpenSimulator Internals/ROBUST Services]] | ||
* [[OpenSimulator Internals/Data Dictionaries]] | * [[OpenSimulator Internals/Data Dictionaries]] | ||
* [[OpenSimulator Internals/Asset Connector]] | |||
Revision as of 09:47, 22 June 2026
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
Note: In OpenSimulator 0.9.2, LocalAssetServiceConnector, RemoteAssetServiceConnector, and HGAssetBroker were replaced by a single module RegionAssetConnector. The examples below reflect the current architecture.
Standalone
Connectors and service in the same process:
[Modules] AssetServices = "RegionAssetConnector" [AssetService] LocalGridAssetService = "OpenSim.Services.AssetService.dll:AssetService"
Grid
Service runs remotely on ROBUST:
[Modules] AssetServices = "RegionAssetConnector" [AssetService] LocalGridAssetService = "OpenSim.Services.AssetService.dll:AssetService" AssetServerURI = "http://myassetserver.com:8003"
Example: Asset Get
Standalone path
- Simulator calls Scene.AssetService.Get()
- Routes to RegionAssetConnector.Get()
- Checks cache
- On miss, calls AssetService.Get() directly in-process
- AssetService retrieves from persistent storage
Grid path
- Simulator calls Scene.AssetService.Get()
- Routes to RegionAssetConnector.Get()
- Delegates to AssetServicesConnector (OpenSim/Services/Connectors)
- Makes HTTP GET to http://yourassetserver/assets/assetId
- Received by OpenSim/Server/Handlers/Asset/AssetServerConnector
- AssetServerGetHandler unpacks request, calls AssetService
- Returns asset as XML on success, 404 on miss
HyperGrid path
- Simulator calls Scene.AssetService.Get()
- Routes to RegionAssetConnector.Get()
- RegionAssetConnector determines if asset is local or foreign grid
- Foreign: instantiates GridAssetClient for the foreign grid
- Makes HTTP GET to foreign asset server
- Asset copied to local asset table on retrieval -- same UUID, no link back