Oracle Web Tier description - Oracle Web Tier includes components that interact with end users at the outer most tier of application grid infrastructure typically through HTTP requests and responses. Oracle Web Tier hosts web pages (static and dynamic), provides security and high performance along with built-in clustering, load balancing and failover features. It sounds like this Oracle Fusion Middleware product can improve ADF applications performance, especially on public internet. Typically ADF applications are coming with significant amount of Java Script and skin images - Rich Client, so let's see how Oracle Web Tier components (HTTP Server and WebCache) can help us.
You should start with Oracle documentation - Oracle Web Tier Components Documentation. It is good, and gives lots of information about product installation and configuration, however there is no clear path described how to setup it for ADF applications. There is useful WebCenter Spaces document - Improving WebCenter Spaces Performance with Oracle Web Cache, it generally describes how Oracle Web Tier improves WebCenter and ADF performance with better compression and caching.
Today I will talk about how you can configure Oracle Web Tier to work together with ADF 11g applications.
There is sample application for today post - SAFootballApp.zip. Why football, you may ask? I'm now in South Africa, where football World Cup starts next week, so I decided to dedicate it for football :) Application comes with specific ADF 11g configuration to enable static resources compression and caching, I will describe it later in this post.
I will structure this post into different steps, it will be easier for you to understand. If you follow these steps, most probably you will be able to setup Web Tier components successfully.
1. WebLogic Server
Download and install latest WLS (at this moment 10.3.3)
2. Application Development Runtime 11.1.1.2
Download and install APP_DEV 11.1.1.2 libraries into WLS
3. Application Development Runtime 11.1.1.3
Download and install APP_DEV 11.1.1.3 patch
4. WebLogic domain
Create WebLogic domain. You may create Managed Servers as well, its not important in this blog post context. When create domain, make sure you select support for Oracle Enterprise Manager and Oracle JRF libraries:
5. Start WebLogic domain Admin Server
When WebLogic domain is created, make sure you have started Admin Server. It should be Up, for Web Tier configuration and association with WebLogic domain.
6. Web Tier 11.1.1.2
Install Web Tier 11.1.1.2 into Fusion Middleware home. Follow installation guide instructions, from Web Tier document link provided above. Make sure you select only installation - configuration will be done later:
Configuration will be done later, because we need to install 11.1.1.3 patch first.
7. Web Tier 11.1.1.3
Install Web Tier 11.1.1.3 as described in installation guide.
8. Web Tier configuration
Make sure WebLogic Admin Server is running and run Web Tier configuration script (read Web Tier installation instructions).
In Configure Components wizard screen, select both HTTP Server and Web Cache. Also select - Associate Selected Components with WebLogic Domain. This will configure Web Tier with WebLogic domain automatically, it will be accessible through Oracle Enterprise Manager:
Provide WebLogic domain details:
Specify HTTP Server and Web Cache components names:
Make sure all configuration steps are successful - HTTP Server and Web Cache are configured properly:
You can verify successful configuration from Oracle Enterprise Manager - HTTP Server (OHS) and Web Cache should be Up:
9. ADF 11g application compression and caching
In this step, we will configure couple of ADF parameters, in order to enable static content compression and caching.
First, let's check Oracle Application Development Framework Performance Tuning Guide. In View performance section, they talk about Disable resource debug mode:
When resource debug mode is enabled, the HTTP response headers do not tell the browser (or WebCache) that resources (JS libraries, CSS style sheets, or images) can be cached. Disable the org.apache.myfaces.trinidad.resource.DEBUG parameter in the web.xml file to ensure that caching is enabled.
Ok, so make sure you disable this parameter, it is disabled in my sample football application.
Next, we should enable ADF Faces Caching Filter, as it is described in ADF Faces Configuration guide. Provided sample application is enabled with ACF filter in web.xml, it defines compression and caching rules for Java Script and JPG files in adf-config.xml file.
Sample application WAR deployment properties specify Java EE context root as football, we need to remember it for future configurations:
10. ADF 11g application deployment
Deploy sample application to WebLogic Managed Server, or Admin Server - no big difference in this case.
11. HTTP Server configuration
Web Cache is configured to be used with HTTP Server automatically, we don't need to do anything for this, unless you need specific configurations. What we need to do is to point HTTP Server to WebLogic server, specifically to our ADF application deployed on WebLogic server.
We need to do this, because from now we will access application through HTTP Server, not directly. This will allow us to use HTTP Server and Web Cache functionality to improve application runtime performance.
Let's configure it using Oracle Enterprise Manager. Open HTTP Server home screen and go to Administration -> mod_wls_ohs Configuration menu:
There you will need to specify following parameters for successful WebLogic proxy:
WebLogic Host: localhost (in my case)
WebLogic Port: 7003 (Managed Server port in my case)
Expression: *.jsp
Location: /football (Java EE Context Root for deployed ADF 11g application)
WebLogic Host: localhost (in my case)
WebLogic Port: 7003 (Managed Server port in my case)
HTTP Server default port is 7777. This means when user will access 7777 port with location /football, HTTP Server will open proxy connection to WebLogic Server, where application is deployed.
Make sure you restart opmnctl instance, in order to apply changes:
12. Application testing
Application is deployed on WebLogic Managed Server port 7003. However we will access it through HTTP Server 7777 port, in order to go through Web Cache:
Now you can see, why I called this application - football. I'm loading my pictures of football World Cup Johannesburg stadium into ADF 11g Carousel component - to see what performance improvements will bring HTTP Server and Web Cache.
During first request (Internet Explorer), ADF Java Script is loaded together with World Cup stadium images, you can see this from the log:
During next requests, or even when opening another browser session, ADF Java Script and images are not loaded anymore from WebLogic server, but retrieved from cache - only ADF lifecycle related requests are invoked:
If I open the same application from another browser (Firefox for example), ADF Java Script and images are loaded again:
You can see there are more Java Script files loaded for Firefox browser, thats interesting. And then it is the same as in IE case, for all following requests, static content is not loaded anymore from WebLogic server:
This should help to improve ADF 11g applications performance, especially on public internet, where connection speed is slow - because static content compression. Content caching will improve ADF11g application performance by reducing the load on the backend systems, which in turn means you can serve more users or service the requests more quickly.
Update 2012/04/29:
If you will configure Web Cache in ADF 11g R2, in web.xml change filter class from oracle.adfinternal.view.faces.caching.filter.AdfFacesCachingFilter to oracle.adf.view.rich.webapp.AdfFacesCachingFilter.
Update 2010/06/09:
I got very good advice from Angelo Santagata, he suggested that we can compress jsp pages as well with WebCache. This will significantly reduce network traffic - Web pages will be compressed. In order to compress jsp, open Caching Rules menu in WebCache 11g:
Declare new caching rule with enabled compression for file extension .jsp:
New rule will be available in the list:
You should start with Oracle documentation - Oracle Web Tier Components Documentation. It is good, and gives lots of information about product installation and configuration, however there is no clear path described how to setup it for ADF applications. There is useful WebCenter Spaces document - Improving WebCenter Spaces Performance with Oracle Web Cache, it generally describes how Oracle Web Tier improves WebCenter and ADF performance with better compression and caching.
Today I will talk about how you can configure Oracle Web Tier to work together with ADF 11g applications.
There is sample application for today post - SAFootballApp.zip. Why football, you may ask? I'm now in South Africa, where football World Cup starts next week, so I decided to dedicate it for football :) Application comes with specific ADF 11g configuration to enable static resources compression and caching, I will describe it later in this post.
I will structure this post into different steps, it will be easier for you to understand. If you follow these steps, most probably you will be able to setup Web Tier components successfully.
1. WebLogic Server
Download and install latest WLS (at this moment 10.3.3)
2. Application Development Runtime 11.1.1.2
Download and install APP_DEV 11.1.1.2 libraries into WLS
3. Application Development Runtime 11.1.1.3
Download and install APP_DEV 11.1.1.3 patch
4. WebLogic domain
Create WebLogic domain. You may create Managed Servers as well, its not important in this blog post context. When create domain, make sure you select support for Oracle Enterprise Manager and Oracle JRF libraries:
5. Start WebLogic domain Admin Server
When WebLogic domain is created, make sure you have started Admin Server. It should be Up, for Web Tier configuration and association with WebLogic domain.
6. Web Tier 11.1.1.2
Install Web Tier 11.1.1.2 into Fusion Middleware home. Follow installation guide instructions, from Web Tier document link provided above. Make sure you select only installation - configuration will be done later:
Configuration will be done later, because we need to install 11.1.1.3 patch first.
7. Web Tier 11.1.1.3
Install Web Tier 11.1.1.3 as described in installation guide.
8. Web Tier configuration
Make sure WebLogic Admin Server is running and run Web Tier configuration script (read Web Tier installation instructions).
In Configure Components wizard screen, select both HTTP Server and Web Cache. Also select - Associate Selected Components with WebLogic Domain. This will configure Web Tier with WebLogic domain automatically, it will be accessible through Oracle Enterprise Manager:
Provide WebLogic domain details:
Specify HTTP Server and Web Cache components names:
Make sure all configuration steps are successful - HTTP Server and Web Cache are configured properly:
You can verify successful configuration from Oracle Enterprise Manager - HTTP Server (OHS) and Web Cache should be Up:
9. ADF 11g application compression and caching
In this step, we will configure couple of ADF parameters, in order to enable static content compression and caching.
First, let's check Oracle Application Development Framework Performance Tuning Guide. In View performance section, they talk about Disable resource debug mode:
When resource debug mode is enabled, the HTTP response headers do not tell the browser (or WebCache) that resources (JS libraries, CSS style sheets, or images) can be cached. Disable the org.apache.myfaces.trinidad.resource.DEBUG parameter in the web.xml file to ensure that caching is enabled.
Ok, so make sure you disable this parameter, it is disabled in my sample football application.
Next, we should enable ADF Faces Caching Filter, as it is described in ADF Faces Configuration guide. Provided sample application is enabled with ACF filter in web.xml, it defines compression and caching rules for Java Script and JPG files in adf-config.xml file.
Sample application WAR deployment properties specify Java EE context root as football, we need to remember it for future configurations:
10. ADF 11g application deployment
Deploy sample application to WebLogic Managed Server, or Admin Server - no big difference in this case.
11. HTTP Server configuration
Web Cache is configured to be used with HTTP Server automatically, we don't need to do anything for this, unless you need specific configurations. What we need to do is to point HTTP Server to WebLogic server, specifically to our ADF application deployed on WebLogic server.
We need to do this, because from now we will access application through HTTP Server, not directly. This will allow us to use HTTP Server and Web Cache functionality to improve application runtime performance.
Let's configure it using Oracle Enterprise Manager. Open HTTP Server home screen and go to Administration -> mod_wls_ohs Configuration menu:
There you will need to specify following parameters for successful WebLogic proxy:
WebLogic Host: localhost (in my case)
WebLogic Port: 7003 (Managed Server port in my case)
Expression: *.jsp
Location: /football (Java EE Context Root for deployed ADF 11g application)
WebLogic Host: localhost (in my case)
WebLogic Port: 7003 (Managed Server port in my case)
HTTP Server default port is 7777. This means when user will access 7777 port with location /football, HTTP Server will open proxy connection to WebLogic Server, where application is deployed.
Make sure you restart opmnctl instance, in order to apply changes:
12. Application testing
Application is deployed on WebLogic Managed Server port 7003. However we will access it through HTTP Server 7777 port, in order to go through Web Cache:
Now you can see, why I called this application - football. I'm loading my pictures of football World Cup Johannesburg stadium into ADF 11g Carousel component - to see what performance improvements will bring HTTP Server and Web Cache.
During first request (Internet Explorer), ADF Java Script is loaded together with World Cup stadium images, you can see this from the log:
During next requests, or even when opening another browser session, ADF Java Script and images are not loaded anymore from WebLogic server, but retrieved from cache - only ADF lifecycle related requests are invoked:
If I open the same application from another browser (Firefox for example), ADF Java Script and images are loaded again:
You can see there are more Java Script files loaded for Firefox browser, thats interesting. And then it is the same as in IE case, for all following requests, static content is not loaded anymore from WebLogic server:
This should help to improve ADF 11g applications performance, especially on public internet, where connection speed is slow - because static content compression. Content caching will improve ADF11g application performance by reducing the load on the backend systems, which in turn means you can serve more users or service the requests more quickly.
Update 2012/04/29:
If you will configure Web Cache in ADF 11g R2, in web.xml change filter class from oracle.adfinternal.view.faces.caching.filter.AdfFacesCachingFilter to oracle.adf.view.rich.webapp.AdfFacesCachingFilter.
Update 2010/06/09:
I got very good advice from Angelo Santagata, he suggested that we can compress jsp pages as well with WebCache. This will significantly reduce network traffic - Web pages will be compressed. In order to compress jsp, open Caching Rules menu in WebCache 11g:
Declare new caching rule with enabled compression for file extension .jsp:
New rule will be available in the list:
7 comments:
We were using same configuration with my one of client.
ADF
Apache Tomcat (Proxy)
Web Cache
Weblogic
Load Balacing Throught Clustering
And automatic Deployment throught Ant Script using OJDeploy using Cruise Control.
Thanks,
Hasim (Hasamali)
Do you have the shell script to automate the process of webtier installation.
I tried the same steps given in the above blog.
1)But when i tried to access the site with the OHS port 7777 and tried to see the popular request in Web cache i donot see any hits.
Whereas if i use Web Cache port 7785 to access my application i can see the popular request.
2) I added ACF filter to the web.xml but my application's web page color became distorted and the page got messed up.
Is there anything i missed.
Thanks!
I tried to load your sample but I have to create a jdbc.HrDSDS.
What exacly shoud I create?
catalin
You shoul create data source in weblogic. Google for it.
Andrejus
Hi,
I create the jdbc/HRDSDS to an MDS and was working.
Thank you.
catalin
I am using jdev 11.1.1.7 and webcenter PS 7
When i install webtier everything except web cache is installed.
Post a Comment