Connectors/de

From OpenSimulator

(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
{{Quicklinks}}
+
{{Quicklinks|Connectors}}
 
<br />
 
<br />
 
==Überblick==
 
==Überblick==

Revision as of 10:05, 21 February 2023


Contents

Überblick

Es gibt bis zu 5 Komponenten in Verbindungs ​​Simulator Code an einem Raster-Service beteiligt.

Diese sind:

Component Location Description
Der Simulator Code selbst Open Kern oder ein Modul Dies verweist zunächst den Service zu erhalten oder Daten festgelegt.
Der Simulator service connector OpenSim/Region/CoreModules/ServiceConnectorsOut (für ausgehende Verbindungen) und ServiceConnectorsIn (für eingehende Verbindungen) Diese Anschlüsse Es gibt zwei Arten, lokal und remote. Die lokalen Anschlüsse direkt an den Service und verwendet werden, wenn Anrufer und Service im gleichen Prozess (wie in der Standalone-Konfiguration) sind. Die Remote-Anschlüsse verwenden, um die Service-Anschlüsse in OpenSim / Dienstleistungen / Connectors, um einen Anruf über das Netzwerk zu einem entfernten Prozess.
Der remote service connector OpenSim/Services/Connectors Diese machen die Arbeit der die Daten tatsächlich Rangier- und machen Sie den entsprechenden Anruf zu einem Remote-Datendienst. Diese sind nicht für die In-Prozess-Verbindungen verwendet.
Der remote service handler OpenSim/Server/Handlers Diese sind nicht für die In-Prozess-Verbindungen verwendet. Diese entpacken den Anruf von einem Simulator-Anschluss empfangen und geben sie nicht an den Dienst selbst.
Der Service Jeder Haupt Service hat sein eigenes Paket (e.g. OpenSim/Services/AssetService). Der Service-Leistungen tatsächlich den Anruf entgegen und gibt die Daten an den Anrufer, falls zutreffend.

Beispiel

Let's take a look at the asset service. The asset service connector is available as the Scene.AssetService property in the Scene object (direct references aren't always available - sometimes the connector has to be requested via the Scene.RequestModuleInterface<Interface>() mechanism).

A caller executes the method Scene.AssetService.Get() to retrieve an asset synchronously.

Suppose first of all that we're running a standalone configuration where both simulator and service are in the same process. In this case, the simulator's call goes to the LocalAssetServiceConnector.Get(). This first checks the cache, and if the asset isn't found there, then calls AssetService.Get(). The AssetService retrieves the asset from persistent storage and passes it back to the simulator code.

Now let's suppose that we're running in a grid configuration, where the asset service is operating on some other machine. As before, the simulator code calls Scene.AssetService.Get(). This time, the call is routed to RemoteAssetServiceConnector.Get(), which in this case inherits from OpenSim/Services/Connectors/AssetServiceConnector.

AssetServiceConnector.Get() generates an HTTP call to http://yourassetserver/assets/assetId, where assetId is the id of the asset requested.

This hops over the network and is handled by OpenSim/Server/Handlers/Asset/AssetServerConnector. It uses its own AssetServerGetHandler to unpack the HTTP request and call the AssetService to retrieve the data. If the asset is found, then it returns the asset as XML ready for the receiving AssetServiceConnector to unpack. If the asset is missing then it returns a 404 HTTP status code.

Konfiguration

Connectors are configured in OpenSimulator configuration files. For standalone, the configuration is in bin/config-include/Standalone.ini. Standalone users never need to change this file. For grid users, the configuration is in bin/config-include/Grid.ini and GridCommon.ini. In the grid case, GridCommon.ini (after copying from GridCommon.ini.example) is where the user specifies the URLs for each grid service.

Standalone

Let's look at Standalone.ini. You'll see that there is a Modules section with the lines

[Modules]
   AssetServices           = "LocalAssetServicesConnector"
   InventoryServices       = "LocalInventoryServicesConnector"
   NeighbourServices       = "LocalNeighbourServicesConnector"
   ...

This is where the connectors are specified for each service. As you can see, the asset service here is specified to use the LocalAssetServicesConnector.

Further down, you can see the section

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

This is where we tell OpenSimulator which DLL to load for the in-process asset service.

Grid

Compare this with Grid.ini.

[Modules]
   AssetServices     = "RemoteAssetServicesConnector"
   InventoryServices   = "RemoteXInventoryServicesConnector"
   GridServices      = "RemoteGridServicesConnector"
   ...

In this case, the asset service connector is specified as the RemoteAssetServicesConnector class.

The [AssetService] section isn't in this file because we don't load a service class directly (seeing as the service is hosted remotely). Rather, we need to specify the URL where the asset service is found. Since this will be different for various grid installations, it's in the user configurable GridCommon.ini file instead.

[AssetService]
   ...
   ;   
   ; change this to your grid-wide asset server
   ;   
   AssetServerURI = "http://myassetserver.com:8003"

Referenzen

For some more extensive but somewhat outdated documentation on services and connectors, please see OpenSim Services and Service Connectors

See Services for a summary of services.

Personal tools
General
About This Wiki