Monday, March 31, 2008

Software project jump start

Jump Start Projects

Why Project have to start from scratch? Companies which are small/big/Corporate does not have Common services group. Even if they do, they are part of Architectural group which has the documentation and suggests the best practices but not follow with rigor.

Below are the some of the pain areas in the development cycle :
1. In Analysis/Design phase too much time spent on the Research for Basic services by development team
2. Team trying to gather reusable components from other teams
3. Lack of Code sharing within the organization,which most of the companies faces issues with. :)

This team I am proposing is the extension the Architectural services group.

Project Jump start Team
This could be the part Architectural team.

Responsibility of the team is to jump start the project by ready made components
Below are the some of the common components across the projects
1. Exception Handling
2. Logging
3. E-mail
4. DB Access(JDBC,AKD(EMatrix,Oracle OIM etc...)
5. Struts (Configure the struts framework)
6. Caching etc


Below are the features/services provided by this team :
1. One of the Representative from Common Services engages in the early phase of Development by providing above components ready
2. Train the team with the reusable components
3. Suggest the Design Changes to some extent not overlapping with Architectural services.
4. Best Practices are shared in the team in regards to Performance,Code Reusability and Documentation of code.


Below are the benefits :
1. Projects can benefit by reducing 20% of their development time
2. Since the code is tested and used in different projects , this components are bug free.
3. Since the Development is Equipped with right tools and Training, project is better Managed and Ontime delivery.
4. Project Development team can concentrate on Business logic and not worrying about Basic services.


Pitfalls
1. Process made but not followed constrained only for documenting but not let the team knowing
2. Too much time sent on Training and research


Early engagement of right resources and reusable components can significantly reduces the Development time and Companies prosper in all round.


Post your comments and feedback.

Tuesday, March 4, 2008

Java Application Performance improvement

This blog provides with the tips for Java Application Performance improvement.
These are some of the lessons/thoughts learned from experiences.

Here we go :

  1. Often even the experienced developer makes the mistake of adding the code which is either unnecessary or function calls which are not necessary.
  2. When database is the issue :
    1. Use the batching to commit,play with batch size and see the result.
    PreparedStatement.addBatch
    2. Create indexes on the table also see that not many indexes are created as index comes with some overhead while insert and delete ,as it has to reorder the index.
  3. When the process is intensive and involves processing of thousands and millions of records records,
    There are 3 strategies
    1. Delay the sub-process
    2. Divide and Conquer
    3. Hybrid of above both

1. Delay the sub-process : One of the delaying sub-process could be to delay the committing sub-process by adding to batch of batchSize(e.g..100) records.
2. Divide and Conquer : This can be archived in 3 ways;
1. Let say you have 100,000 records to process,delegate to 2 or 3 threads to process the records.
2. Divide between machines : Quoting the same example of processing 100,000 records can be divided between the machines. In this case process will use different CPU cycles for processing.

I suggest the combination of threads and RMI could be used for Divide and Conquer and see that there is not much network latency between the machines. RMI Example quoted in RMI Tutorial is good example to use a costly resources(such as Sun Solaris box with high configuration).

This strategy is best implemented with application hosted in distributed environment with Load Balancing.

Conculsion :
You dont need humungus boxes(machines) to process,divide the work between threads and boxes, dont believe refer google architecture.

More in my next blogs....

Post your comments and suggestion,what do you think?