Archive for September, 2007

Trac: Milestone versus Version

I’m trying to organize my trac information better. The trac data model has the following elements:

  • Component
  • Version
  • Milestone

I was wrestling with what milestone and version meant with regard to each other, so I reviewed the Edgewall (the makers of trac) trac.

If I understand correctly, versions correspond to tagged snapshots of a subversion repository, and most likely packaged up for distribution.

Milestones are versions planned for the future which have not yet been completed.

Along those lines, I think it makes sense to only put tasks in milestones, though I’m glad that they allow the freedom to enter tickets any way you want.

Python Notes

Did some research on Python this morning. I like it and I don’t like it. It seems obscure to me - why all the wacky names? And why the aversion to MySQL and PHP? Seems like every article I read on Python, they never make any references to PHP or MySQL.

Is python really off in its own world? It just might be. Seems like a lot of the python projects I read about really invent their own versions of stuff (like data storage formats and template engines) that other languages share amongst themselves. Examples such as TAL, static file storage, and kid make me confused when I can keep my data and templates free by using XSL and SQL. And if an RDBMS isn’t possible, why not use hash dbm’s and perl?

In my experience, I’ve noticed a few really good things about python:

  • Python files usually use the “.py” extension, and these get compiled (?) into python.pyc automatically
  • Python is really picky about indenting
  • Python can be used to write a simple script, but can also be used to develop fully featured desktop applications

I’ve had good luck with the following python apps:

  • Trac
  • Cacheability Engine

Questions:

  • If you don’t want to use PHP because of Zend engine licensing issues, why not use perl?
  • Can perl be compiled the same way as python?

Apache 2.2 + FastCGI + PHP5




I’ve finally found my favorite web server setup. Like the title suggests, its Apache 2.2 MPM worker, mod_fcgid, and php5-cgi. Why?

Apache 2.2

I’ve been using Apache for years and I’ve learned a lot about its benefits and oddities. I’m really comfortable with the configurations and how to make it do what I want. As I’ve written about several times, there are a few Apache 2 modules I’m really excited about: mod_dbd, mod_proxy, and mod_cache.

Make no mistake, I’m also really interested in both mini_httpd and lighttpd, but for now I’m going to stick with what I’m comfortable with.

mod_fcgid

For years I used mod_php4/5, but then more recently as I started to use other cgi scripts such as python (for trac) and perl, it made sense to use fastcgi. Since I use debian, there are two choices, mod_fastcgi and mod_fcgid. mod_fastcgi is considered non-free because of some wacky licensing issues, and in my experience mod_fcgid is much much faster, though I may have misconfigured mod_fastcgi. By using fastcgi, you can use the mpm worker, which has improved performance and memory management over mpm prefork. This is due to the fact that while php5 is threadsafe, third party modules are not likely to be. Also, by using mod_fastcgi, you end up being able to use a variety of different scripting languages, ruby, python, php5, php4, perl, and even compiled C and C++ binaries.

Setting up mod_fcgid was really frustrating to me for awhile, so I’m posting my experience in the Docunext Wiki under Apache FastCGI.

php5-cgi

PHP5 is a great scripting language in my opinion. I like it not only for the syntax and capabilities, but also the community and external libraries.

One potential drawback to using php5 in cgi mode is the potential to not be able to use opcode cachers like xcache. The catch here is to setup the cgi processes to share memory. I think this is possible due to some posts at the lighty wiki and forums, but I haven’t wrapped my mind around it yet.

There are other differences between using php5 via mod_php5 and php5-cgi, including output buffering and a few server variables.

No go usb-serial db9 :-(

Grr, I spent a bunch of time trying to compile the Moschip7703 driver and eventually did, but the darn usb to serial device I have simply won’t work. Guess I’ll get some more rosewill usb-serial connectors, they work in my experience.

usb 2-2: device descriptor read/64, error -71

These helped:
http://readlist.com/lists/mythtv.org/mythtv-users/7/36048.html
http://www.mythtv.org/pipermail/mythtv-users/2006-December/159698.html

I gave up on this and the rosewill adapters arrived yesterday, still a little finicky, but I did get one to work.