Tuning JEE Application August 19, 2009Posted by Terry.Cho in Performance & Capacity Planing.
Tags: Bottleneck, Performance, Thread dump, Tuning, WebLogic
add a comment
This is one of my famous presentation.
How to find bottleneck in JEE application. I made it a few years ago. But it works well nowdays.
New J2EE Architecture with Oracle Coherence. July 24, 2009Posted by Terry.Cho in Architecture.
Tags: BEA, Coherence, Oracle, WebLogic
add a comment
In case of Korea success rate of JEE based SI projects are getting lower. A one of the reason we can think about is framework. Most JEE projects are using framework like spring,hibernate,JAX-WS,XML framework etc. It helps us to leverage efficiency of implementation and provide more higher quality of architecture. In contrast it makes our system to more complicate. It causes a trouble in production system. Makes system hang, bring high cpu usage, memory usage etc
In this document, I will introduce WAS and coherence based architecture to raise up quality of JEE architecture.
Pain point of traditional JEE architecture
Traditional JEE architecture is like below.
All of business logics are packaged into one application (1 WAR or 1 EAR file) including user interface. BIZ logic is implemented with EJB or POJO (Spring etc. POJO is current trend). UI is implemented Servlet/JSP of MVC framework.
This traditional JEE architecture has weak points.
Requires lots of redundant memory.
Current requirement for IT is being increased and complex is increased. So size of application and memory usage of application is being increased. The problem is JVM has a limitation in memory size. In 32bit JVM, Java can use usually maximum 1~1.5 GB Heap memory. Even if we can use 64bit JVM. We still have the problem in Garbage collection (GC) time. In full GC time, JVM suddenly stopped. If we increased the java heap size, the full GC time also increased. From JVM 1.4 there are many GC tuning options like Concurrent GC (CMS), Parallel GC. We are not free from the GC time.
In the traditional architecture all of biz logics are packaged into one application. Memory usage is getting increased. Especially it makes a burden in JVM permanent memory area. (The area that classes are loaded.)
Trouble affects other business Logic
Another problem of traditional JEE architecture is trouble propagation. Because all of business logics are running over same WAS instance, if some business logic makes a problem like high CPU usage, high memory usage affects the other business logic. It means if only one business logic has a problem, whole system can be stopped. Even if our weblogic server provides workmanager and clustering feature which prevent problem propagation, the problem from business logic can not be prevented
How to solve this pain point?
So how can we solve this problem? Answer is easy. Separate the business logics to separate WAS instance.
It helps us by
Effective memory usage
Because only one business logic is deployed to one instance. Memory utilization is became low.
Prevent affection of problem between different business logic
Business logic is separated, so if one business logic has a problem, only the business WAS instance (or cluster) has a trouble. It doesn’t provide any effect to other business.
Efficient resource allocation
In addition separating business by WAS instance can make us to use hardware resource efficiently .
In Hard ware platform which supports CPU partitioning, system administrator can assign CPU to specific business logic. In traditional JEE architecture, it is hard to assign the resource to business. Because all business logics are running over same WAS instance, so cannot select process which CPU is assigned to.
So, even if the separation of business logic by WAS instance has a lot of architectural, why the traditional JEE architecture doesn’t implement it?
Problem comes from shared data & state information management.
In JEE architecture needs to share business data across the business logics or keep user state data by using Http Session. But if we separate business logic by WAS instance, it cannot share the session data and shared information across the WAS instances.
It is a reason why our suggested architecture cannot be realized.
Separate business logic across WAS instance with Oracle coherence.
Finally with Oracle Coherence solution we can realize the architecture.
Coherence is Data Grid Solution which is not just Caching solution but is extendible, high performance, high availability large shared memory with multiple interface.
Basically Coherence support HTTP session replication. It gives us more Http session capacity and solves the problem to sharing user state data.
By using coherence we can solve all of the pain point in traditional JEE architecture.
We get additional advantage from this architecture. We can plan a capacity based on business logic. (Assign WAS instance to specific biz logic based on capacity.)
And it also give us freedom of redeployment. We don’t have to redeploy whole of WAS instance and don’t have to restart whole instances.
It is hard to win a deal with only WebLogic server in JEE application market. We need a approach to suggest integrated package of our product and especially with ARCHITECTURE which can solve pain point of our customers.
WebLogic and Coherence are very excellent product from before acquired by Oracle. Acquisition should provide advantage with chemical interactions. This is the case that can make the chemical interactions and will provide a higher position in biding with other vendors.
Develop JSF application with Oracle ADF in Eclipse. July 23, 2009Posted by Terry.Cho in JSF & ADF (Oracle Application Development Framework).
Tags: ADF, Eclipse, JSF, Oralce, WebLogic
Oracle ADF has JSF (Java Server Faces – Part of JEE5 standard) implementation.
It provides very rich UI component.
Commonly people think that “to use ADF, do we need JDeveloper?”. Answer is no.
ADF contains whole application framework including Biz Logic, Data Access,View etc.
In this example we just use ADF Faces as a JSF implementation and shows implementation method with eclipse.
– WebLogic 11g (Bundled in JDeveloper 11g)
– JDeveloper 11g
– Eclipse Galileo