Santa had a problem, and the problem was kids. Not that he didn’t love the children – far from it, their happiness was why he did what he did after all – but now there were more than ever of them. World population had grown to the point where there were 2.2 billion children that potentially wanted a gift, and that was a lot of mince pies to get through in one night!
To ensure that he’d have time to make all the deliveries, he’d taken the unprecedented step of installing agents in homes around the world – elves that sat on shelves – who were able to report on any problem, from waking children to adverse weather conditions, that might slow him down. Traditionally, a Shelf Elf would report by flying home each night leading up to Christmas, but on the big night itself the elf would have to report back in real time. Luckily for Santa, so many houses had internet connections that the Elf could use to report issues via a simple web form the Wise Old Elf had set up on the North Pole extranet. Continue reading
If you use a GeoIP database, you’re probably familiar with MaxMind’s MMDB format.
At MaxMind, we created the MMDB format because we needed a format that was very fast and highly portable. MMDB comes with supported readers in many languages. In this blog post, we’ll create an MMDB file which contains an access list of IP addresses. This kind of database could be used when allowing access to a VPN or a hosted application.
Tools You’ll Need
The code samples I include here use the Perl MMDB database writer and the Perl MMDB database reader. You’ll need to use Perl to write your own MMDB files, but you can read the files with the officially supported .NET, PHP, Java and Python readers in addition to unsupported third party MMDB readers. Many are listed on the GeoIP2 download page. So, as far as deployments go, you’re not constrained to any one language when you want to read from the database.
Use our GitHub repository to follow along with the actual scripts. Fire up a pre-configured Vagrant VM or just install the required modules manually.