table of contents
Tirex::Source::ModTile(3pm) | User Contributed Perl Documentation | Tirex::Source::ModTile(3pm) |
NAME¶
Tirex::Source::ModTile -- mod_tile a a source of job requests
SYNOPSIS¶
my $source = &Tirex::Source::ModTile->new(); $source->notify();
DESCRIPTION¶
Source using Tirex messages sent through mod_tile (Unix domain socket)
METHODS¶
Tirex::Source::ModTile->new()¶
Create source object for Unix domain socket connection.
$source->readable($sock)¶
Indicates to this source that the given socket is readable, and has data for this source.
The source will return STATUS_CONTINUE if it expects to continue reading, or STATUS_MESSAGE_COMPLETE if reading is complete. STATUS_SOCKET_CLOSED indicates that the peer has closed the connection.
$source->make_job($sock)¶
Returns a new Tirex::Job object created from the data read by this source. Also decides whether or not this source would like to be notified of job completion, and if yes, flags the job accordingly.
These are the priority levels used in the Apache mod_tile and how they are translated in Tirex. (Note that in mod_tile the numbers do not imply higher or lower priority.)
cmdRender (1 in mod_tile, 2 in Tirex)
This priority is used by mod_tile if a "very old" tile is requested. The configuration option ModTileVeryOldThreshold controls what counts as "very old". Unless the system load is higher than ModTileMaxLoadOld, a render request is triggered and mod_tile waits for up to ModTileRequestTimeout seconds. If a tile is not produced within that time, the old tile is returned.
cmdDirty (2 in mod_tile, 10 in Tirex)
This priority is used by mod_tile if
- the /dirty URL is manually called for a tile
- an "old" or "very old" tile is requested but the load is too high to render it right away (the old tile will be delivered instead)
- a "missing" tile is requested but the load is too high to render it right away (a 404 error will be issued)
cmdRenderPrio (5 in mod_tile, 1 in Tirex)
This priority is used by mod_tile if a "missing" tile is requested. Unless the system load is higher than ModTileMaxLoadMissing, a render request is triggered and mod_tile waits for up to ModTileMissingRequestTimeout seconds. If a tile is not produced within that time, a 404 error will be issued.
cmdRenderBulk (6 in mod_tile, 20 in Tirex)
Used for all "missing tile" render requests triggered by mod_tile if "ModTileBulkMode On" is set in the Apache configuration. In this mode, requests for old tiles are never issued. Never used if "ModTileBulkMode Off" (the default).
cmdRenderLow (7 in mod_tile, 25 in Tirex)
This priority is used by mod_tile if an "old" tile is requested. An "old" tile is one that is older than three days or, if a planet_import_complete file is present, older than this file. Unless the system load is higher than ModTileMaxLoadOld, a render request is triggered and mod_tile waits for up to ModTileRequestTimeout seconds. If a tile is not produced within that time, the old tile is returned.
$source->set_request_write_callback(\&wcb}¶
Specifies a function to be called if this source ever wants to receive writable events.
$source->notify($job)¶
Prepares a notification message about successful tile rendering and informs the main select loop to give us a chance to write.
$source->writable($sock)¶
Indicates to this source that the given socket is writable.
The source will attempt to send the prepared notification message, and return STATUS_MESSAGE_COMPLETE if the message has been fully sent. It will return STATUS_CONTINUE if sending needs to continue later. A return value of STATUS_SOCKET_CLOSED indicates that the peer has closed the connection.
2023-04-11 | perl v5.36.0 |