Direct Service Requests

= Introduction =

In the vast majority of cases, viewer requests are handled by the simulator which then interacts with backend services (asset, inventory, etc.) as appropriate.

However, in the default configuration some of these requests are handled by the viewer interacting with a backend service directly. For instance, on login, the login service passes the viewer a map URL as configured in the MapTileURL section of [LoginService] in Robust.ini. When the viewer requires tiles to display on the main map, it contacts this URL to fetch them. The URL itself is served by the ROBUST service on the public grid port (8002 by default).

There is also experimental scope to handle more requests directly. However, the only experimental example is one to handle GetTexture requests directly from a service rather than via a simulator.

= Direct GetTexture capability handling = GetTexture is a client-viewer protocol capability by which clients (viewers) can request textures via HTTP instead of the old UDP based mechanisms.

Normally, OpenSimulator handles this by providing a capability endpoint that resolves to the simulator occuped by the user's avatar. Requests are received by the simulator and the asset retrieved from cache or by a call to the backend asset service as appropriate.

However, we can also configure GetTexture to be handled directly by a service instead via the public grid port. The capability endpoint passed to the viewer then resolves directly to this service instead of the simulator, much like map tiles are provided directly by a service.

Configuration
The first thing to do is to configure the service to provide the GetTexture capability connector. We can do this with the config below.

WIP