Aug 08

As part of their tour of North America, Railo stopped by Salt Lake City with their CEO Gert Franz and CTO Michael Streit to present their CFML engine to the combined audiences of SLCFUG and NUCFUG groups. Along with the meeting we were able to have dinner with the Railo duo. The content of this post is being pulled from memory and conversations with others so I don’t vouch for 100% accuracy.

General Impressions

Overall, I was greatly impressed by what the Railo team has done to make their product a viable CFML solution. The presentation was great with a wealth of examples and content to go over. The end effect of the presentation and subsequent discussion left me with a very positive take-away.

It’s in the Name

This is something that was brought up during dinner that I didn’t know before about the origin of the name Railo. From their FAQ page:

Yes. Railo is the name of an alien dog, first appearing in the first season, episode 25 of the TV-series “Enterprise”.

Standardization

During the meeting Gert talked a little about his involvement with the advisory committee that was created to help direct the CFML language as it continues to evolve. With multiple companies producting CFML engines it is a temptation to start developing extra tags that make the company stand out. The downside is the harm it causes to the CFML language by confusing developers and/or locking them into one engine since the code becomes specialized.

Railo is not without it’s features (which I will talk about below) that are not standard, but they have been making an awesome effort to share what they have been working on and the ideas for the future with the advisory committee in an effort to help things become more of a standard. Railo distinguishes themselves by making it out-perform the competitors, which is the right way to do it.

One of the comments made by Gert that I really enjoyed was to this effect:

While presenting at Adobe an Adobe engineer commented that they hoped Railo wasn’t mad that they used some of their ideas for features in ColdFusion 8. Gert replied that Railo stole 95% of Adobe’s ideas, Adobe stole 5% of Railo’s features so they were about even.

Two Administrators

When dealing with applications running on Adobe’s ColdFusion you have one Administrator that runs everything on that installation. If you want to break up the server to use a different configuration you have to use the enterprise version which allows you to create separate instances but cost a lot of money to do so. With Railo there are two types of administrators that you can use to run your application: the global administrator and the context administrator.

The global administrator allows you to configure options that will be available on all the web contexts running on the server (or instance of the JVM, I think). Basically anything you define there will take effect across all web contexts, unless overridden by the context administrator.

With the context administrator you are able to define settings that affect only the web context itself. This includes settings such as mappings and datasources. Traditionally you would have to do something in the Application.cfc to get mappings dynamically that were not defined in the administrator.

Resources

There are a lot of different ways to access files. You have local filesystem files, files on network shares, files on ftp servers, files on Amazon’s S3 services, flicker, google docs, etc. Thanks to the folks at Railo we are able to access the files from different services through an abstracted layer in Railo. I don’t know if they do flicker and google docs but they showed examples of using ftp and the S3 service.  Essentially, you could reference anything with a file path. Of course, getting files from ftp is considerably slower than the local file system. What this abstraction allows is for the programmer to reference files from varied locations without having to worry about where it is coming from.

Even if they don’t have a flicker:// path it sounded like it would be up to developers to program additional resources if they chose so you can have a flicker resource. You have to love abstraction, it’s just cool.

Portability

With the ability to change settings the portability of the Railo engine is impressive. All of the information to run your Railo application resides within one directory so if you want to distribute or move your application, datasources, mapping, et al., you just move the directory. It also is nice that it doesn’t break encapsulation, you just move it and it all comes.

Clustering

I’ll admit right now that I am no server administrator, but I was impressed by the quickness and seeming ease it was for Gert to startup a cluster and show us how it runs. Granted we didn’t watch him create the cluster he showed that it was done using the underlying Java server and you just need to tell the servers where each other are and give them some private key goodness. That alone looked pretty neat, but when you couple it with the cluster scope it was amazing.

Cluster Scope

This is something which just makes sense. You have session scopes and applications scopes when working on a single box, why not expand that out to the next level and have a cluster scope? Well Railo has a cluster scope. How cool is that? You can have variables that are created on one node in the cluster which then get shared to all other nodes in the cluster. Even if a node of the cluster is unavailable it will be updated once it comes back online and automatically synced with the rest of the cluster. I believe that Gert said Railo was using the cfthread task to accomplish the syncing of the cluster scope.

cfthread Task

Not many developers are used to using threading in their applications, at least the programmers that I know don’t. But if you do use cfthread, and even if you don’t, the type=”task” was a very cool addition to the cfthread tag. The task type allows you to define a task that is run as a separate thread. If that thread fails for some reason you are able to define how often and how many times to retry it. I believe that this is how the cluster scope is managed - by way of a threaded task.

TDD

Test Driven Development (TDD) has been something that has interested me for quite some time but never actually implemented it. Railo is a very fine example of why you do implement TDD and the benefits it reaps. As we were talking I asked the Railo duo about their using TDD.  I had read something about them using it and it turns out they have about 60,000 tests currently. Each time they start working on a bug or a feature they create their test for it beforehand. Once they have written the fix or feature the test is run to make sure it is correct. They also noted that it takes about an hour to run the tests each time they do a build for release. Awesome work Railo!

Debugging

Not much to say on this one other than the duo report that turning on debugging in Railo doesn’t really affect the system. They have such a hard time measuring how much it slows it down that they just say 1% to be safe.

Multimedia Tags

Prevalent among web sites these days is a lot of rich and streaming videos. With the 3.0 release of Railo they have created cfvideo and cfvideoplayer tags that do video conversion, clipping, screengrabs, and playback. I haven’t done much with video content but it was quite cool to hear and see the examples of the tag and how simple it is.

To me it was more impressive to see the way they used Amazon’s EC2 along with Amazon’s S3 to convert and stream their videos. Along with the EC2 Railo is planning on having some public Railo templates(?) that can be copied and made private for those who want to use Railo on the cloud once it is open source.

Extensions

This was one of the things that has some of the greatest potential and would be awesome for developers. The idea of an extension is basically having a packaged version of an application, training module, network thingy, etc., available for people to download and install/upgrade from within their administrator. I kind of picture this like the Apple app store, only for ColdFusion applications and add-ons.

This extension feature is how they are planning to off the video tags and other Railo extensions that they can’t distribute freely because of licensing. In addition developers would be able to have their applications and extensions sold through the same manner. Or you could define your own server to distribute solely your applications.

This was an idea they had at the beginning of the year and are still exploring the options and functionality. They are also in talks with Adobe to have this be something that is not unique to Railo but used in CF 9 or CF 10 as well.

Shared Hosting

One area of the ColdFusion community that is lacking is the ability to have very powerful shared hosting solutions for ColdFusion. You can get dedicated hosting that works awesome, but it costs you a lot to do it. With the current availability for shared hosting I’ve only heard not-so-good things. Especially with respect to shared hosting and mappings. With the features that Railo brings to the table it clears away a lot of the problems that seem to run rampant among CF shared hosts.

Given the structure of Railo you could set it up so that each account has their own web context(s) that they control while the host controls the global administrator. Or, depending on the hosting solution (such as media temple’s grid server where this blog is hosted), they could give you a fully working set of the Railo Administrator where you can have your own global administrator along with web context administrators.

Cascading Scope

One of my pet peves is code that doesn’t use explicit scoping. To me it is very inefficient and confusing not to know where the variables are coming from. I was very happy to hear that there is a setting to turn off the cascading scope functionality in Railo. If your code doesn’t know what to do it dies and tells you it can’t find the variable. Go encapsulation!

In Review

To sum it all up, I am excited to try out and hopefully contribute to the Railo project when it is released into the open source world.  It’s definately something that has an awesome potential to help expand the ColdFusion community, along with Open Blue Dragon, to those who complain about ColdFusion not being free. I look forward to great things from Railo.

Jul 08

ColdFusion 8... can\'t you just download it?!? A case?!?Wow, i hadn’t realized how close in version numbers the two things are…

I was thinking today of how many crazy things that I try to do, how many of them don’t work, and how many of them I don’t share when they do. So today I attempt to share a successful install of ColdFusion 8 (developer version) on my Ubuntu 8.04 64-bit box.

For this installation I am going to connect it to my apache 2 installation. So if you do not have apache or do not want to connect it to apache then just skip that part.

To start off I downloaded the coldfusion-801-lin64.bin file from Adobe.

Once I had the file I made it executable:

$ sudo chmod +x coldfusion-801-lin64.bin

Now it is time to run the installer:

$ sudo ./coldfusion-801-lin64.bin

At first the installer extracts the files for installation then brings up the menu to select the locale. I speak only english so luckily there was the option for english.

Next they give you a nice introduction telling you that you are installing ColdFusion and you can go back in the installer by typing ‘back’ and you can exit the installer by typing ‘quit’. ( I pressed ‘enter’. )

Next we go through the wonderful License Agreement for using ColdFusion. You should probably read it, but since I am only installing the developer version I didn’t pay much attention and pressed enter a lot until I got to the question of if I accept. Then I pressed ‘Y’ and ‘enter’.

Next the installer goes through a pre-installation check to see if your computer has everything that is needed by ColdFusion. My box unfortunately pulled up a warning telling me:

The installer was unable to determine if libstdc++.so.5 is available. The library is necessary for C++ custom tags, webservices and some cfimage functionality to work properly.

When I checked my packages I have libstdc++6 installed. I’m no linux guru, just trying to learn more about it, but I continued the installation in spite of the warning. I’ll write a new post later if this comes back to bite me. So I pressed ‘enter’ and ignored the warning.

For my wonderful installation attempt I chose to select the Developer Edition since I am not rich and this is only for local development anyways. If you are rich, or want to install any of the other options, go ahead, I just may not have the same options that you do.

Next it asks for the installer configuration that I would like to use. At first I thought that I would like to go with the multi-server install, but I have tried playing around with it in the past and it just seemed overkill for what I wanted to do for my development so I chose to do just a regular ’server configuration’. I also found it interesting they decided to include a second semi-colon on this menu, adds a nice touch.

Ofttimes it doesn’t do well to have ColdFusion already installed and install it again. So the next step asks to make sure you don’t already have ColdFusion installed. I do not so i answer no.

The next part is where you get to do whatever set of addons you want. For my install I did not want the documentation since I use livedocs, and I didn’t want LiveCycle and Search Services since they would be overkill and overhead. I also removed the option to start ColdFusion on system init since I am not always developing on it and plan on having a bash script to start it up and shut it down when needed.

I went with the default for the install directory ( /opt/coldfusion8 ). I have no reason to change it and don’t know enough about linux to slap myself for doing it.

No previous version of ColdFusion installed so the next option was a no.

Configuring webservers is what I have had the most trouble with while trying to install ColdFusion before so I’ll see if I can get it right. I selected  the ‘Add Web Server Configuration’ option to try and attach it to apache.

I am running apache so I selected the ‘Apache’ option.

If you would like a handy reference for where your files are for apache check out this post from the crumb.

Next it asks for the directory that contains the httpd.conf file. On this box that the path is:

/etc/apache2

Next is asked for the binary file for apache:

/usr/sbin/apache2

And for the control file used to start and stop apache:

/usr/sbin/apache2ctl

Next it shows the menu about web server configuration. But since I have done my damage I just tell it to ‘Continue with Installation’.

For the administrator location I chose ‘/var/www’ so that it is out there where I can get to it without a lot of changes.

The runtime user is something that I wasn’t sure of, but one of my sys-admin friends told me to use the www-data user for it so that is what i used.

My password for my home dev server I put as ‘1d10t’. And if you want to buy some nice insurance I know a guy….

RDS is one of those things that you hear about… but just never used. At least it is for me. So this time I am going to try out the RDS option this time and see what it can do for me. For that password I chose ‘t01d1′.

Now it shows the installation summary of what it is about to do.

Installation Type:
Server configuration

Licensing:
Developer Edition

Installation Directories:
Product: /opt/coldfusion8
Web root: /var/www

Server Information:
Web Server: Apache (/etc/apache2)
Port:
Search Services: not installed
Adobe LiveCycle Data Services ES: not installed
Documentation: not installed
RDS: enabled

Disk Space Information (for Installation Target):
Required: 432,138,779 bytes
Available: 198,957,346,816 bytes

Press enter and it whirls away in ASCII to install your ColdFusion 8 server.

Yeah:

You have successfully completed the first step in installing Adobe ColdFusion 8.

To continue with your installation, go to /opt/coldfusion8/bin and type "./coldfusion start" to start your server.

Once the server, is started log in to the Configuration Wizard at http://[machinename]/CFIDE/administrator/index.cfm

Next to see if the ColdFusion server will startup.

$ cd /opt/coldfusion8/bin
$ sudo ./coldfusion start

From past experience if I don’t start the Coldfusion service as root it gives me some strange errors and things do not work right. So here i just told it to startup as root from the beginning.

Starting ColdFusion 8...
The ColdFusion 8 server is starting up and will be available shortly.
======================================================================
Running the ColdFusion 8 connector wizard
======================================================================
Configuring the web server connector (Launched on the first run of the ColdFusion 8 start script)
Running apache connector wizard...
Connector installation succeeded for apache
======================================================================
ColdFusion 8 has been started.
ColdFusion 8 will write logs to /opt/coldfusion8/logs/cfserver.log
======================================================================

Now to test it out. I loaded up my localhost/CFIDE/administrator/ and it pulls up the coldfusion administrator. Looks good to me. Went through the administrator and setup a couple of things, tested out a cfm page in the root. All seems to be working well… good job Adobe.