Thursday, September 20, 2007

mod_python.publisher?

Getting an early start on this lab wasn't as productive as I had hoped it would be. If it was intended as a learning experience, then I have to conclude it was 100% successful because I learned a lot.

My Linux experience is primarily what I've done in CS240 and CS360... so I expected that part to be challenging. I blundered my way through it with lots of help (especially those who posted scripts and tips).

The difficulty I had getting my script to run took me by surprise. The majority of examples I found on the web regarding getting mod_python set up in httpd.conf showed using the publisher handler. None of them really explained how the publisher handler worked and I assumed it worked like a typical CGI handler. As it turns out, mod_python actually has a cgihandler that behaves like a CGI handler... the publisher handler is something different (there's also a psp handler).

The publisher handler works by mapping methods in the script to URLs. For example a script named index.py with a method named index and a method named hello would map to the URLs http://somesite.com/ & http://somesite.com/hello respectively. For a more complete treatment see the documentation here: http://www.modpython.org/live/current/doc-html/hand-pub-alg-trav.html

This is definitely a different way of looking at things, especially if you're like me and come from a folders-and-files-map-to-urls kind of background. I'm looking forward to experimenting a little more with the publisher handler, because I feel like I may only be chipping at the tip of the iceberg.

There are a few other things I'm starting to like about the publisher handler. It adds a lot of (much welcome) abstraction to getting GET and POST data, for example. If you are just using Python the 'plain old' CGI way, I'd recommend giving mod_python a try. It adds a little bit to the learning curve, but I have a feeling it's going to pay off in the end.

Thursday, September 6, 2007

CS 462.

My name is John Dusbabek, I am taking CS 462 (Large Scale Distributed Systems Design... and implementation hopefully) at Brigham Young University, Fall 2007.

This blog will serve as my lab notebook. Here I will post any required lab write-ups for grades... and also things I learned "the hard way" so as to be helpful to others who may follow in my footsteps. These may or may not be useful depending on what direction the course goes in future semesters. I understand from Dr. Windley that historically the course structure for CS 462 is quite volatile, and this blog will probably deal primarily with implementation specifics... so who knows?

Personally I'm excited about taking this class. I wish our department offered more classes like it.