1
Programmers corner / Template/events for QOS or traffic shaping.
« on: March 23, 2021, 05:57:47 AM »
This won't be complete because full equal-opposite metrics/status/measures aren't provisioned.
But, this is what I've 'cooked-up' so far:
{.if|{.{.calc|%number-addresses-downloading%*%speed-out% .}> 7500.}|{: busy :}|{: archive :}.}
can also be used for style display none or style display initial (to hide/show buttons)
or
{.if|{.{.calc|%number-addresses-downloading%*%speed-out% .} < 7500.}|{:
archive script
upload script
:}.}
If reasonable load, do script (else omit)
or
soft version {.if|{.%connections% > 39.}|{: busy excuse + javascript recheck timer :}|{: do file list :}.}
connection count management without high cpu load cost
hard version {.if|{.%connections% > 49.}|{:{.redirect|/~busyexcuse.}:}.}
new [busyexcuse|public] section is page for javascript recheck timer wait seconds, if less than x connections then back..
connection count management without high cpu load cost + connection desist (disconnect/redirect) kills downloader/scanner.
P.S.
Multi-user scalable: These above examples run condition detect on the server but the stalling waiting part runs on the Client cpu.
To make stronger logic, the scope was purposefully confined to doable. Just sayin' that hard road North got 2 more signposts, like Snacks > and < Else.
But, this is what I've 'cooked-up' so far:
{.if|{.{.calc|%number-addresses-downloading%*%speed-out% .}> 7500.}|{: busy :}|{: archive :}.}
can also be used for style display none or style display initial (to hide/show buttons)
or
{.if|{.{.calc|%number-addresses-downloading%*%speed-out% .} < 7500.}|{:
archive script
upload script
:}.}
If reasonable load, do script (else omit)
or
soft version {.if|{.%connections% > 39.}|{: busy excuse + javascript recheck timer :}|{: do file list :}.}
connection count management without high cpu load cost
hard version {.if|{.%connections% > 49.}|{:{.redirect|/~busyexcuse.}:}.}
new [busyexcuse|public] section is page for javascript recheck timer wait seconds, if less than x connections then back..
connection count management without high cpu load cost + connection desist (disconnect/redirect) kills downloader/scanner.
P.S.
Multi-user scalable: These above examples run condition detect on the server but the stalling waiting part runs on the Client cpu.
To make stronger logic, the scope was purposefully confined to doable. Just sayin' that hard road North got 2 more signposts, like Snacks > and < Else.