I’ve been thinking about web startups lately. My aim is to build a successful one someday. That got me thinking about all of the tools out there that can give a potential founder a leg up. Let’s narrow the field arbitrarily. I want to use free tools to minimize financial risk, should the startup tank. If I can’t have free, then I want cheap and widely available. I also want tools that are flexible and those which I can look at the inner workings. You guessed it, I’ll be looking at a lot of open source software.
Let’s take a look at some stacks that I would choose:
- Linux, Apache, mod_perl, PostgreSQL.
- Linux, Apache, php, PostgreSQL (or mySQL).
- Linux, Lisp, and some database… or none.
Why Linux? Well, Linux is sufficient. Of the free unices, Linux is the most popular and widespread. Linux has good driver support.
Why Apache? Apache is the most featureful open source web server out there. Apache has a great API if you want to build components in C. Most popular languages in the open source world have an Apache API.
If I have to use a database, I prefer to use PostgreSQL. MySQL has come a long way in recent versions, but PostgreSQL still has some features that I think I need for web programming. One example is the network types. I can do somthing like this, select * from networks where “10.10.0.0/16” >> ip_address; . The >> means “contains”. In mySQL, or Oracle, I have to build a table of networks and/or IP addresses, iterate through them, and perform the network math myself. PostgreSQL also has a mature procedural language, and if I don’t like pgpl, I can use perl… or tcl… or python as my procedural language.
For familiarity, I would probably choose perl as my language of choice. PHP is also a strong candidate, but for reasons that I will detail in a later article, I probably would shy away from PHP. Perl has very tight integration with Apache. You can perform amazing gymnastics with the life cycle of an http request in mod_perl. Perl also has the advantage of CPAN, a repository of perl modules that do almost everything under the sun. One has to be careful about using CPAN as the quality of the modules vary.
I’d love to use lisp someday in a web application, but only if I have all of the time I need to learn its advanced features. I can imagine a lot of uses for continuations for instance, but I don’t understand them well enough to make effective use of them. So, I’ll keep plugging away at my lisp books and some day, I’ll write a web app in lisp.
Obviously, other people will make different choices based on their experience. Are there technologies that I wouldn’t use if I could avoid them? Yes, there are.
- Windows: Everything you need to use with windows costs extra: office tools, dev tools, database, mail server… For reliability, I’ve never had good experiences with Windows. The company I work for has had production linux servers for 9 months and none of them have ever been rebooted. It’s rare that I find a windows admin that can say that… In fact, I’ve never heard a windows admin say that.
- Java/Jboss: From a sysadmin perspective, I’ve had bad experiences with Java/Jboss. It has a tendency to crash. Application startup is long to “holy crap, that’s long”. The performance is variable due to garbage collection. Configuring a JBOSS instance requires a lot of specialized knowledge. Jboss programmers tell me that it has a lot of conveniences, but I’ve seen a lot of work go into fixing some of the problems caused by the Jboss infrastructure. As far as Java goes, I’m just not a big fan of the language. It feels like I have to type way too much to get anything done.
- Oracle: It’s a very featureful database, but it’s also very expensive to put into production, and it doesn’t perform significantly better for general database tasks then PostgreSQL or MySQL. Oracle also *requires* an Oracle DBA if you want a smooth running system in a fast changing environment like a startup. PostgreSQL and MySQL don’t require this kind of attention.
Well, that’s my navel gazing for the day. Next time, I’ll talk about my World of Warcraft adventures and the fact that my wife thinks (probably correctly) that I’m addicted.