Coder Social home page Coder Social logo

Re: Database updates about node-geoip HOT 16 CLOSED

kreationnext avatar kreationnext commented on July 19, 2024
Re: Database updates

from node-geoip.

Comments (16)

bluesmoon avatar bluesmoon commented on July 19, 2024

Maxmind license does not allow us to distribute the latest version of the library along with the package. Only the user of the library is allowed to download it.

from node-geoip.

kreationnext avatar kreationnext commented on July 19, 2024

I didn't mean to distribute the list, what I meant was like a cron kind of stuff that would download the database say every week if license key is assigned. Can you do that.

from node-geoip.

bluesmoon avatar bluesmoon commented on July 19, 2024

Yes, many people do that. It's not something that can be built into the library since it's an operating system level configuration.

from node-geoip.

kreationnext avatar kreationnext commented on July 19, 2024

Like for example
if(updatedb ever receives license key) {
store license key in a file
}

setInterval(() => {
run updatedb with the stored license key or
download the database again
}, every 7 days);

This way no rebuilt is required

Also many people depend on your updates to download the database. So just changing the release version is required.

Which means is that they think that the the database is released only when you release an update. This is a verified fact

from node-geoip.

kreationnext avatar kreationnext commented on July 19, 2024

this can be done in this way too

lookup(ip) {
	...
	download_data();
}
updatedb(LICENSE_KEY) {
	...
	save_license_key_to_file();
}
download_data() {
	var last_data_download_date = load_date_from_file_stored_or_memory();
	var last_week = new Date();
	last_week.setDate(last_week.getDate() - 7);
	if(last_data_download_date > last_week) {
		var mutex = is_singlerun();
		var license_key = load_from_stored_license_key_file();
		if(mutex && license_key != "") {
			updatedb_async((license_key) => {
				reload_data(() => {
					update_last_data_download_date_to_file_and_memory();
					release_mutex();
				});
			}); 
		}
	}
}

from node-geoip.

kreationnext avatar kreationnext commented on July 19, 2024

what do you think?

from node-geoip.

bluesmoon avatar bluesmoon commented on July 19, 2024

This is not something we will build into the library. Each person has their own way they'd like to run the update, so you should do that in your own code.

from node-geoip.

kreationnext avatar kreationnext commented on July 19, 2024

Thank you for your response.

A such I am left with only one option, i.e., ask a favor from you.

The issue is one of my client thinks that you and MaxMind are in the same. They don't allow me to update the database unless you release an update. Though this is an odd request but still can you just change only the version number monthly so that I can convince them that they need to update the database.

from node-geoip.

kreationnext avatar kreationnext commented on July 19, 2024

After you released the last update on 25th April, I updated the database on May. There after I am unable to convince him that an update is required. I have done several rebuilds thereafter but cannot convince him that a database update is required. As such my only option was to reach out to you.

from node-geoip.

bluesmoon avatar bluesmoon commented on July 19, 2024

from node-geoip.

bluesmoon avatar bluesmoon commented on July 19, 2024

from node-geoip.

kreationnext avatar kreationnext commented on July 19, 2024

The issue is I cannot edit the code. The code was written by my client's son. After his son's demise he keeps it as his memory. I am only allowed to do a rebuild and update the database when you give a new release.

from node-geoip.

kreationnext avatar kreationnext commented on July 19, 2024

Can't you set up a cron job on the host? BTW, in my experience automated updates are not a good idea. We've found many times that an update broke things because maxmind changed something. Always need to run tests after an update.

He hosts it on his local system. So I can't do any changes without him noticing. I don't take money from him. I want to help him survive through his old days. He has been by my side in my worst days, so trying to give him some comfort and also preserve his sentiments.

from node-geoip.

kreationnext avatar kreationnext commented on July 19, 2024

I also don't have the time to do monthly updates. I haven't even used this library in almost 10 years since our codebase moved to Java.

We do a lot of things for ourselves, a small charity like this wouldn't hurt I think.

from node-geoip.

kreationnext avatar kreationnext commented on July 19, 2024

I think I will have to write a similar library then, since you don't have time

from node-geoip.

bluesmoon avatar bluesmoon commented on July 19, 2024

I plan to release a new version this coming week. Please ping me if not done by Wednesday.

from node-geoip.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.