Automatic MongoDB Backups to S3
Posted by Ben in MongoDB, Technology on January 20, 2011
One of the big problems with hosting your own database solution is that you have to do backups for it on a regular basis. Not only do you need to do backups for it, but you need to also keep backups offsite. Luckily, Amazon S3 allows a cheap and easy solution for your offsite backups. Read the rest of this entry »
Problems with Facebook API and M2Crypto
Posted by Ben in Technology on January 19, 2011
After doing some crypto updates to a django application that I am working on, I discovered that the Facebook API was dog slow for retrieving any query using HTTPS. Turns out that the M2Crypto library apparently hijacks the SSL processing of urllib and mucks everything up. Thanks to this handy blog post, I was able to fix my Python implementation of the Facebook API and get things speeding along again.
The fix is basically to add the following lines before any urllib.urlopen() call (in my case, I only have two – one for GET and one for POST):
1 2 | urllib._urlopener = urllib.FancyURLopener() urllib._urlopener.addheader('Connection', 'close') |