← Back to team overview

linuxdcpp-team team mailing list archive

[Bug 1774502] Re: Free GeoIP Database Format Change

 

I do agree with cologic's rationale on this :)

I did avoid mmap for the following reasons:
* My objective was a C implementation that was easy to use everywhere. mmap is UNIX specific, Windows for example uses a different API https://docs.microsoft.com/en-us/windows/win32/memory/file-mapping libraries like https://github.com/Shinmera/mmap exist but I was trying to keep things simple.
* Databases may be up to 4GB, fully memory mapping such a DB may be a problem on 32-bit systems. 
* Using fseek things are a bit less likely to go awry.
* With OS caches in place the performance for a few ks of lookups should remain reasonable.

Sadly there isn't an atomic seek+read call that is portable to avoid the
mutex issue :(

Also even if I read the whole DB in memory (via mmap or fread) the
problem with database files being updated would remain. That isn't easy
to solve in any case though.

And yes, the flexibility of the format sucks because I can't just create
a fixed structure and be done with it...

I don't mind adapting the library to your needs if you don't mind
waiting a bit. Just tell me what you need it to do. Otherwise you are
welcome to fork and reuse any code in there to suit your (specific)
needs :)

If you need me to drop by dcbase to discuss it also say so and I'll try
to join :)

-- 
You received this bug notification because you are a member of
Dcplusplus-team, which is subscribed to DC++.
https://bugs.launchpad.net/bugs/1774502

Title:
  Free GeoIP Database Format Change

Status in DC++:
  Confirmed

Bug description:
  "Updated versions of the GeoLite Legacy databases are now only available to redistribution license customers, although anyone can continue to download the March 2018 GeoLite Legacy builds. Starting January 2, 2019, the last build will be removed from our website. GeoLite Legacy database users will need to switch to the GeoLite2 or commercial GeoIP databases and update their integrations by January 2, 2019."
  https://dev.maxmind.com/geoip/legacy/geolite/

To manage notifications about this bug go to:
https://bugs.launchpad.net/dcplusplus/+bug/1774502/+subscriptions


References