Tirex:...odTile(3pm)
π Tirex::Source::ModTile β the manual page, but make it serve π
okay bestie, this is Tirex::Source::ModTile, a Perl module living in section 3pm of the User Contributed Perl Documentation. it's the little glow-up that lets mod_tile be a source of job requests. πΈ
β¨ NAME β¨
Tirex::Source::ModTile β mod_tile as a source of job requests, fr fr. π
π SYNOPSIS π
my $source = &Tirex::Source::ModTile->new();
$source->notify();
look at that. immaculate. no notes. β¨
π¦ DESCRIPTION π¦
this source lowkey eats: it uses Tirex messages sent through mod_tile, over a Unix domain socket. that's the whole vibe. π
π METHODS π
Tirex::Source::ModTile->new()
creates the source object for the Unix domain socket connection. it's giving new beginnings. π«Ά
$source->readable($sock)
tells this source that the socket you passed in is readable and actually has data for it. main character data. π₯
what it gives back:
STATUS_CONTINUEβ it expects to keep reading, hold on bestieSTATUS_MESSAGE_COMPLETEβ reading is done, periodt βSTATUS_SOCKET_CLOSEDβ the peer closed the connection π
$source->make_job($sock)
returns a brand new Tirex::Job object built from the data this source read. it also decides whether this source wants to be notified when the job finishes, and if yes, it flags the job accordingly. multitasking icon. π
these are the priority levels used in the Apache mod_tile and how they get translated in Tirex. β οΈ important note: in mod_tile the numbers do not imply higher or lower priority. don't read into them, they're just numbers.
cmdRender (1 in mod_tile, 2 in Tirex)
this priority is what mod_tile uses when a "very old" tile is requested. the config option ModTileVeryOldThreshold controls what counts as "very old". unless the system load is higher than ModTileMaxLoadOld, a render request gets triggered and mod_tile waits for up to ModTileRequestTimeout seconds. if no tile is produced in that time, the old tile is returned. no thoughts, just the old tile. π
cmdDirty (2 in mod_tile, 10 in Tirex)
this priority is what mod_tile uses when:
- the
/dirtyURL 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
404error will be issued)
cmdRenderPrio (5 in mod_tile, 1 in Tirex)
this priority is used by mod_tile when 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 isn't 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 when "ModTileBulkMode On" is set in the Apache configuration. in this mode, requests for old tiles are never issued. it is never used if "ModTileBulkMode Off" β which is the default, btw. π₯
cmdRenderLow (7 in mod_tile, 25 in Tirex)
this priority is used by mod_tile when an "old" tile is requested. an "old" tile is one that's 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 gets triggered and mod_tile waits for up to ModTileRequestTimeout seconds. if no tile is 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. (yes the brace situation in there is exactly as written, i'm not touching it, that's the original's business, not mine π«Ά)
$source->notify($job)
preps a notification message about successful tile rendering, and tells the main select loop to give us a chance to write. teamwork, baby. π
$source->writable($sock)
tells this source that the socket you passed in is writable. π€
then it attempts to send the prepared notification message and returns:
STATUS_MESSAGE_COMPLETEβ if the message has been fully sent πSTATUS_CONTINUEβ if sending needs to continue later β³STATUS_SOCKET_CLOSEDβ if the peer has closed the connection π
and that's the whole page, bestie!! tysm for reading, i'm obsessed with you for real. this was perl v5.40.1, dated 2026-08-09, brought to you by the User Contributed Perl Documentation gang. slay, no cap, go write some flawless Perl. πβ¨ππ¦πΈπ π«Άπ
π¦ where this page comes from
- ubuntu stonking: tirex 0.8.0+ds-2build3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms