Creating Remoting channels at runtime in ColdFusion
In a recent project I had to dynamically create a Flex Remoting endpoint (Channels) at runtime in the embedded BlazeDS of ColdFusion (this was due to the fact that we did not wanted the customer to mess around with the services-config.xml file).
By default, the "ColdFusion" Remoting destination only uses a non-secure AMFChannel but we wanted to use the SecureAMFChannel on that destination as well. Usually, you'd need to edit the remoting-config.xml file, add the "my-cfamf-secure" channel to the list of channels for the "ColdFusion" destination and then restart the server. With runtime channel configuration, you can just add (or even remove) channels at runtime with no server restart. Actually, you can do anything you want as long as the BlazeDS API supports it.
In my case, I use the onApplicationStart methode of the Application.cfc to call the configureChannels method which will add the existing "my-cfamf-secure" channel to the "ColdFusion" endpoint in case it has not been done already:
<cffunction name="configureChannels" returntype="void" access="private"> <cfscript> var cls = createObject("java", "flex.messaging.MessageBroker"); var broker = cls.getMessageBroker(javacast("null", "")); var service = broker.getService("remoting-service"); if (service.getDefaultChannels().size() == 1) { service.addDefaultChannel("my-cfamf-secure"); } destination = service.getDestination("ColdFusion"); if (destination.getChannels().size() == 1) { destination.addChannel("my-cfamf-secure"); } </cfscript> </cffunction>
CFLOOP: undocumented charset attribute for reading files
ColdFusion 8 introduced a new feature which allows to use CFLOOP to read in a file line by line. This is a nice convenience method but I noticed that by default CFLOOP in this mode always uses iso-8859-1 encoding to read the file's content which of course causes trouble when the encoding of the file is e.g. utf-8. By accident I found that there's an undocumented attribute on the CFLOOP tag to set the charset to use when reading in a file:
I had a hard time configuring SSL on my local CF8 running with the integrated JRun (Developer Edition). I followed the common instructions for enabling SSL on CF (like here and here) but in the end I always kept getting strange error messages like "sec_error_bad_signature" in the browser when I accessed CF via https.
Finally, I found that the error was related to the Java JRE. When I switched the JRE from the one shipping with CF8 (1.6.0_04-b12) to a Java 5 JRE ( 1.5.0_16-b02) the error went away and SSL works like a charm. I'm not yet sure if this is a bug in the JRE or CF8 but for my testing purposes it's just fine now.
Pass CF Array as serialized ArrayCollection from CF to Flex
UPDATE: Sorry, my assumption was plain wrong. See my comment in the Comments section.
By default, a CF Array is serialized to a native Flash Array when when using AMF3/Remoting between Flex and CF. If you want to pass a CF Array directly as an ArrayCollection to Flex instead of wrapping in into an ArrayCollection on the Flex client side, then just wrap the CF Array into a java.util.ArrayList in your CFC:
Distinguish between Flex Remoting and "normal" HTTP requests in ColdFusion
After a lot of Flex and Java coding I'm currently doing a CF/Flex project again. I haven't really touched CF for quite some time and decided to use ColdSpring in this project just for getting an idea of it. I've used Spring in my past Java projects and wanted to get a feeling for ColdSpring - and it really rocks! Make sure to check it out!
One thing I remembered from my past Flex/CF projects was that it always was not that easy to build a CF backend that can both serve Flex clients with AMF over HTTP (i.e. Remoting) and "normal" HTTP clients (standard-browser-HTML-you-know-what-I-mean). For example, the error handling is a bit difficult as you want CF runtime exceptions to get transported back to Flex clients as FaultEvents but for HTML clients you want a nice HTML output with error information. I never found a decent solution for this... until now :) Sometimes it is good to change perspectives (or to switch languages).
In the past Java projects we either used BlazeDS or LC on the backend side. The server side API offers a broad set of ways to access the incoming HTTP requests and the AMF payload. A main class in the BlazeDS and LCDS API to access all that information is the flex.messaging.FlexContext class. The idea is quite simle: in your server side Java code you can use the FlexContext class to get the current client (wrapped in a FlexClient object), the sessions (wrappers around the HTTPSession) and so on. So to check if a method was called from a Flex client you just have to check if FlexContext.getFlexClient() is != null.
Thanks to the fact that CF8 uses the same (or parts of) server side Flex API to implement the Flex <-> CF Remoting infrastructure you can also use the same method in your CFCs making it *much* easier to distinguish between Flex and HTML-client requests. A simple example goes like this - it could be used inside your Application.cfc's onError method:
<cfset var ctx = createObject("java", "flex.messaging.FlexContext")> <cfif ctx.getFlexClient() neq ""> <!--- this is a request from a Flex cliet ---> ... <cfelse> <!--- this is a standard http request ---> ... </cfif>
For some reason, the session description for my session "Building a CRM system using ColdFusion, Flex and LiveCycle Data Services" is not online anymore so I had to enter it again. In case it does not show up at the MAX site here it is:
Learn how to combine the power of Flex, ColdFusion and LiveCycle Data Services to create a feature-rich, innovative CRM system. This session talks about the lessons learned during the development cycle of a feature-rich, innovative CRM system and gives you in-depth information on how to tackle CRM specific requirements.
So - if you want to know how to successfully combine Flex, ColdFusion and LCDS (and what problems occured during development) be my guest on Tuesday from 4-5pm!
Sven and I will be speaking at MAX Europe in Barcelona - I'm sure this will be great fun!
Sven's session is "Introduction to LiveCycle Data Services for Flex Developers" and will show the great fetaures the LiveCycle Data Services have to offer. Sven did a similar session last year at MAX Las Vegas.
My session is "Building a CRM system using ColdFusion, Flex and LiveCycle Data Services" where I'll give in-depth tips and tricks on how to marry Flex 2, ColdFusion 8 and LCDS.
Sending messages from CF8 to Flex 2 and vice versa
A very cool new feature in ColdFusion 8 is the ability to send messages from a Flex 2 client to a CFC and vice versa by using the new DataServicesMessaging Event Gateway in CF8 over the real time RTMP protocol. This is possible because CF8 adds a Service Adapter to LiveCycle Data Services 2.5 (which you can now install as an integrated web application inside CF8).
Sending a message from Flex 2 to a CFC is as simple as creating a new DataServicesMessaging Gateway instance and assign it a CFC that handles the message. The CFC (in its simplest form) just needs to implement a onIncomingMessage method. In your Flex 2 client you then create a new Producer instance and set the destination to ColdFusionGateway (the default name as configured in LCDS' messaging-config.xml file). Finally, you create a new AsyncMessage instance in Flex, add the Gateway's ID to the header and send it away. This will invoke the CFC's onIncomingMessage
To send a message from any CFC or CFML page to Flex clients you just send a Struct (including a DESTINATION and BODY field) to the Adpater using the SendGatewayMessage() method including the Gateway's ID - that's it! A great feature and super-easy to use!
The best thing is that Event Gateways are now also available in CF8 Standard - you do not need an Enterprise license for it anymore!
Finally... it turned out that it was neither an issue with Flash Player 9 nor with ColdFusion MX 7.02 but with the firewall configuration (*ouch*). The firewall's integrated intrusion protection system filetered out the potential security risk - although an XDP file itself will never be harmful the IPS just found the <script/> sequence and stopped the HTTP request. So sorry for the noise - File uploads work fine in FP 9 and of course also in CF7 :)
After some more testing it turns out as if not Flash Player is causing the upload problems but ColdFusion MX 7.02 - we found this as we tested the application with the new ColdFusion 8 version and there the upload works just fine. In ColdFusion 7 neither an upload with Flash Player nor with a simple HTML upload form works as soon as a <script>...</script> sequence is present in the file.
Using CF 8 is not an option in our project however as we need to deploy on Solaris 8 which is not a supported platform for CF8. Any ideas on how to workaround this bug in CF 7 are highly appreciated!
Yes - sounds funny but it is true. I tried to generate a report from a CFR file (a report file created with ColdFusion Report Builder) today and received tons of exceptions. In one of the exceptions I stumbled across the fact that the stacktrace showed line numbes from inside the CFR file - and even more interestingly some weird looking method signatures like:
cfReport2ecfc332043841$funcGETCHARTDATA_0GENERATEDQUERY_0.runFunction(...) which looked pretty similar to plain old CFC stacktraces.
So I renamed my Report.cfr file to Report.cfc and tried to instantiante it by using createObject() on it - and it works :) Don't know if that's of any use for any of you but you never know!
UPDATE: hmm - one interesting method that is available after you created an instance of the CFR/CFC is the getReportXML() method. Seems to return a XML structure that is used by the underlying JasperReports engine to create the report.
In case you did not know, here's how to loop over a CFQUERY object in CFSCRIPT (the same as using cfloop to loop over it). In case the query is called bla then looping over it goes like this:
while (bla.next()) { p = createObject("Java", "de.richinternet.utils.Person"); p.setLastname(bla.lastname); p.setFirstname(bla.firstname); ArrayAppend(a, p); }
Now that Flex 2 is around the corner (according to some sources) we're pleased to announce our new blog Flexperten.
This blog is especially targeted towards our German readership and so we'll blog in German only there. We'll focus on Flex and CF on the new blog and will bring you tips & tricks, tutorials and other useful information.
Btw: this does not mean that richinternet.blog will be discontinued - we just want to add some momentum to the German Flex community and hope that you'll like it :)
There's not too much content there yet and still only default styling etc. but we'll add new stiff within the next days so stay tuned!
CF/FlexBuilder 2 Application Generation Wizard Available
The CF/FlexBuilder 2 Application Generation Wizard is available at labs.adobe.com, it's included in the latest drop of the CF Extensions for Flex Builder. To get an overview of the great feature set check out this 11 minute demo Damon Cooper put on his blog. Pretty neat stuff.
Cool: Damon Cooper has some news about the Rapid Application Development Wizard the ColdFusion team is currently working on:
We're currently putting the final touches on the ColdFusion / Flex 2 DB Application Generation Wizard, and we hope to refresh the CF / FlexBuilder 2 plugins soon to add this exciting functionality that will bring hyper-RAD productivity to ColdFusion customers using FlexBuilder 2, to dramatically jump-start Flex 2 /CF DB application RIA construction.
ColdFusion 7.01 Clustering ... missing attribute in JRUN.XML
If you install ColdFusion 7.01 with the Multi-Server Option (JRun4 with ColdFusion automatically deployed to JRun4) and you want to cluster ColdFusion Instances you will find out, that your Cluster, after you have defined it in the ColdFusion Cluster Manager, is not recognized by the Webserver Connectior (wsconfig.jar). This is because there is a parameter missing in the jrun.xml of each ColdFusion Instance. So search for the jrun.xml. Inside the ProxyServer-Section add the Parameter "bindToJNDI" which is not there by default:
Artur wasn't idle and has released three new "Pimp my Flash Form" articles. The coolest bit is a CustomTags that allow you to use the Slider control inside a CF Flash Form :)
Very nice: Artur has just released his first "Pimp my Flash Form" article. He really got down to the guts of ColdFusion's CFForm tag and explains how to use the Flex 1.5 RemoteObject tag inside CFForm :)
I've often been asked how to best pass complex objects to Flex 1.5 while enforcing automatic type mapping between the CF and the Flex side. Due to the typeless nature of CF there isn't a built-in way to get this working in CF 6/7 and Flex 1.5 (of course, the next CF updater codenamed "Mystic" introduces a better way to map CFCs to AS classes but targets CF 7 and Flex 2). I've already posted a working approach here - however, the _remoteClass field usage is deprecated in Flex 1.5 and introduces several drawbacks during deserialization.
We've used the following approach in several projects and it worked out quite well:
To return a typed object from CF to Flex:
inside a CFC method create a new instance of flashgateway.io.ASObject
set the type of the object (see below)
fill the object with data
for nested objects, repeat the above
return the object
in Flex, create a mapping between the type set above and the AS class
Ok, here's a simple example - first, the CFC method "getPerson" which should return a Person value object:
class foo.bar.Person { public var firstName:String; public var lastName:String;
private static var rc:Boolean = Object.registerClass("Person", foo.bar.Person);
public function toString():String { return "My name is " + firstName + " " + lastName"; }
}
This also mimics the way Flex 1.5 interacts with Java POJOs quite well - in theory you shouldn't have to bother if your Flex client is working against a CF or a generic Java backend
Force recompilation of external AS files in cfform
A major nuisance when using external AS classes inside a cfform is the fact that recompilation of the resulting SWF only takes place if you change the cfform itself - changing the external AS files/classes seems to has no effect.
The reason behind this is that the cfform engine uses the same caching as Flex 1.5 does - this means once a SWF is compiled, its bytecode is stored in the server's RAM, every new request only serves the compiled version. So, to get a fresh SWF for every request we simply have to disable caching.
The caching is configured in ColdFusion's web.xml file by assigning a Java Servlet Filter called CFCacheFilter to the CFSWFServlet Servlet (look for the <filter-mapping/> block at around line 66 in the default web.xml). To disable this mapping simple comment the according block in the web.xml and restart CF. Every cfform should now recompile by default.
Update: Another (less subtle) way to disable the caching is to set <content-size> to 0 inside the WEB-INF/cfform/flex-config.xml file (line 151)
Very nice: the fact that ColdFusion Flash Forms are generated by an embedded Flex 1.5 instance allows you to add your own ActionScript 2.0 classes to your CFForms project. Artur and I found this out while doing some CFForm stuff.
You simply need to modify the flex-config.xml file inside the [CFROOT]/WEB-INF/cfform directory (this file gets used by the embedded Flex server and is a stripped down version of the original Flex config file). To add your own code and class libraries simply define additional AS class paths. E.g. to add the directory D:\dev\asclasses open the config file and look out for the actionscript-classpath node:
<-- path locations of actionscript class files --> <actionscript-classpath> <path-element>D:\dev\asclasses</path-element> </actionscript-classpath>
The best thing: classes linked in this way aren't restricted - you can happily create new instances by using new inside external AS 2.0 classes :)
Ok, here are some questions for you: Are you a Flex developer? Are you also a ColdFusion developer? Are you calling CFCs from Flex as RemoteObjects? Are you using the Flex Trace Panel? Have you ever thought about how cool it would be to have something like the Flex Trace Panel for ColdFusion? Something that works like cfdump but displays the dump in a standalone window? Especially when trying to debug Flex-->CFC calls and there's no way to cfdump because there's simply no browser window to display the dump...?
If you're still reading this post then you probably answered every question with "YES!!!" - which is good. I'm currently creating a tool that does all this and I hope to put it online by the end of the week. So stay tuned!
So has anyone made some experiences with more SQLServer performance or with the Connection Fail-over-Retry so far??
Release 3.4:
All Drivers
Connection Fail-over Retry – The drivers continue to retry servers until they connect. System recovery is an example of where this is useful. If the server is not available when the application tries to connect, the driver waits and retries the connection again.
Client Side Load Balancing - Allows the driver to randomly connect to one of the servers in the servers list to balance the load on the servers. This prevents the driver from always connecting to the first server in the fail-over list and distributes the load more evenly.
Improved Diagnostics - Allows users more flexibility and ease of use for DataDirect Spy, which is a diagnostic utility included to trace calls in running programs.
Enhanced Parameter MetaData support – For database servers that do not provide parameter metadata information, the driver will provide the parameter metadata for simple inserts and updates. (SQLServer, Oracle, DB2 v7.x for Unix, Windows and Linux and DB2 v5R1 and v4R5 for AS/400 would make use of this functionality).
Get and set client information on a Connection – Useful in Application Server environment and other environments that use Connection Pools shared amongst applications.
Using Remoting with Flex and ColdFusion CFCs - Part 1
Finally, here's the first part of a series of articles about Flex/CF interconnectivity. This first part explains how to use CFCs as named and unnamed RemoteObjects.
Ok, here's a little anecdote concerning the Adobe/Macromedia acquisition:
Back in the late 80s, a small company in Richardson, Texas called Altsys developed an illustration program called FreeHand. Freehand was licensed to another company called Aldus and Aldus published and sold FreeHand for quite some time.
In September 1994 Aldus was taken over by Adobe. Altsys was afraid that Adobe would drop Freehand in favour of their own Illustrator product so Altsys filed suit against Aldus to take FreeHand back. Finally, marketing rights to FreeHand got back to Altsys. Shortly after (in 1995), Macromedia bought Altsys - and FreeHand.
Adobe aquires Macromedia! I'd never thought of that before - and still I can't see how this fits together. Ok, Adobe and Macromedia have been competitors for years in the graphics/tools market but how do the mobile and server solutions fit in here?
So I'm gonna use Adobe ColdFusion and Adobe Flex 2.0 in a couple of months... strange. Also, what will this mean to the competing technologies FlashPaper/PDF, Flash/SVG, Dreamweaver/GoLive?
Here's some more information I found quite useful:
MM says that in CFMX 7 there already is the Updater 5 of JRun included. But my CFMX7 J2EE Installation of JRun has the build number 91015. So the JRun 4 Version in CFMX7 is just between JRun Updater 4 and Updater 5 ... what ever that means.
Using Remoting with Flex and ColdFusion CFCs (introduction)
I've decided to write a series of articles on how to use the Flex RemoteObject servicetag to invoke ColdFusion CFCs and to exchange data between both systems. Every few days a Flex/CFC related question pops up on the flexcoders list so I thought it's time to do something about it :)
I haven't created an outline for this series of articles yet but the topics I'd like to include are:
setting up the RemoteObject tag to call CFCs
building and calling a facade.cfc that delegates calls
Dreamweaver extensions for CFMX 7 support breaks Flex Builder 1.5 code hinting
Beware if you're planning to download and install the updated Dreamwever MX 2004 extension that adds code hinting support for ColdFusion MX 7 when you've got Flex Builder 1.5 installed. For some reason, the extension also gets added to Flex Builder (at least on my machine) and breaks some of the MXML/AS 2.0 code hinting.
Make sure to backup your FB configuration before you're applying this update so you can roll it back if it gets corrupted, too.
Here's something for your pleasure: it is possible to invoke a CFC as a RemoteObject and to take advantage of the built-in mechanism in Flex that creates instances of a custom AS 2.0 class during deserialization. This way you can pass over structs from your CF application and have them automatically mapped to your client side AS 2.0 classes
I've put together a little example that shows this technique. Basically, you only have to make sure that the struct you're passing over the wire contains a "field" (i.e. a key) called _remoteClass - pretty much the same as when you're invoking POJO's with Flex. The example invokes a CFC that returns an array of structs. Every struct contains a key called _remoteClass that contains the name of the AS 2.0 class to use for deserialization on the client side.
Adjust the number of objects to create by using the NumericStepper and hit the "invoke" button. The result is rendered in the List control (by taking advantage of a implicit getter function called "label" that's defined in the custom AS 2.0 class). Selecting an item in the List calls the toString method of the current item and renders the text in the Label control.
Edit: if you want to return CFC instances rather than structs then you'll have to change the static property FLEX_CLASS_FIELD of the mx.utils.ClassUtil class to "_REMOTECLASS". Additionally, all members of the AS 2.0 class should be written in uppercase.
Cumulative Security Patches for JRun and ColdFusion MX 6.1
Macromedia has released two cumulative patches for JRun and ColdFusion yesterday, both are categorized as being critical. Release notes and installation instructions:
It's there: Tim Buntel just announced the start of the ColdFusion Blackstone beta program - according to his article you can still apply for becoming a beta tester. The release date for Blackstone is announced to be in "early 2005" - I would interpret this as "within the first 3 months" so I bet there's still a good chance to get into the beta club.
If you haven't had the chance to take a look at the next ColdFusion release (codenamed "Blackstone") during one of live presentations then check out this article.
You might wonder why those "Rich Forms" look so Flex'ish? Well, unfortunately I cannot quote anything official here... ;-)
Performance Problems with IIS6 and ColdFusion MX 6.1 / JRun 4 under heavy load solved
We have had big problems with the IIS6 and ColdFusion MX 6.1 /JRun 4 under a heavy load condition. Over the past two days we have made lots of load tests ... so here are the results:
ColdFusion MX 6.1 is actually based on JRun Updater 2. We have downloaded JRun Updater 3 and used the wsconfig.jar (this is the file which installs and includes all the WebServer Connector stuff).
Under load in our environment the JRun Connector to IIS6 usually has a processor load from 50 to 60%. But during that load test I noticed, that sometimes (after intervalls of 30 min.) the processor gets down to 0% for up to 5 min. After that it goes up again to 50 and 60% and everything is fine again.
After contacting the Macromedia Support, they told me the following: "If you'd like, you can use the latest QAed JRun updater available at XXX. This is a non-public update for JRun (meaning it hasn't been generally released) but it has been fully tested and is fully supported."
So I downloaded that "JRun Updater 3plus" and extracted the wsconfig.jar which has a much more higher version number. Again I started my load test. The Prozessor load for IIS6 is 50 to 60% again. But now the prozessor only gets down to 0% after intervalls of 30 min. just for one second or two and then up to 50 and 60% again. So with that new wsconfig.jar the problem seems to be solved.
So thanks to John Cummings from Macromedia Support for that help.
Did you know that ColdFusion Verity CFSearch-Tag is limited to 64K Resultsetsize
We have had lots of trouble with the Verity Searchengine included in ColdFusion MX with very large Datavolumes. We tried to index 12.000 Word, PDF, HTML and Excel Files - thats about 4 GB Data.
We solved the problems and know it works. A funny thing was, that we tried to test the Verity Index with CFSearch by searching for * and we alway wondered why we did not get a result set.
Ok, the answer is: The CFSEARCH is limited to 64K results but in reality (in my tests), it means that you could only have 8192 results (8192 * 13bytes = 64Kb).
So I am planning to write down my Verity experiences especially with MKVDK in the "Ultimate Guide to ColdFusion Verity", anyone interested in that Guide?
In addition to that I have added some notes and a specific scenario. In this specific scenario I do not use ColdFusion Session Variables because in a Cluster Environment I think it is better to put that kind of information in the database and write your own kind of session management …
Forcing exact case when returning structures from a CFC
Structure identifiers (i.e. keys in an assosiative array) returned from a CFC are all UPPERCASE by default, a key called sessionID will be passed to the calling side as SESSIONID. This is extremely annoying if you are supposed to work with strict typed environments. Luckily, there's one way to pass the identifiers in mixed case also - just setup all keys initially inside the CFC with StructInsert(structure, "keyName", value, true) and you'll be fine. After this, it's save to set the key's value directly, the case will stay just as you wanted it.
<!--- create new structure ---> <cfset result=#StructNew()#> <!--- now add the key ---> <cfset tmp = #StructInsert(result, "sessionID", 0, true)#> <!--- no matter how you access it later, case will stay! ---> <cfset result.SEsSIoNiD = "12345"> <cfreturn result>
Dirk.
PS: maybe it's only a question of style but I definitely prefer strict typing.
This is not completely new and I found it in an other blog some times ago ... but it is an very important tip if you are working on Webservices with ColdFusion!
This one comes courtesy of David Stanten in Macromedia Product Support - If you have worked on webservices in CF you will run into a problem - when making a change to the signature of a webservice, there is no easy way to 'refresh' the webservice stubs created by CFMX if a developers doesn't have access to the administrator. I've also found that even if you manage to figure out the name of the directory containing a given webservices' stub files, you can't simply delete it without causing errors. (It seems some of these files are stored in memory). Anyhow, once again, the service factory comes to the rescue, with a funny named 'refreshWebService' function:
You can either pass the full path to your wsdl - or, if you've registered a name for the webservice through the administrator, pass that name to this refreshWebService function - i.e. <cfset RpcService.refreshWebService("dude")>
After refreshing your stubs, you're good to go ... AND ready to rock!
Just a little reminder that the company I work at organizes a whole day ColdFusion event on June 16th. The agenda is promising, topics are J2EE clustering, CFCs, WebServices and a short session on the differences between ColdFusion and Flex. A special highlight will be a Breeze Live session with ColdFusion guru Ben Forta.
Endlich - ColdFusion Hotfixes für Verity mit aktuellen Linux Versionen
Macromedia has created a hot fix for Verity to support additional versions of Linux. Verity is now supported with ColdFusion MX 6.1 on the following Linux versions:
Red Hat 7.2, 7.3, 8, 9
Red Hat AS 2.1, 3.0
Red Hat ES 2.1, 3.0
Suse 7.2, 7.3, 8.0
Das wurde ja auch mal endlich Zeit. Schliesslich konnte man ja eigentlich keinem Kunden wirklich klar machen, warum die Verity unter Linux nur bis Version 7.2 bei Red Hat und SuSe unterstützt wurde. Nun, mit diesem Hotfix werden wieder die aktuellen Versionen unterstützt und alles wird gut ...
Das CFEclipse Plugin für die Eclipse 3 Plattform ist in der Version 1.1.8 erhältlich. Neue Features sind unter anderem ein CFC Method Viewer, diverse Wizards für CFML/CFCs und erweiterte Snippets. So etwas wünsche ich mir für Flex!
BlackStone ist der Codename für die nächste Major Version von ColdFusion MX. Diese wurde bereits auf der MAX 2003 (Macromedia Entwickler Konferenz) im November 2003 in Salt Lake City mit einem potentiellen Erscheinungsdatum "im ersten Halbjahr 2004" angekündigt.
Ich denke das mit dem ersten Halbjahr wird nichts mehr ... aber die damals angekündigten Features lassen tolles vermuten, was ich inzwischen ... ZENSUR
Schwerpunkte werden wie damals bereits grob skizziert die folgenden sein:
Reporting und Erzeugen von PDFs / Flashpapers
CFFORMs-Zeugs auf Flash Basis (Flex läßt grüssen)
Anwendungsdeployment ohne CFM-Quellcode ... darauf warten wir alle schon seit Jahren
Technische Möglichkeiten beim Aufbau eines ColdFusion Clusters
Nachdem nun bekannt wurde, dass ClusterCats nicht mehr weiterentwickelt wird, existieren für ein ColdFusion MX Clustering auf Softwarebasis die folgenden Optionen:
JRun Cluster
Installation von CF-MX 6.1 Enterprise aus J2EE JRun Basis und dann Aufbau eines JRun Clusters. Das läuft super. Infos dazu unter beim Macromedia Support Spezialisten Brandon Purcell unter http://www.bpurcell.org/viewContent.cfm?ContentID=121. Es existiert ein WebServer, in den sich der JRun Connector einklingt und dann auf Round Robin Basis die Requests auf die entsprechenden JRun-Server im Cluster verteilt. Auch Failover bei den JRun Servern wird unterstützt, das einzige Problem ist dann nur, dass wenn der WebServer mit dem JRun Connector "abschmiert" gar nichts mehr geht, da dieser nicht geclustert ist.
WebServer Cluster
Man kann aber auch einen Cluster auf HTTP-Basis (WebServer-Basis) aufsetzen. Das konnte man bisher mit ClusterCats von Macromedia machen. Allerdings wird ClusterCats nicht mehr weiterentwickelt und unterstützt auch nicht mehr den IIS6 (Windows 2003) und Apache 2.x. Bei Windows 2003 Systemen kann man allerdings das von Microsoft mitgelieferte NLB Verfahren nehmen. Infos hierzu auch bei Brandon Purcell unter http://www.bpurcell.org/printcontent.cfm?contentID=131.
Programmatisches de- und aktivieren des Trusted Caches von CF-MX
Der Trusted Cache in CF-MX bringt einiges an Performance, da dann die die Überpüfung im Filesystem entfällt, ob die entsprechende CFM-Datei aktueller ist, als die im Cache befindliche. Daher sollte aus Performancegründen auf Produktionsservern, wo sich der Quellcode nicht mehr ändert oder nicht mehr so oft ändert in der Regel der Trusted Cache aktiviert werden. Normalerweise wird die de- und aktivierung des Trusted-Cache über den CF-Admin vorgenommen, in manchen Situationen möchte man es aber lieber programmatisch über ein Skript machen.