August 04, 2004
Chain of problems

I started few months ago with spam, trying to implement a generic digital signature for the sending mail server. After spending some time with the mail servers from the past century, I remembered why I started doing java long ago. I actually wrote the first java code out of frustration with sendmail and all the insecure infrastructure used for mail. Java security model and extensibility/ease of programming seemed at that time the only hope to do decent mail servers.

So I went back to some of my ancient code - a SMTP server in java, written about 8 years ago. Then I tried to look at james - and got hit by the absurd avalonism and also the inefficiency in the code ( using Java Mail for parsing, plenty of chained file filters, etc ). So I decided to rewrite the smtp protocol ( I actually took james as basis) as a coyote connector.

Since I never liked placing connector stuff in server/lib and messing with server.xml ( well, I had some contributions in creating this monster... ), I tried to go back to an older idea ( which actually worked in 3.3 days ), and implement it as a real plugin ( in eclipse style ), using a server ( or trusted ) webapp. However Tomcat connector uses class for name, so I got the the next problem - fixing the class loader to support same loading features in tomcat that eclipse and jboss already have. This would also make tomcat easier to integrate and extend in a modern application environment. And it will make possible to write plugins like this one - making them easy to install without having to bundle them into tomcat ( adding SMTP server to tomcat would be a hard sell on tomcat-dev, not to mention the james relation)

And while writing the "plugin" as a webapp - I got back to the other problem, of configuring servlets and webapps using JMX. This is 2004, and still using the plain old init params and the ServletConfig is way outdated, given how simple it is to use jmx model.

So far the only hard problem seems to be finding the time - each of those programming problems have simple and elegant solutions. What is frustrating is how logical and natural each of those solutions seem, with big benefits all around. The class loading in particular can finally solve the old problem of sharing libraries with different versions, and making tomcat take advantage of all the features of the embedding app ( jboss or eclipse or any other using modern loaders)

Posted by costin at August 04, 2004 12:10 AM