Code to load a GeoIP CSV database into Redis written in PHP, NodeJS or Python

Completed Posted 3 years ago Paid on delivery
Completed Paid on delivery

I need someone to write a simple code to load a GeoIP CSV database into Redis so I can do IP searches into Redis.

The script will have to connect to URL-1, this URL-1 will respond a simple JSON containing a URL-2 to download the CSV file.

Not all fields in CSV database is required, I only need to save into Redis the following fields: country, stateprov, city, latitude, longitude, isp_name and organization_name. The fields can be saved as a string (JSON encoded).

When loading the csv database into Redis we will have to use a temporary key. Only when the process successfully finishes, we will delete the production key and then rename the temporary key to the production key. This process is necessary to minimize the downtime during the load.

I would like to separate the ipv4 and ipv6 locations into different keys so we can gain some performance during the searches. You can use 'ipv6' and 'ipv4' as key name in Redis for production.

I wouldn't like to add any credentials to Redis database in the script file. I would like to use a ".env" file for this purpose. An URL for the credentials would be better because in some environments we use host/port and others socket connection.

I will run this script in terminal using a command line, so the expected result should be something like:

node [login to view URL] [login to view URL]

OR

php -f [login to view URL] [login to view URL]

OR

./[login to view URL] [login to view URL]

It is not necessary to separate the logic into different files, unless you find it necessary. A readable code is important :)

You can see a line sample of the CSV and a code example to import the database to MySQL written in PHP on DB-IP technical documentation page.

DB-IP IP to Location + ISP database: [login to view URL]

DB-IP technical documentation: [login to view URL]

There is a very good example written in python on the official Redis page: [login to view URL]

What you will have to delivery?

1 - The import code written in PHP 7, NodeJS 12 or Python 3. Just pick up the best one for you.

2 - As we have to convert the IP to a score, I will need this "ip_to_score" function written in PHP and NodeJS so I can do the searches. This function in python is not required.

I can install php libs in my end if it is necessary like bcmath or something else. Same for python or NodeJS if it is required or improves the loading performance.

Redis Python PHP Node.js

Project ID: #26514843

About the project

12 proposals Remote project Active 3 years ago

Awarded to:

devfuturenow

From the looks of it, it's a basic task that can be done in one day. Based on those requirements I'll create a flawless independent script to download, read and process the needed geoip fields into redis. Also, we a More

$111 USD in 1 day
(5 Reviews)
4.1

12 freelancers are bidding on average $161 for this job

luminous15

Greetings, I have extensive experience in integration projects and I can help you with this task. Please provide more details about the what to use as keys and why we need to use temp keys. Thanks,

$170 USD in 7 days
(56 Reviews)
6.1
catabre

I have 8+ years of software development experience across technologies PHP, Java, C/C++ & redis, mysql etc. I also have experience working with Location data from Google Maps & Open street. I have read your requirement More

$230 USD in 7 days
(4 Reviews)
5.7
vladimirumnov

Hi, maxmind geoip databases are subnets, its not possible with redis. its fast itself as a library, its possible to do fast local searches with nginx (price to setup 80$) or i can write very fast python api lookup (jso More

$170 USD in 3 days
(41 Reviews)
5.3
kuyoonjo

Hi, can you let me do this job. I’m expert in nodejs and redis. I promise I will do it perfectly. ^^

$111 USD in 1 day
(23 Reviews)
5.1
PKonstiantyn

Hello! Sir Very interesting in your project “Code to load a GeoIP CSV database into Redis written in PHP, NodeJS or Python” I am working in the powerful IT development Group and have done so many similar projects. I am More

$140 USD in 7 days
(22 Reviews)
5.2
hassansystem

I can load csv file. Also i am Expert in Web Designing and Development, I can Built or revamp your Website with all of Requirements. Ready to start Work with you! Inbox me and let's talk to get started!

$140 USD in 7 days
(15 Reviews)
4.6
AkintolaLonlon

## DEAR CUSTOMER, I'M FULLSTACK DEVELOPER. I WILL BUILD THIS IMPORT SCRIPT FOR YOU EITHER IN PHP 7 OR IN NODEJS LATEST RELEASE. PLEASE TAKE A LOOK AT MY PROFILE AND LET US DISCUSS. THANKS ##

$230 USD in 14 days
(4 Reviews)
3.8
shuvo159

hI, I am a python developer with 2+ years of experience. I have previous experience of python frameworks like Django and flask. I am also quite proficient in using Redis and celery. I have used Redis for caching as w More

$130 USD in 7 days
(6 Reviews)
3.6
psyntium

I’ll be creating the app on node.js. It can even run on serverless (openwhisk) if needed. My only concern is, what do you mean by IP to score?

$111 USD in 1 day
(0 Reviews)
0.0