This also reminded me of an approach using SQLite: https://news.ycombinator.com/item?id=45748186