Thank You Adobe!

The Adobe on Air Bus Tour was in Portland last night. It was a very exciting event. The bus crew did a great job presenting the unique opportunity that AIR gives both Flash and HTML developers to build cross-platform desktop application with their current skill-set.

I managed to answer a trivia question and get a bag of seven O'Reilly books! Add the 3 beers I had, the excellent catered food, the free training, and the networking opportunities and I have only one thing to say.

Thank you Adobe!

cf.Objective() Home Again, Home Again ...

Wow! I'm home from cf.Objective() 2007.

That is one fantastic conference. If you can't get your fix of enterprise level topics and valuable networking there, then I don't know what's wrong with you.

The sessions were great. Here is a handy link to all my session posts.

And I got to meet and even hang out with some of the absolute rock-stars of the ColdFusion community. All of them are very warm, friendly people too. I got to thank Ray, in person, for BlogCFC. I got to be there when Mark Drew revealed the CF_Frameworks Plugin for Eclipse.

I won't bore you with anymore details. I'll just say this:

Go to cf.Objective() 2008 if you can!

Oh, and I'd like to say thanks to Jared and all the people that made the conference happen. You guys are rock-stars too. Jared even has the leather pants to prove it!

cf.Objective() Sunday Keynote: Ben Forta

Good news. Adobe hearing from customers that they are feeling confident with CF and happy with the direction.

Developer Productivity: CF has been, and continues to be, way ahead of anything in the space in ease of implementation. What other technology has the ease of cfquery -> cfoutput.

Integration: Again, CF has had this going for it for several versions. ColdFusion 8 just adds even more points of integration. (A lot of it!)

AJAX Support:

  • Makes consuming CFCs for AJAX clients super easy.
  • ColdFusion AJAX Wizard (Similar to FLEX wizard) in Eclipse.
  • The AJAX debug panel I talked about the other day... Turns out you can use it to debug your existing AJAX projects. {big applause]
  • New JSON functions: isJSON(), serializeJSON(), and deSerializeJSON() [Love it!]

ColdFusion Debugger: There will be an actual debugger built in Eclipse. It has breakpoints, watch expressions, ... Ben says, "It's a full debugger". It looks really nice, you can actually run the code to be debugged from within Eclipse or from any other browser. [big applause]

Flex:

With Flex and CF and Flex Data Services, you can solve the problem of two people editing the same data. He shows a demo of two browser tabs with the same edit form. He changes the data in an input without even leaving the field. Then in the other tab, he changes the value in that field and saves. Back in the other tab, there is a prompt waiting. The prompt tells the user about the conflict and gives them a choice how to resolve it.

This currently requires you to write "assemblers" (can be a CFC). These CFCs have to conform to a specific API.

Now there is a wizard in Eclipse to create the CFCs for you.

In ColdFusion 8 this will be even better

  • You will now be able tell LCDS (formerly FDS), via a gateway, about records that are altered outside of the Flex/LCDS loop.
  • The assemblers can return queries directly from the fill function without converting each row to a VO.
  • Assemblers can use structs instead of CFCs. The structs can contain type info for Flex to use to identify the AS object type.
  • And the FDS integration will also be improved. Easier installer. Better CF integration. And there should be better performance.

AND ... ColdFusion 8 will be available mid 2007.

cf.Objective() Kelly Brown: JVM/ColdFusion Performance Tuning

I attended Kelly's session.

However, I am going to leave my notes from the session un-published. I'm sorry, but this topic is so loaded and unique to each companies situation (one of the points he made). I'm afraid someone would change some setting I mention and break their server.

However it is a topic worth looking into on your own. And when the Scorpio server monitoring stuff comes out, it will definitely be helpful in seeing what settings may need tweaking.

You may want to keep your eyes on Kelly's blog. He said he may put his slides up there.

cf.Objective() Sean Corfield: SOA

SOA: Service-Oriented Architecture

This will be interesting. There will be very little code because, Sean no longer works for Adobe. So, he has no access to the code that his team wrote...

What you need/ should have.

  • Data Dictionary
  • Service Directory
  • SaaS (Service as a Service)

Why would you do SOA?

IDC predicts a compound growth rate of 20% per annum for SaaS. That means that there is money to be made.

What does SOA Applications look like?

They will usually be a combination of Local Code and Remote code.

Typically MVC or MVP (Model View Presenter) So, you would have local code for the View and Controller. And you'd have a Service Locator to expose the remote Services.

ColdFusion is a great choice for SOA because it has such good support for the different protocals that you would access remote services.

How is SOA different?

They are Client-Server by definition.

The software consuming the service becomes the client. This is different than what we are used to with the browser being the client.

Often the "client" will not have any sense of session. So, don't rely on session, cookie or client scope. In fact, you may need to turn session management off to avoid creating orphaned sessions every time your service is hit.

So, session management will have to be basically hand-coded. You will need your own authentication. You may have server clusters, so you would need to store authenticated clients in a database server.

Also, beware of call and return types. Different clients will have support for different ranges of data types. Most of them will have support for the simple data types. Query data type is probably a no-no for most non-CF clients. Un-types stucts may be a problem too. Typed "structs" are good and involve using CFCs with cfproperty that only contain data. XML is also a good choice. And JSON is building momentum.

You could also check out Sean's REST Adapter. It wraps remote CFC API in simple XML.

Gotchas:

API:
Your API, once released is a contract with your clients. You want to be sure you have locked in your API. Then, you will have to be extremely careful with any changes. In fact, if you make any changes to your API, you may need to provide new end-points to your consumers and support both versions for a grace-period.

Exceptions:
You should consider returning success/failure as a root node in whatever packet you are sending to the clients. Then, you may want to send back a result code, that could be translated by any client and into any language.

Clustering and Caching:
Each member of a cluster has it's own cache. So, you will need to keep caches across servers in sync.

Testing:

Sean says, "Write an extensive suite of tests". And make running them part of your development habits. There are tools to help, like cfcUnit. And you can even automate cfcUnit in Eclipse with an ANT task.

Also, check out Cruise Control. It can automate testing by watching your version control repository and deploying code to a test server and running tests when you check code in.

cf.Objective() Adam Lehman: Scorpio Server Monitoring

This to me is one of the best features in CF (8?).

With the tracking turned on it collects a sick amount of metrics. You can see requests. You can see all the memory scopes. You can drill down into the scopes.

There is a page for looking at Cumulative Server Usage. This is very cool! It will keep track of templates and what percentage of the over all server time they use. So, you'll know what templates could benefit from tuning.

There are memory usage charts that show you how much memory is used over time broken down by scope. Then you can see things like the average memory usage per session. There's another page in this section that will show you how much ram the average request takes.

There's reporting that shows memory size for queries that you can can use to optimize block factor. I need to look into this one...

Oh, not monitoring related. But, you can now use cfqueryparam and the CF caching mechanism. Yeah, you read that right.

Andrew also shows a report where you can see the most commonly run queries. Again, this will help us know where we can best spend our tuning efforts.

Scorpio supports "Alerts". These are very configurable. Basically, you might set an alert when the majority of your threads have been tied up for a determined time. Then the server will do what you tell it while the server is under that condition.

Things it might do:

  • It can send you an email.
  • It can dump a snapshot (for use later determining what went wrong).
  • It can quit responding to request until things get under control.
  • Or it can just kill threads running above a threshold.
  • It can call a CFC. It will call "onAlertStart()" start as soon as you hit your threshold and "onAlertEnd()" when it has passed.

The overhead for the detailed monitoring is about 16% currently. So, you probably won't leave it on all the time. Later he specified that you can turn on only parts of the monitoring. So, you can lower the overhead by, say, turning off Memory Tracking.

However, you can do a multi-server monitoring panel that has very low overhead. This just shows you that the servers are fine or if they are in Alert mode. When they go into Alert mode, then you can pop open the monitoring and look for rogue threads.

If you application has even moderate traffic, you will love this!

More Entries

BlogCFC was created by Raymond Camden. This blog is running version 5.6.002.