Archive for July, 2006

Ruby Punditry: The Ruby Conspiracy

Wednesday, July 26th, 2006

Being very pragmatic, I like to hear the pluses and minuses for given cases and make a decision on my own. I’m not usually quick to “drink the KoolAid” which does make people grumpy from time to time, but I’d rather make a bad decision on my own after evaluating as much information as I can instead of trusting the opinion of Lemmings to tell me what is good.

Providing an opposing view of Ruby On Rails, Greg Luck just wrote a post from OSCON concerning what he calls the “The Ruby Conspiracy“.

Who are those who are benefiting from Ruby on Rails? Answer: O’Reilly Publishing, the authors Bruce Tate and Dave Thomas and a handful of consultants. At last year’s conference, Tim O’Reilly had carefully analyzed his book sales and was desperate to identify the next big thing. Same for the pragmatic programmers and for consulting companies wishing to push the next big thing. C# had been and is a disappointment. Despite a huge push it refuses to move up the Tiobe programming index. I get the feeling that everyone needs a next big thing, and if there is not one, they create it.

After reading the post as well as my own personal opinion about the new web frameworks, I’d have to agree with him. I think things like Ruby on Rails and Django are good general purpose frameworks for developing standard web applications which are self-contained. Once you get into the enterprise space, it doesn’t make a lot of sense to me to go with “exotic” platforms because of the lack of driver support, integration/monitoring/performance facilities, being able to offer the software as encapsulated services, etc.

If I were starting a new website or web company from scratch would I consider those frameworks? You bet. Would I recommend building a new production capable service or product from scratch using them in an enterprise (although there are certainly some pretty compelling use cases to use them in a few select roles)? Probably not.

Wishlist: 11 Things I’d Like To See in ColdFusion MX 8 (Scorpio)

Sunday, July 23rd, 2006

A couple of years ago I posted a CFMX 7 wishlist of which most of the things were implemented. Given that CFMX 8 seems to be in heads-down full-development mode at the moment, I thought I’d post a list of things which can be improved from my perspective. In general I find myself using ColdFusion for things beyond e-commerce, marketing sites, etc, so I realize my desires and needs are probably outside the typical ColdFusion developer, but these are things which would help me a lot nonetheless. As I was typing this, I noticed that Simon just posted a list too– ironic. :)

I feel that the improvements to the core language were overlooked in the 7.0 release. A lot of people noted a lot of improvements which should have been at least considered for the core CFML runtime, yet we mostly ended-up with new features. I think with each release you should improve the language itself for the more hardcore developers, not just add features.

Some major problems I’ve faced with ColdFusion lately is that most people (both developers and sys admins) simply do not have the desire or time to learn about how the ColdFusion runtime works, how JRun works, etc. That said it’s been a couple of months since I’ve been able to code regularly, instead I’ve been dealing with a lot of administrative issues that system administrators should be handling.

Anyhow, here they are. I couldn’t keep it down to 10, so you’re stuck with 11 of them I guess. :)

1. Threading– a la <cfthread>

ColdFusion MX 7 introduced the ColdFusion Gateway, which among other things provided a mechanism to thread ColdFusion calls. This was one of the major features I’ve used a lot with the MX 7 series, and if you’re unfamiliar with threading, let me place emphasis here on how it makes threading extremely easy compared to implementing a thread pool yourself. While you don’t have the same fine grained control of threads if you were writing them yourself, it does abstract a lot of issues a developer would face with multi-threading. I’d call it something along the lines of threading with safety gloves since you can specify limits, and because they run in separate threads than the application server is listening on.

While this was a huge feature addition, it still didn’t quite fill a need of mine– a simple tag set for launching and joining threads which was number one on my last Wishlist too. At CFUnited, New Atlanta announced the addition of cfthread into a future product, BlueDragon 7.0. Personally I wouldn’t quite tout this as “innovation” since it should be an easy wrapper around threading which is already built around Java and .NET, but it is a new feature which is not in the Adobe product. After attending CFUnited and hearing about cfthread, Adobe Engineer Rupesh Kumar created some proof of concept tags, <cfthread>, and <cfjoin>, which were released on Damon Coopers blog. Lets hope this gets further refined and makes it into CFMX 8!

In closing, as x86 based processor architectures continue to evolve to run more threads simultaneously, we need a way to take advantage of this hardware to speed up our applications.

2. Enterprise Administration

While the CFAdmin is fine for managing a few servers, when you start to get into the range of 20+ servers it’s /very/ cumbersome. There should be a way to make setting changes for “groups” of servers (without them being dependent on JRun clusters) which will get applied to all servers in the group.

Or maybe one server in the “group” is a master and any configuration changes which you make to it are automatically synched to the other servers, etc. There are a lot of different ways to go about doing this, but anything would help!

3. More Web-Based Hooks Into the JRun Configuration

One thing that I hate doing is a fresh install of CFMX for a production environment (more on this below). After you’ve installed the product, you’re not even halfway there, and you need a decent XML editor on each server to twiddle the various bits to get it running correctly. The ColdFusion administrator should have an “advanced” mode which allows you to change the JVM args without hosing it up, and also make changes to jrun.xml and default-web.xml for each instance, as well as copy the same settings between instances easily.

On a related note– why when you create a mapping in the CFAdmin does that not get populated into the JRun config too? It breaks webservices and it’s a pain to create them again manually.

4. Plug-In Based Architecture

This one would be a pretty big shift and I doubt it would be done, but I thought I’d put it on the table. In all frankness, I think CFMX 7.0 is a bit of a whale. While it is feature rich, but has about 8 billion library dependencies (just a rough estimate) needed for all of those features. I think it would be a good idea for the CFMX team to trace all of the dependencies down, and allow you to disable them if you don’t need extra functionality for big things like Verity, Reporting, Flash Forms, etc in order to free up memory. This would allow you to run more instances on a server, let your JVM have more memory for serving your applications, would drastically improve server start and stop times (have you ever restarted Tomcat running a typical sized Java app? It’s blazing fast by comparison!). This is one thing that PHP does which I like.

5. Mustang Support

Given that CFMX 8 will be released around the time as Mustang (Java 6), I hope they are developing to this standard. It’s really a hindrance to try and integrate CFMX 7 with any Java development because it does not support the latest version of Java. Only working to Java 1.5 support would be a huge mistake I think since it would already be a version old by the time CFMX 8 came out.

6. Improved Regular Expression Support

I still am not sure why you can’t do things like back references and look-around in CFMX… it’s supposed to be harnessing the power of Java, right? Though I might be a little off about what it does and doesn’t support– it’s been awhile since I’ve used a RegExp in CF. Basically, I think it should behave just like java.util.regex

7. More Transparency & Metrics

One complaint by system administrators is that ColdFusion is a “black box”– it’s really hard to get an idea of what is going on inside. Getting thread dumps and metrics is quite a chore without 3rd party software, and Tomcat, one of those silly open source projects, does a much better job of being able to grab thread dumps.

8. Scriptable or External Configuration for Installation / Unattended Installation

Have you ever had to build multiple servers after having a “known good” configuration? The amount of work required to configure each server is daunting and cumbersome. It would be nice if you could do one or more of these:

  1. Be able to manually script the configuration down to a very granular level for a server, and then do unattended installs on other servers using that configuration
  2. Install one server, load test it and figure out it’s ideal configuration, then export something human readable to a very granular level. You could then edit a few configuration parameters, and then use that as an install template for other servers for an unattended install.

9. Update all 3rd party libraries

ColdFusion touts Java integration pretty heavily, but in the real world it’s a chore because of all of it’s old libraries are incompatible with up to date ones you are probably using in the Java foo you are trying to integrate with it. The worst offender is easily Log4J. It’s time to get all of those old libraries updated!

10. Tomcat & JBoss Support

Another pet peeve I have is that CFMX is not supported on either Tomcat or JBoss, which I would assume to have more deployments than the big, expensive J2EE application servers. It would be nice to be able to deploy our CF and Java apps on the same server runtime, and I do like Tomcat better than JRun.

11. Better Thread Management / Protection

The applications I’m heavily involved with are dependent on 3rd party resources. Said resources can be unstable at times, and as a result, takes ColdFusion down with them because all of the threads fill-up stuck on 3rd party drivers waiting for a response from various 3rd party resources. At the end-user level, it basically gives ColdFusion a bad reputation and the first cry to resolve issues from everyone is “bounce ColdFusion” (sounds like an MS product, eh?) rather than see if one of the 3rd party resources is down. It’s frustrating and time consuming having to try and prove yet again that it’s not ColdFusion having problems, it’s one of the other resources. Not to mention restarting CF takes a long time, and it’s fundamentally a bad idea given how JVM’s work. It’s really hard to be a ColdFusion advocate in these situations when it’s so hard to show someone that it’s not ColdFusion’s fault that all of it’s threads are deadlocked.

Request Timeout should be more strict and actually kill threads if they reach that number, not just throw a run time error. The way that timeouts are implemented for queries does not seem to work if the server does not get a response from a database, and this would alleviate that problem and many more. I would rather have a server alive and throwing back error messages instead of occupying all it’s threads with calls that are waiting for responses which will never be received.

Anyhow, hopefully I don’t sound like I’m complaining too much here because in general I really do like ColdFusion MX 7– these are just things I’ve been plagued with for this release. I can certainly get passionate about my likes and dislikes, especially things which are a hindrance for me, or are not technically and logically correct/sound.

How To Quickly Fix Common JRun / ColdFusion Startup Problems

Thursday, July 20th, 2006

If you’ve ever poked around with the various JRun XML configuration files in ColdFusion before, chances are you’ve ran across a time where you’ve not been able to get JRun to start properly. This is not an end all, be all guide to fixing these problems, but I thought I’d pass a couple of tips that I use to troubleshoot these problems quickly. I’ve found that it’s usually due to a wonky text editor breaking the XML somehow by virtue of character encoding or something of that sort, but here are some tips to quickly fix a JRun server that won’t start.

Before making changes to jrun.xml or default-web.xml, make backups.

Admittedly I’m so used to working in these files that I sometimes don’t do this. However, I always have a WAR file around of ColdFusion which I can extract the original default files from very quickly.

When I try to start JRun/ColdFusion, it will not start

Most likely jrun.xml has somehow been corrupted or has an incorrect entry. The quickest way to get going again is to restore this file from a backup and try editing it again. Obviously you can also do a diff between the backup and your current file as well and fix as necessary.

After JRun/ColdFusion starts, I get a “500 There is no web application configured to service your request” error

In this case, there is a high likelyhood that defaut-web.xml has somehow been corrupted. Again, restore this file from backup and/or compare the current version to your backup file and fix as necessary. Keep in mind sometimes a text editor can muck the file all up even though it looks exactly the same, so you’ll want to try a different editor in that case.

Granted there are many more cases which can cause problems with JRun/ColdFusion, but these are the most common ones I come across. If neither of these help, it’s time to start digging in the server logs as well as find-out what has changed with the server recently.

ColdFusion Is Not Free Software

Thursday, July 20th, 2006

I should preface this post– this is not a critique on the licensing model provided by Adobe or New Atlanta, simply a post about why ColdFusion is not “free” in the big picture of software. While CF is typically my tool of choice for web apps, I’m very pragmatic and not afraid to admit it has weaknesses just like any other language, etc.

I think those that claim ColdFusion is “free” do not understand what the commonly accepted definition of free software is. Any development copy of ColdFusion MX or BlueDragon which does not have a paid license is Crippleware in Freeware’s clothing, and I’ll elaborate on why that is following the explanation of what free software is.

What is free software? Free software IS NOT freeware, and freeware IS NOT Free software. Free software is free as in speech, not as in beer. Free software means I do not have to pay for a license to use the software, the source code is included and I can modify it and use it as I see fit. For a more elaborate description of what free software is, read the Free Software Definition, or even the Wikipedia definition.

Examples of free software:

  • PHP
  • Python
  • Ruby
  • Perl
  • Linux
  • OpenOffice
  • .. and an exhaustive list can be seen here

So if ColdFusion is free, why is it not listed there? Because it is not truly free software. I can’t download the source code for it and build it on my machine, and unless I pay for a license for it, I can’t use a CFML server in production with all features. Basically, it’s impossible for me to host a CFML based website at home without limitations, so I have no desire to do so. As such, it’s very unlikely any sites I host at home will ever be ColdFusion even though it’s what I have primarily developed in for the past 8 years. Adobe’s development version of ColdFusion MX (as is the Freeware version of BlueDragon) is crippled freeware (crippleware) as some features are limited.

Freeware is software released at no cost which may also have licensing restrictions or feature restrictions (but certainly not always). Freeware with limited functionality compared to the “full” version can also be called Crippleware.

Other examples of commercial crippled freeware:

  • SQL Server 2005 Express
  • Winamp
  • Google Earth
  • Oracle XE

Not to say that any of those pieces of software aren’t useful, I’m just calling them what they are– crippled freeware.

Not to pick on Ray, but he provided a good example of using the “ColdFusion is free” argument incorrectly in the comments of the linked post:

The dev tools are now as free for CF as they are for PHP or Ruby.

This is not true. While I can develop in ColdFusion without paying any money for software as well as use some free software to write CFML code, I cannot download a CFML runtime and modify it or even look at its source code as I see fit. That said, ColdFusion development tools are in fact not as free as PHP or Ruby. We won’t even get into how you can’t deploy a fully functional ColdFusion runtime without buying a license, or how Ruby and Python can be interactively interpreted. ;)

I know the first comment is going to be “well why would I ever want to make modifications to a ColdFusion runtime?”, so I may as well squash that argument. I’ve ran across many cases where I’d wish I had access to a CFML runtime such as being able to do real threading (nice job New Atlanta on cfthread), looking at how the auto-scalarizing works under the covers to solve Java integration issues or find ways to optimize CFML for the runtime, etc. Another big reason– one of the best parts of the OSS model is being able to submit patches back to the project so that bugs that directly affect you can be fixed in a future release.

I do think because a lot of alternatives to CF are actually free software it provides them with an advantage for both number of deployments and adopting new developers, but that’s a completely separate topic.

Django Ousts Ruby On Rails and PHP In A Performance Test

Monday, July 17th, 2006

Courtesy of the Ruby On Rails Wiki, you can see the results of a simple load test of Django vs. Ruby on Rails vs. Symfony. I’m actually kind of surprised by the results that the PHP powered Symfony produced. As with all benchmarks these should be taken with a grain of salt, but it’s interesting to see these frameworks compared to each other in a performance test.

And for some reason I can’t get a direct link to the article to work correctly, so I used a TinyURL. In the future if you’d like to get to the article, it’s located at http://wiki.rubyonrails.com/rails/pages/Framework+Performance.

My New Site: Reviewfoo — Tips, News, and Reviews for Everyone

Sunday, July 16th, 2006

I’ve been making minor changes here and there to this site lately, and in general trying to figure-out where all of my visitors come from (about 1,600 unique visitors per day). During the process I’ve noticed my entries which are the most organically popular happen to be my reviews and experiences with various products.

I spend quite a long time researching purchases of goods, to the point of becoming a bit of an expert on the range of products that compare to what I end-up purchasing, etc. Given the amount of time I spend on research and the popularity of the reviews on my site, I decided to create a new blog titled Reviewfoo. This will be the new home of my research and reviews going forward, and I plan to write more on the subject any time I spend a considerable amount of time researching something before a purchase.

As an avid web-surfer and first adopter, I also intend Reviewfoo to the the place for regularly passing news and tips for everyday things such as finance, “life hacks”, home improvement, etc between my reviews. It’s a fairly general interest blog and you might find a new useful tip there from time to time. Check it out and let me know what you think!

Have You Had JRun Connector Problems?

Friday, July 14th, 2006

Steve has a few entries about the problems he’s having with JRun connectors, and admittedly they’ve been quite a thorn for me for quite some time. I’ve pretty much narrowed the problem down to them being problems with connecting to JRun Clusters as connections to single instances seem to work fine (this is with IIS 5 and Windows Server 2003, by the way). This has been a long standing problem for me, so I’ve tried all kinds of installs from ColdFusion MX 7-7.02, with and without hotfixes, etc.

Here is the list of symptoms I’ve seen in general:

  • IIS Hangs and does not return responses
  • All kinds of entries in the connector log that look like this
  • Restarting the IIS Admin and dependent services will temporarily clear-up the problem, and then it starts happening again
  • It seems to happen more frequently when the machine has less load, but I have no emperical evidence of that to pass on
  • If you connect to the instances directly via a browser, they are running just fine

The things I’ve tried without success / double checked:

  • Tried the connector both with and without native OS memory allocation
  • Made sure that no other services on any of the servers were using any of the same ports as JRun
  • Made sure that all NIC’s and ports on the switch were configured for 100 Base T
  • Installed IIS on an application server, and connected it to the cluster on the same server (to eliminate network problems as a possible cause)
  • Installed the IIS Hotfix

The one work around to the problem is to delete the registered instances and cluster for the server, and just connect directly to one of the instances, so it seems to be some sort of problem with JRun Clusters. I have a hard time trying to figure-out what the problem could be given the large amount of time I’ve spent on troubleshooting this (even to the point of redoing server architecture to work around it), and the most frustrating thing is that clustering doesn’t even seem to work correctly when putting IIS on the same machine with the app server.

Has anyone else had problems with the JRun connectors when connecting to JRun clusters? Luckily I won’t have to deal with them for much longer given a new change in architecture soon which will allow them to be load balanced via a load balancer at the application tier as well instead of just being balanced at the web tier, but until then I’ll probably end-up removing all connections to JRun clusters and have IIS talk to a single instance instead since it seems to be a “known good” configuration.

A New Ride: 2006 Trek 7.5 FX Disc

Monday, July 3rd, 2006

For a more in-depth review of this bike with more photos, check out my extended review of the 2006 Trek 7.5 FX Disc on Reviewfoo.

Lately I’ve been getting back into biking for many reasons, including the health benefits (I can certainly use the exercise), fun, and of course it’s not a bad idea given the price of gas. I’ve been riding a bike I bought quite a long time ago, a Mongoose mountain bike. I’d never really felt all that comfortable on that bike (turns out it was too big for me), I could never seem to get the shifting aligned correctly so gears 4 & 5 never really “caught”, I accidentally overtightened the front brake and stripped the screw in the caliper, and I felt like I was putting money into a bike I would never be happy with, etc. 2006 Trek 7.5 FX Disc I think the last straw for me was riding it to “Bike to Work” day– it was just way too bulky (for me) to climb steep hills. It was simply just not the bike for the type of riding I like to do.

Basically I wanted to get a new bike which was meant for riding in an urban environment which was light and fast, yet was not a road bike and didn’t have a super uncomfortable position. It also needed to be fun to ride, or I wouldn’t hop on it much. Turns out, a few bike manufactures have been making hybrid bikes for the past few years which combine parts of mountain bikes and road bikes and was exactly what I was looking for! After spending a few evenings researching what I wanted, it finally came down to the Trek 7.5 FX Disc.

Here’s an overview of the bike compliments of its marketing literature:

You get the best of both worlds with Trek’s 7.5 FX Disc, plus unmatched stopping power. The Alpha SL Aluminum frame is light and fast, yet sturdy and durable. Avid disc brakes easily check your speed, even on rainy commutes. Bontrager SSR wheels with Bontrager Race Lite Hardcase tires are equally at home on roads, paths, and trails. Plus, a 27-speed drivetrain gives you a wide range of gears to choose from.

My local Bicycle Village (a Colorado local chain) had them in stock and had a Grand Opening sale going on, so I picked one up on Saturday. They also do free adjustments and tune-ups for the life of the bike, so all in all I feel like I got a good deal (about $150 below MSRP).

I took it out for a quick ride on Saturday evening after I finished installing a few accessories. I was planning on only riding it about 4 miles or so, but I enjoyed it so much I ended-up riding for almost 13 instead. I’m really amazed by how fast this bike is.. it’s definitely a road bike in mountain bike clothing. I ended-up averaging a little bit above my normal cruising speed on my old bike while going uphill, and the trip back downhill (keep in mind it was just a very low, steady climb/descent) took almost time at all. My average MPH for the trip was almost 4 MPH above what I last did on my mountain bike, and I think this will only improve as I strengthen the muscles used in the riding position I have on this bike. Last night I took a ride on my old bike and realized how heavy and clunky it was compared to my new bike.

If you’re looking for something light and fast but not quite a road bike either, I’d highly recommend giving the Trek FX series a look!