REST API agent string parser for Docker based on Udger https://udger.com/products/local_parser
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
src/main Update UdgerParser, Meecrowave + improve performance Apr 8, 2018
utils
.gitignore Initial version Mar 18, 2018
Dockerfile
LICENSE
README.md
apiary.apib
buildAndRun.sh
pom.xml
run.sh
udgerdb_test_v3.dat Add test DB to project and to default Dockerfile Mar 28, 2018

README.md

Udger-local-api

User Agent parser microservice with REST API intended to be run in Docker.

Description

Udger-local-api is an application containing scalable pool of udger-parsers. Udger-local-api communicates via REST API, it can be easily embedded into Docker container and used as a microservice. Project provides basic Dockerfile based on Alpine Linux using highly efficient Meecrowave java EE microprofile.

Parts of project

Project consists of following parts:

Quick start

Application parameters

Udger-local-api can be parameterized using following java properties:

  • -Dudger.poolsize=N where N is number of parsers in the pool. Default value is 5
  • -Dudger.cachesize=N where N is number of items in parser LRU cache. Default is 10000
  • -Dudger.clientkey=KEY where KEY is client key used for access dbfile from http://data.udger.com/. Default value is empty.
  • -Dudger.db=dbFile where dbFile is path to database file. Default value is /udgerdb/udgerdb_v3.dat.
  • -Dudger.autoupdate.time=4:42 schedule daily auto update time to 4:42 (HH:mm format).

Use full udgerdb_v3.dat

  • replace udgerdb_test_v3.dat by full db udgerdb_v3.dat in Dockerfile

Examples

  • parse/ua
    wget http://localhost:8080/udger-local-api/parse/ua/Mozilla%2F5.0+%28Windows+NT+10.0%3B+WOW64%3B+rv%3A40.0%29+Gecko%2F20100101+Firefox%2F40.0
  • parse/ip
    wget http://localhost:8080/udger-local-api/parse/ip/12.118.188.126
  • statistic
    wget http://localhost:8080/udger-local-api/statistic
  • set/updatedata
    curl -F 'file=@udgerdb_v3.dat' http://127.0.0.1:8080/udger-local-api/set/datafile