The beds at the Sofitel almost made me miss my first session.
Matt Woodward: OO Architecture Back to Front
The focus of this session was developing OO architectures starting at the database and moving forward. Matt Woodward started with a quick overview of OO. One of the best things he explained was that all of the layers of an OO application serve to increase the coupling and decrease the cohesion of your application. He went over a few basic patterns like DAO, Gateways, Beans, etc, and a few layers like service, business, controller etc.
Interesting tips and pointers
- You want to do multiple layers of validation.
- Server side validation should probably live in the bean.
This was a really good presentation about the whys and wherefores of the multiple layer development style. He’s going to post it up on his site. Definitely check it out if you get a chance. It would be a good tool to explain this stuff to others.
Steve Rittler: Using the Adobe Flex Toolkit for Apex
Steve Rittler’s session wasn’t announced. Being a fellow Philly ColdFusion guy, I figured I would give him some support. But it was so far outside my bailiwick that I figured I would be better served going to another session.
So I wandered into Adam Lehman’s session.
Adam Lehman: Scorpio: Diagnostic Server Monitoring and Realtime Performance Alerts
Adam went over the server monitor, showing off what it could do.
He started with an overview of how this tool could be used in development. Since the server monitor shows how much memory all of your scopes are taking up, you can figure out the capacity of your application on your server. Very cool.
- The server monitor has a force garbage collection button
- Reports show the effectiveness of the query cache
- You can see how the database connection pool is being used and queued
- Configurable alerts so you can be notified if there are speed or responsiveness problems
- Alerts can take snapshot dumps of the environment for troubleshooting after the fact
- Configurable actions you can map to alert items. Like killing threads, or stop accepting requests
- Multiserver monitoring panel will allow you to see status of all your ColdFusion servers at once
Sean Corfield: Real World SOA: Building Services With ColdSpring and Transfer
Despite persistent rumors that he was an impostor, Sean Corfield took the stage to talk about Real World SOA’s. SOA’s = API’s is a good way to think about this stuff. Things have to be done differently. Sean went over these difference.
SOA is about more than services. You need to have clearly defined data. Basically you need to agree on the same semantics when you talk about data, and the same components. For the most part you really have to document these applications, and then actually make this information available.
Software as a Service (SaaS) is growing as a market at 20 per year. SOA’s are the backbone of SaaS.
Separation of concerns is very important to be doing this type of application. The future of this space will be light application that call SOA’s that don’t have their own view or controller. These SOA’s are all Model.
Don’t rely on client scopes
- In fact turn the session scope off in your application
- Create some sort of token handling using a persistent store (database)
Remember that ColdFusion makes data easy to manage
- Other technologies don’t handle Queries
- Keep data types simple
- Typed structs are good
- You actually might need to use the This scope and <cfproperty>
- Sean has made a Rest adapter, you can download at his site.
You don’t want to just set access=Remote on your entire business layer.
- Build a remote api instead
- Might need to build API’s for multiple technology
- Unit Testing is necessary
Exceptions need to be handled differently
- Fail gracefully
- Return structured error message with fault indicator
- Make sure that you throw codes along with text (because of internationalization.)
- Clustering and Caching is a challenge
Tools to use:
- Manages the CFC’s
- Manages Transfer
- Manages the database
- Handles all of the persistence of the application.
- Write tests
- Automate tests
What worked well
- Unit Testing
- Managing the CFC’s and database with ColdSpring and Transfer
- Automated builds
- Cruise Control
What went not so good
- Using an old model for new work
- Too many endpoints in the exposed API
- Not enough unit testing
Simeon Bateman: Fusebox the Original ColdFusion Framework
Simeon Bateman thinks that you should be using a framework, even your own. But he thinks that Fusebox is the best. I decided to go to this because some bad Fusebox code was what originally made me dislike Frameworks. Now that I’ve come around I figured I would give it another look.
Simeon took us from the beginning of Fusebox to the current day.
It was basically a good introduction to Fusebox. I had no interest in using Fusebox before this session; I now want to give it a try.
I had a lull between sessions I wanted to attend. Evidently Jason Delmore’s wife told him that I said I was annoyed with him yesterday. Poop. I didn’t want to do that. I was mostly happy with what he had to say. There was much more positive than negative.
Additionally, Jason also helped saved someone’s life yesterday, He was a total hero! He has that going for him.
Kelly Brown: JVM Server Tuning
I finished up the day with the very geeky JVM session with Kelly Brown. It was altered into a ColdFusion Performance Tuning session. I guess he extended it beyond where he initially intended it.
Concepts he went over:
- Trusted Cache
Deleting saved class files
- Finding them can be slower than compiling
- Dependent on hardware and size of site
- A lot of these are tough because you control the number of items not size of memory footprint.
Maximum Number of cached template
- Too high – runn out of memory
- Too low – performance issues
- Maximun number of cached queries
Session and application scope
- Session’s can be wrecked by search engines so watch OnSessionStart
- Mail and Charting can be cached too.
- You can change the memory footprint of the JVM
- Jvm.config is where you can set a whole bunch of settings.
Change the JVM’s JDK to improve performance.
- Certified to 1.4.2_11.
- Rumors of 1.4.2_13
Max Heap Size:
- 512mb default to low number of Gb depending on platform.
- If you are seeing memory errors set this higher.
- A lot of JVM settings will never need to be touched. Especially in CF 7.
- You can check JVM through the java.lang.Runtime
Sun Virtual Garbage Collector tool.
- Free download from SUN
- Part of jvmstat
- His experience 15-20 per processor
- Optimal depends on application.
- Too high you spend more time switching out threads then processor
- Too low, you don’t get anything done.
- Request Timeouts
- Report and Charting threads
- Edit away
- But make a backup first.
Jrun Proxy Service
- Connects Jrun to Webserver
- Also allows thread manipulation
- Load Testing
- Don’t turn on debug in production
- Update database drivers
- Don’t put client variables in registry.
All in all, today was another day that hurt my brain.