Thursday, November 25, 2010

Integration of IIS and Apache Tomcat

1. Download the Tomcat IIS Connector (Jk2 binaries)

2.  There will be three directories namely bin, conf and doc. The bin folder has the isapi_redirector2.dll and an installation javascript file install4iis.js. I call the directory where you unzipped the IIS connector zip file as .
3. From IIS perspective I assume that the default web site is running and you need to redirect all URIs related to Servlets and jsps for Tomcat to execute them i.e URIs of the form
These are the steps to be executed from Tomcat and IIS.
From Tomcat:
I assume that you installed Tomcat properly and have a running version of Tomcat at port 8080 with jk2 at 8009. Since these are the default settings in Tomcat 5, there is virtually no need to do anything from Tomcat side once you have a running version of Tomcat.
From IIS:
1. Since the default web site is running, invoking the install4iis.js
(/bin directory)will be straightforward.
2. Configuring the jakarta filter:
To do this one should create a new virtual directory from the IIS management console.
1.Goto Settings -> Control Panel -> Administrative tools -> Internet Information Services
2.Expand the Local Computer icon.
3.Expand Web sites folder and Default Website.
4.Under the Default Web site create a new virtual directory.
1.Right click Default Web site -> Click New -> Virtual Directory -> Next
2.In the (Alias) Text field enter the name as jakarta and Click next
3.Enter /bin as the directory path and Click Next
4.Select read, run scripts and execute access permissions, Click Next and Finish.
5. Configure workers2.properties file:
This file is used to configure the connector properties, the URI pattern to be filtered, and details of the IP address and the port where the Tomcat connector is listening, etc.To map URIs of the form /Servlets-examples and /jsp-examples for Tomcat, the following settings need to be specified in the workers2.properties file.

Create a file workers2.properties in /conf directory with the following settings.
# Example socket channel, override port and host.
[channel.socket:localhost:8009]
port=8009
host=127.0.0.1
# define the worker
[ajp13:localhost:8009]
channel=channel.socket:localhost:8009
# Map the default Tomcat directory to the Web server uri space
[uri:/jsp-examples/*]
group=ajp13:localhost:8009
[uri:/servlets-examples/*]
group=ajp13:localhost:8009
6.Now you are set to execute the IIS Tomcat connector installation script install4iis.js. Either double click install4iis.js or execute it in command line as windows script using
Wscript //E:Jscript install4iis.js
The installation process using install4iis.js will take 10 – 15 steps. Click Ok for all messages in the message box one
after another and finally check for the message
Filter [jakarta] set. Click Ok to complete the installation.
Note: By Default the install4iis.js configures the filter (jakarta, the virtualdirectory configured above) for the Default
Web Site. If you want to configure the filter for other sites, you need to use the appropriate command line options.
For more help,
type Wscript //E:Jscript install4iis.js –h.
7.Restart IIS (In IIS Management console, right click Local Computer -> All tasks -> Restart IIS).
8.To check the configuration of the filter, in the IIS Management console, expand Local Computer -> Web Sites and Right click Default Web Sites and Click Properties and ISAPI Filters tab. There you should see the green status of the jakarta filter indicating that the filter is loaded.
Once the above procedures are completed correctly, then typing
http://127.0.0.1/servlets-examples in browser will fetch the Tomcat page http://127.0.0.1:8080/servlets-examples and http://127.0.0.1/jsp-exampleswill fetchhttp://127.0.0.1:8080/jsp-examples page. Try executing the sample Servlets and jsp examples through IIS Connector and check the results.

Tuesday, November 23, 2010

Why we need Redundant Array of Independent Disks (RAID)

The need for RAID can be summarized in two points given below. The two keywords are Redundant and Array.
 
  • An array of multiple disks accessed in parallel will give greater throughput than a single disk.
  • Redundant data on multiple disks provides fault tolerance.
Provided that the RAID hardware and software perform true parallel accesses on multiple drives, there will be a performance improvement over a single disk. With a single hard disk, you cannot protect yourself against the costs of a disk failure, the time required to obtain and install a replacement disk, reinstall the operating system, restore files from backup tapes, and repeat all the data entry performed since the last backup was made.
With multiple disks and a suitable redundancy scheme, your system can stay up and running when a disk fails, and even while the replacement disk is being installed and its data restored.

Difference between WWW1,WWW2 and WWW3


WWW1, WWW2 or even WWW3 is nothing but a mirror of the original web server which is typical WWW. Many websites like government, banks even major search engines like Google(www1.google.com or www2.google.com) and Yahoo(www1.yahoo.com or www2.yahoo.com)! uses www1 and www2. The main purpose of this techniques is to reduce server load. Sometimes the original server need to be updated or modified but major websites like .gov, .edu, google.com, yahoo.com cannot just shut their main server down for hours to update their system. Therefore, they need to use www1 or www2 duplication of their mainframe server