Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/jonathas/top10ips

:computer: Reading an Apache log file and parsing the 10 most repeated IP addresses. Developed in C++, C#, Groovy, Java, JavaScript, Lua, Perl, PHP, Python and Ruby
https://github.com/jonathas/top10ips

apache cpp csharp groovy java javascript logfile lua perl php python ruby

Last synced: 10 days ago
JSON representation

:computer: Reading an Apache log file and parsing the 10 most repeated IP addresses. Developed in C++, C#, Groovy, Java, JavaScript, Lua, Perl, PHP, Python and Ruby

Awesome Lists containing this project

README

        

# Top10IPs

This software enables you to read an Apache log file, showing you it's TOP 10 most repeated IP addresses.

I've had this idea after being on an interview for a Software Engineer position at Google.
The interviewer gave me a format example:

1233454356\tGET /index.html\t10.10.10.1\n.

123345343\tGET /index.html\t10.10.10.1\n.

123345435\tGET /index.html\t10.10.12.1\n.

And asked me to write an algorithm on Google Docs shared with him (while he would give me a very short time and be watching me real time on Hangouts) to read that file and output it's top 10 ip addresses in the following format:

RANKIPCOUNT
110.10.10.12
210.10.12.11

Though that would have been easy to develop, things didn't go as expected at the time for me, as I wasn't able to think normally the way I usually do.


I told them I strongly disagree with that interview format, and they'd be missing some good people with that, as I've also heard that many people who have been through that have experienced the same as me.

Then, as they thought I wasn't able to develop that, I decided to develop the code for that in 10 different languages and reading from a real log file I got from a random day.