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.