Tuesday, November 07, 2006

Starting JVM twice in Desktop app

So, I encountered a problem today that would have been solved easily by starting the JVM twice, but mentioning the solution to the senior architect immediately got his head shaking in disapproval.

After getting the courage to ask why, I learned the implications of starting a JVM twice, and got reminded of why architects are an important part of any software team.

After all, architects are named that way because they are responsible for creating the software architecture, and one of the cornerstones of that process is thinking about non-functional requirements. Ever heard of the 'ilities??? Security, Usability, Reliability, Safety, Maintainability, Extensibility, etc... Our architect never ceases to amaze me with having those concerns at the back of his mind all the time.

So, concerning the problem I mentioned, the reason starting a JVM twice was not a good idea is because it increases the app startup-time considerably, driving usability down, particularly responsiveness of the application upon launching it by the user. It also potentially decreases safety and maintainability as it requires handling a number of different scenarios that can go wrong, thus increasing code complexity.

Lesson of the day: Think twice before starting the JVM twice in your desktop application!!!

No comments: