[ANN] GeoIP C lib bindings

R

ry dahl

This is a library which provides a single function. The function takes
as input an IP address and it outputs a hash containing best-guess
geographical information (like city, country, latitude, and
longitude).

Actually this is only a Ruby binding to a C library which provides
this function. Also, you must download a large binary database with
all this mapping information. It is kindly provided free of charge by
MaxMind.com.

There are other attempts at providing this functionality in Ruby but
mine is very simple and fast.

http://s3.amazonaws.com/four.livejournal/20071026/GeoIPCity-0.0.1.tgz
http://s3.amazonaws.com/four.livejournal/20071026/GeoIPCity-0.0.1.gem



ry
 
C

Clifford Heath

ry said:
There are other attempts at providing this functionality in Ruby but
mine is very simple and fast.

Have you compared the performance of your library, Sean Chittendon's
previous library that also used the C back-end, and my pure-Ruby gem?

The disk I/O time dominates, so the difference in performance is almost
imperceptible (or at least, depends on other things like the availability
of physical memory, etc).

The pure Ruby version is much more convenient, of course. That's why I
wrote it to replace Sean's version... I don't think we needed still a
third version.

Clifford Heath.
 
R

ry dahl

Hi Clifford,

If I remember correctly, Sean's wasn't working for the city database
and it was rather a large amount of code. This is just 79 lines of c -
so it is compact and does, probably, all of what people want it to do.
that is, if they have access to a compiler.

The silly thing is I've spent more time "releasing" it than i did
actually writing it :)

ry
 
C

Clifford Heath

ry said:
If I remember correctly, Sean's wasn't working for the city database
and it was rather a large amount of code. This is just 79 lines of c -
so it is compact and does, probably, all of what people want it to do.
that is, if they have access to a compiler.

Sure. I'm certain there are times it'll be useful.

Clifford Heath.
 
B

barjunk

Have you compared the performance of your library, Sean Chittendon's
previous library that also used the C back-end, and my pure-Ruby gem?

The disk I/O time dominates, so the difference in performance is almost
imperceptible (or at least, depends on other things like the availability
of physical memory, etc).

The pure Ruby version is much more convenient, of course. That's why I
wrote it to replace Sean's version... I don't think we needed still a
third version.

Clifford Heath.

Clifford,

What's the URL for your all ruby code?

Mike B.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,792
Messages
2,569,639
Members
45,348
Latest member
RoscoeNevi

Latest Threads

Top