Re: Announcing new external_acl helper: delayer

From: Amos Jeffries <squid3_at_treenet.co.nz>
Date: Sun, 11 May 2014 21:44:46 +1200

On 11/05/2014 9:17 a.m., Kinkie wrote:
> On Fri, May 9, 2014 at 3:35 PM, Amos Jeffries <squid3_at_treenet.co.nz> wrote:
>> On 5/09/2013 6:23 a.m., Kinkie wrote:
>>> Hi all,
>>> I've developed a new external_acl helper. Its purpose is to add an
>>> artificial delay to requests flowing through squid. It is orthogonal
>>> to delay pools, the delay is added BEFORE serving the request (which
>>> can then be throttled by delay pools or not).
>>> It uses the multi-slot helper API - it is actually meant to be an
>>> example on how to write a multi-slot helper.
>>>
>>> It's available at lp:~kinkie/squid/delayer
>>> (http://bazaar.launchpad.net/~kinkie/squid/delayer/files)
>>>
>>> If you can find the time to check it out, I'll then prepare an
>>> announcement for squid-users and a wiki page for it.
>>>
>>> Thanks
>>>
>>
>> (following up on IRC request to merge this helper).
>>
>> We are now getting a few squid-users queries about how to prevent fast
>> authentication loops, delaying only MISS's etc so there is some need out
>> there for this helper.
>>
>> Quick audit of the helper find:
>>
>> * Please embed the documentation in pod2man style instead of using
>> standalone README file and internal # comments.
>> You can find examples of this in most of the existing bundled helpers.
>> for example helpers/basic_auth/DB/basic_db_auth.pl.in
>>
>> * Please remove the old squid copyright. Claim for yourself in the
>> pod2man position at end of file for bundled perl helpers please.
>>
>> Have not reviewed the perl code at this point.
>
> Hi,
> both done.
>

More audit:

* s/external auth helper/external acl helper/

* for command line options please support and prefer long names.
--debug, --delay, --log etc

* I am trying to make the short -d option mean debug and -v mean
verbosity level across all helpers.
  - A simple helper like this does not really need levels of verbosity.
Can you please change -v to -d|--debug and pick a different short name
for the delay period? -w|--wait might be appropriate.

* "gets as input the input received by squid AS RECEIVED FROM SQUID"
makes little sense still.
 - Perhapse "gets the full line received from Squid"
 - Please also use '.' and capitals where appropriate to make it clearly
a paragraph.

(sorry perhapse I should have reminded you earlier of this:
http://wiki.squid-cache.org/ProgrammingGuide/ManualDocumentation)

* SYNOPSIS should only contain the one-liner command-line grammar(s),
may contain multiple one-liners if there are different modes of
opearation. The detail explanations of each switch should be in OPTIONS.

* the squid.conf documentation, paragraphs 2-4, currently in DESCRIPTION
should be titled CONFIGURATION.

* README is now obsolete, it needs to go.

* the $mydoc thing should probably go down below the boilerplate in the
code area.
 - is there any way we can make -h extract the pod2man details for
displaying as help text without duplicating?

Amos
Received on Sun May 11 2014 - 09:45:09 MDT

This archive was generated by hypermail 2.2.0 : Sun May 11 2014 - 12:00:11 MDT