Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Module Name Help!

by pileofrogs (Priest)
on Mar 28, 2006 at 01:46 UTC ( [id://539598]=perlquestion: print w/replies, xml ) Need Help??

pileofrogs has asked for the wisdom of the Perl Monks concerning the following question:

As a sysadmin I have lots of little scripts that sometimes run very often and they can send me email or pages. If a script that runs every minute starts sending me pages, I can get a flood of pages, which no one likes. Instead of re-writing the boring code that keeps a script from sending too many pages, I've written a module. I've discussed it in detail here: RFC: Time Lock Module Idea?.

So, the module is written, but I'm still not happy with the name, so I turn to my venerable co-monks for assistance.

How do you sum-up "Module that helps by letting you note that you just did something and you don't want to do it again for X seconds."? Here's the contenders so far:

  • TimeLock

    My first thought. Pretty lousy idea. It doesn't lock anything, and it doesn't operate like a time-lock at all (it's based on X-seconds-elapsed not time-of-day.)

  • NotNow

    My second idea. Also pretty lousy. It sums up what the module does OK, but it looks terrible when you actually use it. ( $notnow->now_ok() ) Yuck!

  • Sub::Defer

    Idea by rhesa. The name doesn't do anything bad, but it also doesn't really tell me what the module does...

Step up, one and all and help me name my module!

Thanks
--Pileofrogs

Update : Thanks Everybody! Bartender! A round of ++ for the house!

My favorite right now is rate limit. Maybe as Limit::Rate.

Final Update :It already exists! Algorithm::FloodControl. I don't think I would have found Algorithm::FloodControl if it weren't for these converstations. Thanks everybody!

Replies are listed 'Best First'.
Re: Module Name Help!
by xdg (Monsignor) on Mar 28, 2006 at 03:32 UTC

    In the linux IPTables firewall, this concept is referred to as "rate-limiting". Other possible adjectives could be "metered", "regulated", "throttled" or "periodic". I like the latter a bit more than the others.

    Stealing from various games, the notion of a "cooldown timer" might also fit.

    I'd think hard about a descriptive leading noun for the namespace. I don't like "Sub" as this isn't really applying to subroutines. It's more of a "Timer" or a "Constraint" when used as you did in the original article.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Re: Module Name Help!
by NetWallah (Canon) on Mar 28, 2006 at 01:53 UTC
    How about Mail::Notify::Frequencycontrol or a variation thereof ?

    Update: xdg's ideas(++) inspire names like "EventSummary" and "Squelched-Notify" .

         "For every complex problem, there is a simple answer ... and it is wrong." --H.L. Mencken

Re: Module Name Help!
by jdporter (Paladin) on Mar 28, 2006 at 14:22 UTC

    My feeling is that this is about "minimum interval".

      From the long running discussion about my in-progress module Math::Interval I would suggest avoiding using any name that involves the world "interval." There are just too many overloaded meanings and possible interpretations.

      Owl looked at him, and wondered whether to push him off the tree; but, feeling that he could always do it afterwards, he tried once more to find out what they were talking about.

Re: Module Name Help!
by parv (Parson) on Mar 28, 2006 at 06:52 UTC
    How do you feel about "Redo-Timer"?

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: perlquestion [id://539598]
Approved by McDarren
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2024-03-28 12:10 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found