Monday, July 10, 2006

Web Development Directory structure

We have started the new web development and I was discussing about the directory structures with the leads. Initially we had created the directory structure based on technology. I would like to call that as "Technology based directory structure". Recently while we were reviewing one of the open source product, we found that there directory structure is based on "Requirements/Features". Combining the above two we came out with Requirements-->Technology directory structure.

Technology based directory structure:
|___ api
|___ impl
|___ dao

Feature driven Directory structure:
|___ usermanagement
| |_ api
| |_ impl
| |_ dao
|___ groupmanagement
|_ api
|_ impl
|_ dao

Saturday, July 01, 2006

Java Heap and Windows Operating System

Today we were trying to deploy confluence integrated with Valtech cockpit on production. The result was an eye opener. Thanks to the confluence which consumes enough memory to push the heapsize to the limit.

As we were doing a test integration, we encountered our first "Out of memory" error within the first 15 minutes. I went back and tweaked the cache parameters within confluence by reducing some of the params like "time to live in memory" and also "number of objects to be in memory". I felts it worked great for next 24 minutes. Even though the "System information" section showed the "heap size" being used only 83%. Suddenly it crashed by throwing "Out of memory" exception.

This tweaking continued until we were able to make it work for next 45 minutes and, we felt this does not make sense to fight without proper information in place about the caches. Anyways, the point is during this struggle to make it work I found this article about setting memory size and its relation with the operating system. I know now, for serious application deployment we should think of linux/solaris or 64 bit systems.