Adam Howitt's Blog

Nov 15
2007

Build a scalable architecture with Amazon's EC2

I've just wrapped up my CF Online Meetup live presentation of using Amazon EC2 to build a scalable architecture to run ColdFusion.  In the presentation you will learn what you need to get started with Amazon EC2 and I demonstrate a machine image I built running ColdFusion 8 and Apache.  I talk about the pricing and some of the challenges you may face.  

Over 30 people turned up to see the talk but if you missed it you can view the recording here. and Charlie has added the presentation to his UGTV site as he does with every CF Online Meetup.

Due to licensing concerns I haven't made the machine image running CF8 publicly available yet.  I'll give Vince at NewAtlanta a nudge and if anyone can put me in contact with the right people to ask at Adobe I may well make it public.  This will mean you that as long as you have the tools I mention in the presentation (all free), you can fire up my ubuntu704 machine instance which is pre-installed with Apache, go to the downloads directly and choose whether you want to install CF8 or BD7 and then follow the prompts to the end!  You can try the 30 day trial and evaluate your applications on dedicated hardware.  One of the tricks with trying this yourself is that Adobe and NewAtlanta require you to login to download the software so you can't just ftp the file into Amazon from their site.  I had to pull it locally after logging in then push it up to Amazon with SCP/FTP.

I think this could be a huge selling point for both Adobe and NewAtlanta - the ability to test the server without committing hardware or having to install anything.  Who knows - maybe one of them will even create their own pre-installed time limited demo image people can use where you just fire it up, copy up your files with WinSCP and point your browser!

As always - any questions let me know below.

Oct 03
2007

1800-ARE-HART

Well, not quite but for those of you who didn't know it, Charlie Arehart now has a pay-per-minute phone and web based CF support line.

I called Charlie last week while trying to diagnose / debug a tricky BlueDragon bug.  I called him and described the issue and he threw out some ideas.  After a few minutes of hands off troubleshooting he popped open an acrobat connect session and soon enough I was sharing my screen so he could see the issue through my eyes.  After about 20 minutes of eliminating any red herrings we established that it was in fact a BlueDragon bug and I was able to post to the BD interest list confident that I had done all I could. 

Ultimately it turned out that I was missing a patch for the linux version of JX 6.2.1 but the process of having Charlie walk through the issue was an excellent learning opportunity and worth every penny.  Well, I say worth every penny but I techically didn't call his hotline so I didn't pay but I will in the future safe in the knowledge that if I'm disturbing him, at least he is getting paid for it!

Check out the full details of his service "Ask Charlie" at his site. 

Jan 05
2007

WalkJogRun on Fox News

I'm delighted to report that WalkJogRun was featured on Fox News two days ago for the Cool Websites section after I tipped off Nancy Loo about the site.  I was surprised in her coverage when she said she had already featured the site at one point but I missed it I guess.  This time I was prepared and have my first YouTube video up now.  I know, I'm probably the last person in the tech world to do this but this is the first thing I felt was worth it.

For anyone who hasn't read anything about WalkJogRun, it's over 3 years old and is a community for runners, cyclists, walkers and anyone else to create and share routes.  It is based on Google Maps and uses custom AJAX, ColdFusion and is built on BlueDragon 6 with MySQL on an Ubuntu server. 

 

Nov 29
2006

BlueDragon 7.0 working with Apache 2.2 on Dapper Drake

I've just got this working. (to be fair i can display the default bd test page and my own hello the time is #now()# page but I am running 2.2 on Ubuntu with BD 7.0 beta 2.  Beta 2 isn't on the site yet but is available from the ftp servers.  Check the bd-interest list archives for how to find it.

The problem I came across may have been related to the order of my installation but it went thusly:
1. install apache2
2. install bd
3. test bd port 8080 - happiness
4. try to follow the guidelines from 6.21 docs for making symbolic links to the apache 2 install.  On ubuntu they are:

mkdir -p /usr/local/apache/bin
mkdir -p /usr/local/apache/conf
ln -s /var/www/ /usr/local/apache/htdocs
ln -s /usr/lib/apache2/modules/ /usr/local/apache/modules
ln -s /usr/sbin/apache2 /usr/local/apache/bin/httpd
ln -s /etc/apache2/apache2.conf /usr/local/apache/conf/httpd.conf

5. Confirm that you have the file /usr/lib/apache2/modules/mod_servletexec2.so
6. go to /etc/apache2/mods-enabled directory and see if you have 2 files servletexec.load and servletexec.conf.  If not create servletexec.load with the following line:
LoadModule servletexec_module /usr/lib/apache2/modules/mod_servletexec2.so

next create servletexec.conf as follows:
ServletExecInstances default 127.0.0.1:9999
ServletExecAliases default /servlet .cfc .cfm .cfml
<location /servlet>
SetHandler servlet-exec
</location>
AddHandler servlet-exec cfc
AddHandler servlet-exec cfm
AddHandler servlet-exec cfml

7. Restart apache:
apache2 -k restart

8. Create a simple index.cfm in your apache webroot (e.g. /var/www)
The time is <cfoutput>#now()#</cfoutput>
9. as long as you are not using virtual hosts you should see the current time instead of the plain text

Hope this helps others!  For reference, I have been working with VMWare's free virtual machine player this week for the purpose of testing BD7beta2 and have an Ubuntu Dapper drake vm running apache 2.2 and BlueDragon 7 beta 2. You can build your own Virtual machines with a free site called EasyVMX (see the super simple edition) to allow you to create a virtual machine and install an OS from your boot disks.

I installed Dapper Drake on one of these images to get the configuration working.  I'm done now and
I'm not sure whether BD will let me distribute this or would care to distribute it themselves but it's a good starting point for evaluating a web server without compromising any of your existing setup.

Nov 21
2006

BlueDragon 7.0 Webinar brain dump

I've just sat thru a great webinar by Josh Adams' on the BlueDragon 7.0 new features for an hour, presented by Teratech.  I made notes as I went along so excuse any gaps but it seems like there is plenty to look forward to for BlueDragon in the next release.   I fully intend to install the Beta 2 on a free machine to test it with WalkJogRun when it is released on Monday.  Here are my brief notes for reference:

BlueDragon 7.0 Webinar
BlueDragon - Used by Westlaw
Beta 1 released sept 28,2006
Beta 2 due for release Monday - feature complete
Final release Jan 2007

1. Concurrent processing with cfthread instead of 4 sequential requests for a webservice taking 4x the time, use cfthread to run the requests concurrently - roughly in the time it takes to run 1

<cfthread name="mythread">
</cfthread>
<!--- wait for thread to finish --->
<cfjoin thread="mythread">

CFThread is like CFMODULE where you can pass attribute value pairs.
myThread returns generated content as a variable e.g. mythread.generatedcontent and if you use cfreturn inside a thread it will pass back a return value.

CFJoin can actually be used to wait for processing of templates not even in the current request e.g. an application scope thread like wait for doc to be generated.

Fire and forget threads allow you to run some code like a stored proc call and return immediately so you never cfjoin it back - for example, a complex processing stored proc or a CMS insert.

2. CFQUERY enhancements
cacheduntilchange attribute for SQL 2005
background attribute - run query outside of current thread in a queue for processing when available

Better approach for fire and forget queries is to use BACKGROUND attribute on CFQUERY - does the same thing more efficiently.

3. NULL keyword and IsNull() function
BD7 acknowledges difference between NULL and empty string when your SQL recordset returns both null and empty strings

4. CFC interfaces and abstract CFCs
Nothing covered in the presentation.

5. Application.cfc with enhancements:
onClientStart event handler
onMissingTemplate event handler

6. CFDocument with enhancements
PNG and JPEG output
Multi threaded on all editions

7. CFCHART with enhancements
CFCHARTLEGEND, CFCHARTTITLE, CFCHARTIMAGE

Not supported
1. No event gateways
2. Flash forms
3. Reporting services
 

Jun 29
2006

CFUnited mid-conference roundup

The sun came out in DC yesterday as the conference began and the city is breathing a sigh of relief. ColdFusion can do that :-) I'll try and keep it short but you all know how I can ramble on...

CF Roadmap keynote: I agree with my coworker Kelly that the Adobe influence on CF looks ominous. It's clear that PDF integration for CF jumped the queue at the expense of other key features that were left out. "Scorpio", the next release of ColdFusion, will include some new PDF form based tags to allow users to fill forms in online. That's about it from that angle. Flex 2 was launched officially yesterday and Ben Forta gave a demo of a wizard to build a master-detail web application without writing any code. I could see us thinking about this for our CMS duoCMS for the content administration since it offers some saucy looking UI out of the box.

Sean Corfield talked for an hour on factories in the context of ColdSpring, a framework Duo Consulting (my employer) can and should leverage for all of our CMS cfcs. As it stands, the CMS is built in a way that forces us to keep only one version on each server. ColdSpring would allow us to maintain multiple builds of the code so that a client who was built on duoCMS 1.1.345 would have identical CMS to another client operating on the same build number. This is HUGE for Duo since we can easily identify a fix for one customer and know that it can be fixed for all clients on that build version. It also allows us to plot upgrade paths for clients based on their build number. I know this isn't as exciting as my design buddy Jeff's new addition to the family but it's a close second :-) The other advantage of the framework is that it allows us to hotswap different databases for an individual client so they are still duoCMS but the connectors for getting and setting information in the database are broken out. Fusebox 5 release candidate 1 was also released on Tuesday but I haven't had a chance to look at the details yet.

Note: if you are wondering where I have the time for this in the middle of the day, Kelly is attending the Microsoft Atlas presentation on their attempt at an AJAX library. The part I saw was too intense about Visual Studio so I skipped out.

Next up was Joey Coleman, a thoroughly entertaining speaker describing the concept of having turning yourself into an IPO. Not about starting a business but just managing your career as a brand to maximise your earning potential. Things like getting testimonials from your manager about the work you do and taking stock once a year with an annual report. This can make you more productive and help you realize whether you are stagnating and need more training or need to dig in a little more.

Douglas Ward gave an average presentation on Fundamentals of Usability. The issue was that it was another Jakob Nielsen style "Don't do this, don't do that" and not enough "You should do this". Darn negativity drives me crazy. If anyone has any good recommendations on authors or books describing what should be done please let me know. The only good thing I took away was his analogy of your website as a billboard and the notion that an effective billboard is short, sweet and to the point "Good chicken next exit at Bob's" vs a long winded flowery pile of text which doesn't help the user get to their end point.

An Adobe presenter, Sarge Sargent gave a disappointing talk on gateways with little substance so it looks like I will need to dig in more myself.

John Ashenfelter talked about Agile Programming as a methodology. There was a lot of content and theory but less practical. It would have been better if he had revised his material to focus on the audience: every coder here either builds websites or reports so with that assumption I wanted him to say "a client wants a new website, here is how the process works". I still have pages scribbled on the topic if anyone wants detail. The nugget here was the use of ANT as a tool for web development. Built into the tools most of our developers use it allows you to automate the deployment of applications and the configuration to setup a project. In our environment this would reduce some of the lead time necessary to set our machines up for maintenance of client websites and grab local copies. He also recommended some great development books he believes every developer you hire should read as part of their job requirements.

This morning, slightly less awake I watched Joe Rinehart introduce Model-glue unity as a framework for rapidly developing ColdFusion applications with a ruby on rails for ColdFusion feel. In five minutes he built a rudimentary blog from scratch typing every line of code while we watched in awe. The key component is something called reactor which works on most database platforms through JDBC. It understands the database design and then creates the pages with Model-glue to list, edit, add and delete items.

Lastly, I watched a friend from Atlanta present the benefits of running BlueDragon on .NET - our company sysadmin and I will need to try a demo of this because the benefits are huge including the ability to leverage application pools allowing you to start and stop one part of a website without bringing down the whole site or any other clients on the server. It also means better monitoring abilities and helps us see which client site is bringing the others down.

Food is being served now so I'll wrap up. Great conference, great content and a really good crowd.

Jun 23
2006

CFUnited and BlueDragon 7

I'm excited to be heading to my first CF conference since Macromedia's DevCon 2002 in Florida.  After that conference the company I was working for hit hard times and then I moved back to Chicago.  I focussed my training budget on classes last year but this year, it was time for a conference.  The training environment is completely different than classroom training at a conference.  Not only do they offer the opportunity to cover many topics but they also offer different levels from beginner topics to advanced including areas not traditionally covered in classes.

One presentation I won't be missing is Vince Bonafonti's BlueDragon 7 keynote  where the latest release is introduced.  He has been offering sneak peeks over at his blog this week.  I've been using BlueDragon 6 to run WalkJogRun for 3 months now on Apache and Ubuntu with MySQL and it is doing great. BlueDragon has happily handled the 30,000 page views per day on a simple P3 box with 256Mb memory!  Yes, it's an old converted desktop but that hasn't caused any problems so far.  Not bad for free!  Now if I can just work out a way to make money from the site without resorting to adwords I'll be golden.

May 09
2006

BlueDragon CFIMAGE on Ubuntu

I have been running ubuntu linux in headless (command line only) mode for a while now and battling to get CFIMAGE working with BlueDragon.  I was testing a modified example usage from the enthusiast wiki entry so you will need to replace my image names with your own and place the file in the same directory as the images to keep it simple

<cfimage action="edit" srcfile="img_0140.jpg" destfile="newPicture.gif" uridirectory="yes"
text="Copyright 2003" width="50%" height="50%" fontsize="20" fontcolour="violet"
position="SOUTH" nameconflict="overwrite">
<cfdump var="#cfimage#">
Running this code gave me the error NoClassDefFoundError

 

Most of the instructions I found explain that you need to add a line to your classpath file so

-classpath "$NEW_CLASSPATH"  com.newatlanta.webserver.BlueDragon
becomes
-classpath "$NEW_CLASSPATH" -Djava.awt.headless=true com.newatlanta.webserver.BlueDragon
Then you are supposed to restart BlueDragon and lo, it works.  Well for my installation it did not.  You need X11 but it doesn't have to be running people will say, so I ran
apt-get install xorg-common
which documentation instructs you is the x.org version of the XWindows system which, for Ubuntu, replaces the X11 version.  Great, but restart BlueDragon and I got a different error java.lang.UnsatisfiedLinkError so I gave up... 

 

...until today.  After seeing a message on the BD mailing list that looked suspiciously like my own issue, I picked it up again over lunch and after googling various ".so" files mentioned in the error message I came across some citrix users experiencing issues with the same missing file or bad dependencies libXp.so.3.  I went to my root and did a find -name libXp.so* to see if the file existed on my system and it did not.  I followed a few more threads and someone pointed out that they solved their citrix issue by running

apt-get install libxp6

.  I did this on my machine, restarted BlueDragon and voila!  Satisfaction!  The dump gave me what I wanted and the new image file contains a watermark!

Oh, and for reference, I tried removing the headless argument from the BD startup script but it bombed again so it seems that line is still a required step.  It's a shame I have the X11 piece installed first because I would be curious if you get it working without that step.