Thursday, December 29, 2005

mod_proxy_fcgi

Well, it looks like the little module Paul and I have been hacking on managed to get a bunch of people interested in it last night. Well, I'm glad to see that people like the stuff we're doing, but I do think some of what people are talking about is a bit premature.

So far, we've got a proxy backend module that speaks a subset of the fastcgi protocol. Assuming you've applied the lastest set of patches I posted to dev@httpd.apache.org you can actually run a fastcgi process (listening on a TCP socket) and via a ProxyPass setting tell httpd to hand all requests for a particular part of your URL space off to it. The fastcgi implementation is pretty bare bones, and has a bunch of known problems in it, but it is enough to get "Hello World" to work.

None of this is even close to the final solution we envision for this stuff. We still need to look at unix domain sockets and local fastcgi processes, with a mechanism for starting and stopping those processes as needed, and while we've talked a little about how that should work no code has actually been written for it yet. We'd also like to make the whole thing a lot easier to configure, the final goal being that a simple local fastcgi setup for something like Rails or Django shouldn't need more than one or two lines in httpd.conf.

Anyway, like Paul said, this is all very much a "free time" project for both of us, so no promises on when it'll actually get done, but we are working on it as time permits, and it's made pretty good progress lately, so who knows, maybe there will be something useful in the trunk of the httpd subversion repository fairly soon.

Saturday, December 24, 2005

Infrastructure Holiday Fun

I got to exercise my newfound ASF Infrastructure powers for the first time today, by upgrading the httpd install that runs http://svn.apache.org/ (and http://cvs.apache.org/ for what it's worth) to version 2.2.0. The main http://www.apache.org/ instance has been running 2.2.0 (well, 2.1.10, which is just 2.2.0 with a slightly different version number) for a while now, so I don't anticipate any problems, but I was still a little nervous since it was my first time doing something like this.

For the curious, the only reason this hadn't happened yet was that upgrading this httpd install involves rebuilding mod_dav_svn and mod_authz_svn (since the MMN changed between the last version and this one) and nobody had managed to find the free time to do it.

Anyway, everything seems to be working just fine, but if you notice any problems please feel free to drop me a line.

Sunday, December 18, 2005

Welcome to the ASF

So there are a lot of things from last week's ApacheCon that I'm sorry I missed, but ironically, the thing I really wish I was there for actually happened while I was sitting in the airport waiting to fly back to San Jose.

You see, at the ASF Members meeting I (along with a bunch of other people, whose names will become public once they've all been notified) was voted in as a member of the Apache Software Foundation.

This is a really big deal for me. I've been hanging around the ASF for years, helping out where I can, because I think the ASF does good work and that it plays a hugely important role in the software world, providing a place people can develop high quality tools that can be used by both open source and proprietary projects everywhere.

Anyway, I just wanted to say thanks to everyone who voted me in, and that I'm looking forward to becoming more involved in the day to day operation of the ASF.

Monday, December 12, 2005

Weekend Fun

So I just (well, late last night anyway) got back from a fun filled weekend at the ASF Hackathon. This week is ApacheCon US 2005, and the first few days of such events include, in addition to the tutorials, a large room reserved for people just getting together and hacking on various ASF projects. I'm not going to be able to make it for the conference, but it seemed like a crime to miss the Hackathon when the whole thing is only a short flight away in San Diego. Anyway, I got a chance to work my way through a lot of the forgotten backlog of APR patches, fixed a few bugs, met a bunch of people I hadn't ever seen in person, and got myself volunteered to help maintain the ASF Subversion repository. All in all, a weekend well spent if you ask me.

I didn't bring my camera, but fortunately Julian Cash was there, so there should be a lot of really interesting pictures showing up online in the next couple of days.

Sunday, December 4, 2005

Irony

I find it just incredibly amusing that I just did a Google search to try and find out how to do something in a Ruby C extension, and the first hit was my article on writing Ruby C extensions.

Adventures in Java Land: JDO

Since I decided I wanted to learn some more about J2EE development, and everyone seems to agree that there just aren't any decent intro books on it out there, the only remaining way to learn seems to be to just do it.

So I am. This weekend I started work on a small web app written in Java. It's a basic, bare bones bug tracker, with JSP and Servlets for the view and controller portions and JDO for the model. So far all I've really been doing is the model part, so I've basically been playing around with JDO.

I can't help but compare JDO with ActiveRecord, the ORM portion of Rails, since it's really the only ORM system I've spent any real time with.

JDO (specifically a JPOX 1.1 beta, which implements the JDO 2 spec) seems to let you do a lot more than ActiveRecord does, but with that comes extra complexity. Now that I've wrestled with it a bit I've managed to come up with something that does what I want, but it took a bit more work than it took me to do similar things with ActiveRecord when I first started playing around with it. I suspect it's partly because ActiveRecord comes with a LOT of good tutorials. JPOX has some great docs, but it seems to be a bit harder to find the parts of it that apply to what I'm trying to do, largely because it does so much.

I'm not overly thrilled with the way JDO duplicates info, you write your Java classes, then you create a metadata XML file that defines how they map to database tables. An "enhancer" tool then reads the XML and magically adds the code to your classes to support persisting you objects into a database. In JPOX you can even use a tool they provide to create the database schema from your JDO metadata, which is pretty much the opposite of how you do things in ActiveRecord, where at least I tend to write my database schema first, then build my Ruby level objects around it. You don't have to do it this way in JDO of course, it's flexible enough that you can work from either direction, and I imagine starting from the Java and JDO metadata would break down eventually once you need to make changes to an existing schema, but it's reasonable for getting started.

One thing I do see as a problem is that it's difficult to tell from the JDO metadata exactly what kind of SQL schema will be created. I suspect you need to have a pretty strong grounding in the details of JDO before you can really be in a position to make incremental alterations to your application's data model.

I'm pretty much convinced that the "right" thing to do about the duplication of effort is to move the JDO metadata closer to the Java level objects. Apparently the way this is usually done in Java land these days is via xdoclet, and I'll probably investigate that eventually, but what I really want is JDK 1.5 annotations a-la EJB 3 persistence, which looks quite slick, but of course isn't really available yet. It is nice to see that the state of the art in Java land appears to be moving in a good direction though.

Anyway, now that I've got a workable data model I'll probably look at fleshing out the controller servlets and JSP views next. That'll give me a good idea what needs to change in my data model to make it really useful in an application.