App-Cerberus

 view release on metacpan or  search on metacpan

README  view on Meta::CPAN

NAME
    App::Cerberus - A pluggable Perl web service to preprocess web requests.
    Plugins can add geo, timezone and browser metadata, and throttle request
    rate.

VERSION
    version 0.11

DESCRIPTION
    There is a bunch of things we want to know about our web users, such as:

    *   Geo-location

    *   Time zone

    *   User-agent info

    *   Are they a spider?

    *   Are they making too many requests? Should we throttle them?

    To get all the above information reliably can easily consume 20MB+ of
    memory in every web server process.

    App::Cerberus packages up all this functionality into a simple web
    service (using Plack), freeing up your web processes to deal with just
    your own code.

    A query to App::Cerberus is a simple HTTP GET, and the response is JSON.

PLUGINS
  App::Cerberus::Plugin::GeoIP
    Uses Geo::IP with the GeoLite City database
    <http://www.maxmind.com/app/geolite> to provide geo-location at the city
    level.

    For instance:

        "geo": {
            "area_code": 201,
            "longitude": "-74.0781",
            "country_name": "United States",
            "region_name": "New Jersey",
            "country_code": "US",
            "region": "NJ",
            "city": "Jersey City",
            "postal_code": "07304",
            "latitude": "40.7167"
        }

  App::Cerberus::Plugin::TimeZone
    Uses Time::OlsonTZ::Data to provide the current timezone for the user,
    and it's offset from GMT.

    For instance:

        "tz": {
            "short_name": "EDT",
            "name": "America/New_York",
            "dst": "1",
            "gmt_offset": "-14400"
        }

    The GeoIP plugin must be run before the TimeZone plugin.

  App::Cerberus::Plugin::BrowserDetect
    Uses HTTP::BrowserDetect to provide data about the user agent and
    recognises the most well known robots.

    For instance:

        "ua": {
            "is_robot": 0,
            "is_mobile": 0,
            "is_tablet": 1,
            "version": {
                "minor": ".1",
                "full": 5.1,
                "major": "5"
            },
            "browser": "safari",
            "device": "ipad",
            "browser_properties": [
                "ios",
                "iphone",
                "ipod",
                "mobile",
                "safari",
                "device"
            ],
            "os": "iOS"
        }

  App::Cerberus::Plugin::Throttle



( run in 0.493 second using v1.01-cache-2.11-cpan-8f98c5d2c55 )