The following module was proposed for inclusion in the Module List:

  modid:       Net::IPAddress::Filter
  DSLIP:       adpOd
  description: Compact and fast IP address range filter
  userid:      DAVEWEBB (Dave Webb)
  chapterid:   23 (Miscellaneous_Modules)
  communities:

  similar:
    NET::IPFilter Net::BitTorrent::Network::IPFilter Config::IPFilter

  rationale:

    I was looking for an IP address filter I could plug into the perl
    bittorrent server named bitflu.

    Using the paranoid ipfilter.dat file, which has about 300k entries,
    as the list of IP addresses and ranges to block, I found the
    existing CPAN modules *very* slow to check whether an individual IP
    address was in those ranges. They all operate by iterating over the
    list of ranges, which means 300k tests per IP address.

    Plus the Moose-based modules (Net::BitTorrent::Network::IPFilter,
    Config::IPFilter) were using hundreds or thousands of MB of RAM to
    hold the filter, which was too much for the machine I was intending
    to run it on.

    I remembered that there was a tree structure optimised for range
    searches, and found Set::IntervalTree which is an xs-based module.
    An IP filter wrapped around that is hundreds of times faster for
    searches, and uses a fraction of the RAM than the existing modules.

    Net::IPAddress::Filter seemed a meaningful namespace for this
    purpose, as it's a stand-alone filter, not tied to any particular
    purpose or data source.

  enteredby:   DAVEWEBB (Dave Webb)
  enteredon:   Thu Nov  8 13:58:58 2012 GMT

The resulting entry would be:

Net::IPAddress::
::Filter          adpOd Compact and fast IP address range filter     DAVEWEBB


Thanks for registering,
-- 
The PAUSE

PS: The following links are only valid for module list maintainers:

Registration form with editing capabilities:
  
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=81b00000_47d7da87e1fe9418&SUBMIT_pause99_add_mod_preview=1
Immediate (one click) registration:
  
https://pause.perl.org/pause/authenquery?ACTION=add_mod&USERID=81b00000_47d7da87e1fe9418&SUBMIT_pause99_add_mod_insertit=1
Peek at the current permissions:
  
https://pause.perl.org/pause/authenquery?pause99_peek_perms_by=me&pause99_peek_perms_query=Net%3A%3AIPAddress%3A%3AFilter

Reply via email to