List of Overdrive libraries

Well, crud. Overdrive changed their site and hosed me. Previously, they had a page on their site that allowed you to see all of their libary sites/urls. I wrote a quick snippet of code that would go through all of those pages and grab all the library urls (the last run of the code showed 2286 library sites). My plan was to run that code once a week or so to get the current, up-to-date list of Overdrive sites that OverReader could query against.

Now, Overdrive changed their libraries page to be a map and you have to search for libraries near you. So there’s no obvious way to get a list of ALL libraries. Luckily, I have the list from the last time I ran it and I can seed the DB with that, but now I have no way of getting the current list of valid Overdrive libraries. So, if a library goes away (does that happen?) or a new one comes online, my code won’t be able to know and can’t query against it. The only solution I can think of is to make it easy for the users to let me know when their Overdrive library doesn’t work on OverReader. That’s a terrible long-term solution, but it’s all I have for now. Maybe something will come to me later.

Overdrive slow queries – solution… sort of

In the last blog post, I found that the queries on the server were slow. I figured out why… for some reason, on the Linode server, some of the connections to the Overdrive server just don’t connect and the default in the apache http client is 2 minutes so it sits there for 2 minutes, fails, then retries and makes the connection. So that’s why it’s slow. Not sure why the connection fails so frequently on the Linode server when it hasn’t ever happened locally. The good news is, it seems to connect fine when it does the retry. Maybe I can just set the timeout to something lower (10 seconds?) and not worry about it too much? Maybe it’s worth contacting Linode though and see if they know what’s going on.