July 23, 2006

Post Meta InformationPosted By: Brandon Harper
Post CategoriesFiled under: ColdFusion, Culture


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.




16 Comments »

  1. Nice post! That’s some interesting stuff. Here’s what’s on my list:

    - Faster data validation. E.g copy the VAlidator idea from Flex. Where there are out of hte box validators, and you can built your own. And a validator is just a function that returns true or false.

    and/or something like this too would make my life so much easier:

    - Stronger integration with Exchange and Active Directory. Not only from the CF-Admin, but also from functions that make it quick ‘n easy to tap into the calendar, find out whena users pw is going to expire, etc…

    - Crash Prevention Capabilities. Global Max Rows setting for cfrquery. Global loop limit. Etc… Be aware of when the process is about to use up all available memory and not do so before it locks up…

    - CF+Flex Data Services integrated install. Merging the two together is a pain in the butt. I’d like FDS simply activated via serial number.

    - CF to CF communications using AMF. HTTP and WebServices are dirt slow, and AMF is crazy fast. Would love to use that. Although it’s meant for CF->Flash, it does a good job of convert CF data to Flash data types - I figure it wouldn’t be too hard to go back again.

    - CF should come with a built in webservice to quickly tap into its metrics (for building dashboards and monitoring tools). Although you could do that yourself; it would be nice not having to do that, and knowing that all CF 8 machines have that webservice ready to go.

    Comment by Tariq Ahmed — July 23, 2006 @ 9:36 pm

  2. I like your list, Brandon. It focuses on performance and stability which, to any business that relies heavily on CF, should be of high importance. It would be great if Adobe can implement these fundamentals. I think at version 7 CF has lots of functionality, it can do virtually anything a developer asks from it, so now it’s time to stabilise it and make it a proper enterprise product. To my mind the term “enterprise” conjures up words such as stability, trusty, management, and metrics.

    Comment by Gary Fenton — July 24, 2006 @ 3:14 am

  3. Hello Brandon,

    Excellent list, especially about upgrading 3rd party licenses, and especially++ log4j

    I’ll add two more here:

    1) built-in objects or functions to mimic/wrap the major tags like cfquery, cfmail, etc. Style DOES matter, and this will allow cfscripters to do much more without having to resort to tags. Yes, i know you can implement this yourself today, but not having to implement things themselves is one of the reasons people *pay* for a product.

    2) CF should take a page from the scripting world and ship a unit testing framework with the product + add documentation for same in the cfdocs. Once again, you can d/l a unit testing framework today, but having it included AND DOCUMENTED would be a major plus.

    Comment by tanguyr — July 24, 2006 @ 4:40 am

  4. Tariq–

    I agree, both HTTP and webservice calls are very slow in ColdFusion. Improving the speed of cfhttp was on my list last year, in fact.

    Gary–

    I agree. I think the feature set is pretty big in CF now, and it’s time to optimize the platform and make the Enterprise version more enterprise friendly. ;)

    tanguyr–

    Ahh yes, including unit testing; that’s a good one too. Great idea.

    Comment by Brandon Harper — July 24, 2006 @ 8:40 am

  5. Hi Brandon
    Another couple of things I’ve wanted even since I started using CFCs were these:

    1) the equivalent of VB’s OPTION EXPLICIT directive, which will cause an exception to be thrown if a local variable is used before it’s declared.

    2) allow this:
    var myVar;
    IE: declaring a variable without actually initialising it. It makes sense to have to declare the variable before using it; doesn’t necessarily make sense to have to give it a value.


    Adam

    Comment by Adam Cameron — July 24, 2006 @ 8:54 am

  6. Adam,

    Along those lines, a pet peeve of mine with CF is that you have to declare variables in methods to be method local, rather than assuming they are. Because you do not have to initialize variables, it makes it very easy for a variable to end-up writing to a shared scope. I’ve been dealing so much with server management lately that I totally forgot about that– thanks for the reminder. I should have put that one on the list for sure!

    Comment by Brandon Harper — July 24, 2006 @ 9:02 am

  7. Nice list,
    I particularly agree with the thread timeout issue.

    I would also like to add the ability to be able to use java ResultSet objects in my cfloop tags etc. In fact anything that makes using Java code and CF would be a major bonus.

    Comment by monkeywoo — July 24, 2006 @ 9:08 am

  8. Brandon,

    I would like to see an idea first presented to me by Spike Milligan implemented in CF:

    return new String(#cfhttp.fileContent#);

    OK, so that may be one of the more horrible examples I could have used… it was the first that came to mind. Being able to do raw Java in CF would be bonus and enable us to do some things that we’ve never been able to do before…

    CFCs with inner classes? Why not? It’s something to think about, anyway.

    Laterz,
    J

    Comment by Jared Rypka-Hauer — July 24, 2006 @ 11:22 am

  9. Another one from me.

    CF5(?) used to allow for named parameters in , from memory. This seems to have disappeared at some point.

    Can we have them back again, pls?


    Adam

    Comment by Adam Cameron — July 24, 2006 @ 11:32 am

  10. Ah. OK. YOur blog doesn’t seem to escape angle brackets.

    So I’ll try that again…

    Another one from me.

    CF5(?) used to allow for named parameters in <sfstoredproc>, from memory. This seems to have disappeared at some point.

    Can we have them back again, pls?

    Comment by Adam Cameron — July 24, 2006 @ 11:34 am

  11. I think it’s interesting that commenters are already diving down into language feature specifics (which I think is a bit of a mistake).

    I like Brandon’s focus on managability and enterprise level administration and control.

    I posted some of my own thoughts on my blog, referencing this post.

    Comment by Sean Corfield — July 24, 2006 @ 5:33 pm

  12. Ditto on more RegEx support. While I don’t need them often, the times I needed to use back references and look-around, I REALLY needed to use them.

    Comment by Scott Stroz — July 24, 2006 @ 7:34 pm

  13. Brandon, I really like your list. I’ve put my thoughts together (somewhat coherently I hope) into a post on my own blog.

    http://www.ryanguill.com/blog/index.cfm/2006/7/24/What-I-think-about-CF-8

    Would really like to hear your thoughts.

    Comment by Ryan Guill — July 24, 2006 @ 7:46 pm

  14. Adam, I’m pleased you mentioned the missing dbvarname attribute of cfprocparam in CF6/7. Having to including *every* parameter in the *correct* order has been the cause of many errors and frustration. Adobe, please find a way to reinstate it in CF8.

    Comment by Gary Fenton — July 28, 2006 @ 10:29 am

  15. I like to see two features :

    1. onServerStart
    2. onBeforeServerStop

    Comment by unf — July 29, 2006 @ 7:25 pm

  16. Nice list. I’m very new to CF. Found your site looking for info on automating installs. Then I found:
    http://www.adobe.com/cfusion/knowledgebase/index.cfm?id=87bd20f4
    Maybe this accomplishes your wish #8.

    Comment by Tom — September 26, 2006 @ 3:05 pm

RSS feed for comments on this post. | TrackBack URI

Leave a comment

XHTML ( You can use these tags): <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong> .