The i-Technology Media!
Register | Log in
   
 
.NET  ·  AJAX  ·  CLOUD  ·  ECLIPSE  ·  FLEX  ·  OPEN WEB  ·  iPHONE  ·  JAVA  ·  LINUX  ·  OPEN SOURCE  ·  ORACLE  ·  PBDJ  ·  SEARCH  ·  SILVERLIGHT  ·  SOA  ·  VIRTUALIZATION  ·  WEB 2.0  ·  WIRELESS  ·  XML
Comments
Google Wave Invitation Giveaway
By Aditya Banerjee
Timo Hirvonen wrote: I would really appreciate an invitation. Been desperately trying to find one :) timo [dot] hirvonen [at] gmail [dot]com
Nov. 27, 2009 11:13 AM EST
Cloud Expo on Google News
Did you read today's front page stories & breaking news?


2009 East
PLATINUM SPONSORS:
IBM
Smarter Business Solutions Through Dynamic Infrastructure
IBM
Smarter Insights: How the CIO Becomes a Hero Again
Microsoft
Windows Azure
GOLD SPONSORS:
Appsense
Why VDI?
CA
Maximizing the Business Value of Virtualization in Enterprise and Cloud Computing Environments
ExactTarget
Messaging in the Cloud - Email, SMS and Voice
Freedom OSS
Stairway to the Cloud
Sun
Sun's Incubation Platform: Helping Startups Serve the Enterprise
POWER PANELS:
Cloud Computing & Enterprise IT: Cost & Operational Benefits
How and Why is a Flexible IT Infrastructure the Key To the Future?
Click For 2008 West
Event Webcasts

2009 East
GOLD SPONSORS:
CA
Get Your Transactions Under Control: SOA Performance Management
Software AG
Performance Driven Adoption: The Secret to Advancing SOA
Intel
The Evolving SOA Appliance: 3 Game-Changing Innovations
SILVER SPONSOR:
Denodo
Data Mashups: Deliver Your Project Faster with Virtualized Data Services Across Internal & External Sources
POWER PANELS:
The Business Value of Service Orientation
Driving Profitability Through User Experience
Click For 2008 West
Event Webcasts
Live Google News by SYS-CON!
Top Three Links You Must Click On


Java Industry News
Java Development: Why Is Zero Turnaround Important?
It is possible to eliminate the redeployment in Java EE development

By: Ivo Mägi
Oct. 23, 2007 11:30 AM

Why is "Zero turnaround time" so important? I will try to elaborate on the subject and give a broader picture about the activities performed during the Java EE application development cycle.

What is this stuff all about? It is about developing as fast as you can. And I do not mean typing as fast as you can, because you are good at that anyway.  Nor do I mean compilation time – modern IDEs all have incremental compilation models, which work blazingly fast.

I mean the root of all evil: the deployment time. Have you ever watched you fellow PHP/Ruby/Python developers at work? They make a change in the source code, hit CTRL+S to save the source code, press ALT+TAB switching to the browser window where only a refresh is needed and voilà – they can see  the result in their browser within milliseconds.

Now think about the titans you are wrestling at the same time. Maybe you perform some kind of build activities with Ant or Maven? Maybe you are using administration utilities of your application servers to initiate the deployment procedure? And even if you are not doing any of the above I can bet that whatever you are doing it will take at least 30 seconds more than it takes your scripting colleague. Most of this time goes into the mystical deployment phase, which you most likely take as something you cannot affect. But hey - now you can – with the help of a new tool called JavaRebel.

Building                  
                              
First let’s take a look at the build cycle. It usually consists of some kind of preprocessing of the source files, copying environment-specific configuration files, downloading dependencies, compiling source code, creating distribution, etc. It is relatively easy to get lost in your building procedure and start applying different kinds of magic. I have seen build scripts written in Ant larger than 10 000 lines. It was abnormal. Build procedure should be as easy as possible. And what is most important – you should use your build scripts only when checking out a new version from your version control repository. All your activities after the first build should be carried out only using your favorite IDE's incremental compiling possibilities. There should be no need to touch your build script again.

What does it mean to you as a developer? First you should configure your Java EE development to use an exploded format. For those who are not familiar with the term – you should not create WAR nor EAR files for deployment, but instead keep the WAR/EAR content exploded in the file system. Why – you might ask. But can you imagine anything weirder than first zipping the content of some directory and then telling some java process (your application server) to unzip it. That is exactly what application servers do with your nicely packaged WARs and EARs.

State preserving

As you might have noticed the first part of this article had nothing to do with the JavaRebel, it was only a precondition for the JavaRebel to have the exploded development model in place. Now let’s check something more interesting – state preserving.

If you are anything like me you have a lot of state in your application. And yet again – if you are anything like me you are keeping most of the state in HttpSession. Well it does not actually even matter – you could keep it in stateful session beans or in some kind of homegrown solution – I am pretty sure you have stateful objects. And you have business processes operating on this state – something like “select a customer, create an order, add order details, select transport, select payment, etc”. It is usually a long and complex process with a lot of state management going around under the hood. And you hate these processes because each and every time you have to debug them it will take forever – you add a fix, you change something and voila – you have to start the whole process all over again because the state was lost during the redeployment.

Some of you might now be proud of either their application server which supports persistent HttpSessions or of themselves if they have added a support for such a feature. But all these solutions I have seen are still complex and slower than the possibilities JavaRebel offers you. You will not think about those kinds of things any more.

Caching

Now let’s take a peek on other aspect of the state preservation – caching. Most likely you have found some part of your domain model to be relatively static, so it could be worthwhile to cache the instances. So you apply caching and pick a solution for loading the caches which can be either lazy or eager. If you choose lazy loading all first hits to your application are darned slow. It affects you in two ways – your development slows down and your customer could get wrong impression about the application on the first couple of clicks – you have to wait the caches to warm up. And since it is usually the customer who is going to check the application first with the empty caches who will decide whether you have made a good job or a lousy one, you will end up with an angry customer.

So you pick eager loading. Now everything is nearly OK, except that … your caches grow beyond all initial estimates. And the initial loading will start taking time. A lot of time – I have seen this exceeding several minutes. And boom – your development cycle is even slower than it would have been with lazy loading applied. Now you start experimenting by serializing the content of your caches to some kind of external medium when undeploying (usually your development environment hard drive) and deserializing it when deploying. And– you have to manage another dimension of complexity in both your build scripts and caching solution. With JavaRebel applied you will not even notice that you have made an operation which would have required the caches to be reloaded.

Author's Note: You can download JavaRebel from ZeroTurnaround.com and give it a try. Disclaimer: JavaRebel is commercial software with a free trial for 14 days and developer seat cost at 99$.

Published Oct. 23, 2007— Reads 8,738 — Feedback 3
Copyright © 2007 SYS-CON Media, Inc. — All Rights Reserved.
Syndicated stories and blog feeds, all rights reserved by the author.
Related Stories
▪ Generic Class Reloading Comes To Java
About Ivo Mägi
Ivo Mägi is Chief Development Manager, Webmedia AS - the largest software development company in Estonia with over 250 employees under Webmedia Group. The company operates in Estonia, Finland, Lithuania, Romania and Serbia.

Add Your Feedback

In order to post a comment you need to be registered and logged in.

Register | Sign-in

Reader Feedback: Page 1 of 1

#3
Dario Laverde commented on 25 Oct 2007

"Have you ever watched your fellow PHP/Ruby/Python developers at work? They make a change in the source code, hit CTRL+S to save the source code, press ALT+TAB.."

Actually that's the only way I (and many I know) develop with Java (in fact we avoid the ALT+TAB since most IDEs have internal browsers). So it's not really an innovation. For EJB development, use OpenEJB and Tomcat and develop in any IDE (with zero deployment).

#2
Dave Lauta commented on 24 Oct 2007

Big Deal, I do the same thing with Eclipse J2EE, Struts, and JSP's at least 10,000 times everyday. Without regard to source code file type, I hit save, eclipse compiles all dependancies and hot deploys to the Websphere AS. Alt tab to the browser and F5 refresh, Only difference is that in my development environment, I plan my changes before I throw code at the current situation.

#1
Reloader Jasper commented on 22 Oct 2007

Shouldn;t an innovation like this have come from Sun? Not from an indie shop? What an oversight!


Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON Featured Whitepapers

ADS BY GOOGLE

Breaking Java News
Quaterra Converts Notes and Interest to Shares
GSI Group Calls Shareholders Meeting
Cannasat Therapeutics Reports Results for the Nine Months Ended September 30, 2009
Wal-Mart Court Ruling a Narrow Technical Victory
The Week Ahead for The Department of Justice for November 30 - December 4, 2009
Government of Canada, Government of Yukon and Communities Support Improvements to Recreational Facilities in Yukon
Norstar Securities Trust Announces Third Quarter Results
Canadian Pacific announces industry-leading biodiesel testing underway
Burnsville, MN Mayor Elizabeth Kautz Represents U.S. Mayors at EUROCITIES Meeting
LG Electronics Canada Welcomes Formula 1(TM) Back to Montreal

ADVERTISE   |   MAGAZINE SUBSCRIPTIONS   |   FREE BREAKING-NEWSLETTERS!   |   SYS-CON.TV   |   BLOG-N-PLAY!   |   WEBCAST   |   EDUCATION   |   RESEARCH

.NET Developer's Journal - .NETDJ   |   ColdFusion Developer's Journal - CFDJ   |   Eclipse Developer's Journal - EDJ   |   Enterprise Open Source Magazine - EOS
Open Web Developer's Journal - OPENWEB   |   iPhone Developer's Journal - iPHONE   |   Virtualization - Virtualization   |   Java Developer's Journal - JDJ   |   Linux.SYS-CON.com
PowerBuilder Developer's Journal - PBDJ   |   SEO / SEM Journal - SJ   |   SOAWorld Magazine - SOAWM   |   IT Solutions Guide - ITSG   |   Symbian Developer's Journal - SDJ
WebLogic Developer's Journal - WLDJ   |   WebSphere Journal - WJ   |   Wireless Business & Technology - WBT   |   XML-Journal - XMLJ   |   Internet Video - iTV
Flex Developer's Journal - Flex   |   AJAXWorld Magazine - AWM   |   Silverlight Developer's Journal - SLDJ   |   PHP.SYS-CON.com   |   Web 2.0 Journal - WEB2
Apache   |   CMS   |   CRM   |   HP   |   Oracle Journal   |   Perl   |   Python   |   Red Hat   |   Ruby on Rails   |   SAP   |   SaaS

SYS-CON MEDIA:   ABOUT US   |   CONTACT US   |   COMPANY NEWS   |   CAREERS   |   SITE MAP
SYS-CON EVENTS:   |  AJAXWorld Conference & Expo  |  iPhone Developer Summit  |  Cloud Computing Conference & Expo  |  SOA World Conference & Expo  |  Virtualization Conference & Expo
INTERNATIONAL SITES:   India  |  U.K.  |  Canada  |  Germany  |  France  |  Australia  |  Italy  |  Spain  |  Netherlands  |  Brazil  |  Belgium
 Terms of Use & Our Privacy Statement     About Newsfeeds / Video Feeds
Copyright ©1994-2008 SYS-CON Publications, Inc. All Rights Reserved. All marks are trademarks of SYS-CON Media.
Reproduction in whole or in part in any form or medium without express written permission of SYS-CON Publications, Inc. is prohibited.
 
close this window