Good morning ladies and gentlemen,
I would like to bring everyone up to speed since we have made huge progress on libloc and I would like to keep this momentum!
What has happened in the last couple of weeks?
Stefan has been working on Perl bindings which are essential to launch this on IPFire 2. The web UI makes a lot of use of looking up IP addresses and displaying the correct flag. That needs to be fast and therefore we could not rely on a CLI wrapper for location-query(8).
The Perl module is super-lightweight and does not implement all features of libloc. Mainly it is ready-only since we do not need another tool to compose a database. For our purposes this is sufficient and easier to maintain. If anyone else needs more features, they can always be added later.
The other thing I have been working on (with a lot of sweat, blood and tears) is walking through the tree to search it. This has been an outstanding issue for a long time and was fairly difficult to implement since a standard DFS was not possible to use. We have encoded information into the edges to store less information and this made it extremely difficult to extract again - on top of that comes that the implementation could not be recursive to be used in the Python wrapper. We now have a re-entrant search which performs super fast and uses very little memory. The depth of the tree is limited to 128, although we would never get too close to that. That results in a maximum stack size of 256 + 1 nodes and we walk through every edge and node only once which results in a performance of O(1) for computing and memory. It could not get better than that.
Finally, I have extended the Python bindings to make use of all of this so that all networks belonging to an AS can now be listed with “list-networks-by-as” and all networks belonging to a country can be listed with “list-networks-by-cc”.
I have added a man-page for location-query(8) which can be found here:
https://man-pages.ipfire.org/libloc/location-query.html
As far as I can see this now, we are approaching to be feature-complete for a 1.0 release.
Of course there is still a long way to test this and make sure that we do not have any bugs in the database format or the code.
Another major road block is that we do not have a database that is ready for prime time, yet, but the good news is that the toolkit is almost there!
Best, -Michael