Rob Brooks-Bilson
Tech, Photography, Stuff
Tech, Photography, Stuff
May 14, 2008
A recent post on Brian Kotek's blog about future directions for ColdFusion sparked a lot of debate over whether or not ColdFusion should support AS3 server-side. I want to change the focus here a bit and talk about a feature I've been thinking about that would be potentially useful to a lot of people. I'd like to see ColdFusion 9 support deployment of various services across multiple JVMs - without having to have multiple instances of the full ColdFusion server.
Why would you want to do this? Let me lay out a few scenarios and see if this starts to make more sense. Imagine you have a ColdFusion application deployed on a 32-bit Windows server with 4 GB of memory. The ColdFusion application in question does a lot of XML manipulation and PDF document generation. If you've ever had a similar application in a similar environment, then you know that your ColdFusion application can really only make use of about 1.6 GB of RAM as that's a limit of the JVM on 32 bit platforms. You also know that both XML parsing and PDF document generation are very expensive operations, especially from a memory utilization perspective. Now imagine if you could configure your ColdFusion application such that it was able to off-load the PDF document generation and the XML parsing and transformation to separate JVMs. This would allow your core application to handle the majority of your application functionality while off-loading the processing intensive operations to separate specialized JVMs (as opposed to separate threads on the same JVM). The difference here is that the additional JVMs wouldn't require a full instance of the application server - just the specific processing parts that can be off-loaded. This is exactly how most Enterprise Service Buses deal with distributed processing and I think it would be a killer feature for ColdFusion to have in its bag of tricks.
Of course the benefit isn't limited to just memory limited JVM instances in 32 bit environments. In 64-bit environments, it makes just as much sense as you are still segmenting processing, allowing for better thread utilization, and potentially allowing you to scale out just the type of processing you need to.
What do you think? Does this make sense?
5/14/08 3:22 PM
I suppose the stand-alone CF install could have an option to run various services on a separate VM, but wouldn't it be out of CFs control on a J2EE install?
It's got some potential for images, pdfs and reports, and there are sort-of precedents (think Verity and Siteminder - oh sorry quick, stop thinking about Siteminder) but In regards to XML parsing the parsed XML structure would then have to be serialised and passed back to the main VM, where it would be deserialised, and that in itself would be almost if not just as expensive as the original parse.
Cheers,
Robin
5/14/08 3:27 PM
CF could still be in control, although most likely, something like JMS might be required to provide the communication.
My XML example might not have been the best example, but I can see instances where you have an XML doc that you want to transform. The 2nd jvm could do that, and if you were using jms, it would just be messaged back over.
5/15/08 1:20 PM
Rob, this totally makes sense. Since I've been scaling Dealerskins platform for about 2.5 years now, I have thought A LOT about this topic and topics very similar. Like other companies we have run into some issues with growing our infrastructure from a kind of grass roots approach to an enterprise system that can handle the growth of the company.
We've gone through the code optimization phases several times. I've been describing this process recently as taking a wet wash cloth and wringing out as much performance as possible. We've also taken the "throw more hardware at it" approach and sometimes that does help. However, much of what we have run across is reaching the RAM limitations of CF 8 on 32-bit Windows. We've created additional physical servers/instances and moved long running reports or statistical requests over to a dedicated instance. This works well but is difficult to manage, maintain, and code against.
Your idea of consuming additional RAM resources with some kind of linked JVM's is really really cool. I could use this approach in several places to provide enterprise level services and performance using current machine resources (think 32 GB RAM). This would also save money on hardware purchases and perhaps CF license purchases.
6/10/08 12:41 PM
I think this makes a lot more sense than adding ActionScript ... Are there actually features that would come with the AS3 addition? Don't get me wrong, I enjoy having ++ and implicit structures in CF8, but it's not actually a "feature" -- it just makes me feel good. I enjoy and appreciate the fact that it was added, but it wouldn't have been a selling point for me to choose ColdFusion as a technology if I were in the position of being a purchasing project manager. So I wonder if the AS3 suggestion would actually come with some kind of feature that a purchasing manager would see as a value-added (like your suggestion here) or if it's just more "feel good" syntax enhancement?