Category Archives: web

Python WSGI performance, or – is Python dieing?

I'm looking into starting an interesting little project and of course, one of the most fun phases of it all is choosing your technology stack. I'm going to do something a bit unusual, just because I can, but for starts, I've chosen Python/WSGI combination and within this palette of tools I've come across Werkzeug. It is a light-weight framework which I think will be perfect for the type of code I write - with an eye to what happens behind the scenes.

Read more...

Python WSGI performance, or – is Python dieing?

I'm looking into starting an interesting little project and of course, one of the most fun phases of it all is choosing your technology stack. I'm going to do something a bit unusual, just because I can, but for starts, I've chosen Python/WSGI combination and within this palette of tools I've come across Werkzeug. It is a light-weight framework which I think will be perfect for the type of code I write - with an eye to what happens behind the scenes.

Read more...

Atom as a web server?

The idea of using a simple, low-profile, low-performance, but also low-cost, low-power consumption and low-maintainance non-mainstream platforms as servers is absolutely nothing new. I have a great fondness for the very idea of using Atom CPUs as servers, and there are already commercial solutions with such a setup available out there. As soon as I can justify using it in a project, I will :)

But for now, I have an Atom-based netbook and I tried seeing what exactly can I expect from such a system in terms of performance.

Read more...

Backing up Google Reader subscriptions as OPML, periodically and automatically

A fellow former Bloglines user has asked me whether I found a way to backup Google Reader subscriptions into an OPML file from cron, as we used to do with our Bloglines accounts.

A quick search turned up this, which, from the look of it, in order for it to work requires every feed to be explicitly marked with a tag which is set up as public.

This by itself is rather cumbersome, and you have to remember to do that for every new feed you subscribe to, otherwise you’ll defeat the purpose of making periodic backups in the first place.

Luckily, there is a better solution. There is a nice little module on CPAN, WebService::Google::Reader by gray, which uses an unofficial Google Reader API to do various nifty things with your Google Reader subscription, including OPML export.

This means that after installing the module you can simply put the following command into your crontab (only command itself is shown, see crontab(5) manual page to find out what else you will want to put in there):

env GOOGLE_USERNAME=[email protected] \
  GOOGLE_PASSWORD=your-user-password \
  perl -MWebService::Google::Reader -e \
  'print WebService::Google::Reader->new(
     username => $ENV{GOOGLE_USERNAME},
     password => $ENV{GOOGLE_PASSWORD})->opml' \
  > /where/to/put/greader.opml

You will have to make the above to be one long line to satisfy crontab syntax, and of course remember to use a real username, password, and the path to the resulting OPML file.

Unfortunately, the most recent version of the module (which is 0.03 at the time of this writing) has a minor bug which prevents the opml() method from working correctly. So you will need to do a little patching.

Before installing the module, edit the source file lib/WebService/Google/Reader/Constants.pm, look for a string subscribtions, and fix the spelling (finding correct spelling is left as an exercise for the reader). Then proceed installing the module as usual.

Hopefully, this step won’t be necessary in a couple of days’ time when a new version of the module is released.

If you are a FreeBSD user like myself, you may choose instead to fetch a skeleton of the port of the module. Unpack it in /usr/ports/www/ and install it as you would any other port.

I intend to add the port to the ports collection as soon as our current ports freeze is over.

Enjoy!