Mojolicious Lite + CanvasJS

My app Block Ads, Tracking and Malware has been downloaded over 150 times from the Galaxy Apps store in over 40 countries. To keep track of usage data I created some graphs using CanvasJS and the Mojolicious Lite web framework.

There is a Perl log scraper that extracts data from the log file for the date specified in the URL.

This data is sent in JSON format to the graph where it is sorted and then plotted. This allows for dynamic interactive graphs that can zoom and pan.

I use a VPN to access the server on my intranet.

If I had more time I would like to use SQLite to store the statistics continuously and increase performance. Instead on analysing the whole file at once it would be better to monitor the log file and generate the statistics on the fly.

Even better – rewrite the DNS server in Go and include this functionality from the beginning. Logging to disk won’t scale very well as my service grows.

I currently have over 1GB of log files just for this week…

Anyway this works for now.

The source code (it was hacked together at 1AM): here

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s