File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Servlets and the fly likes Implementing filters Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Java » Servlets
Bookmark "Implementing filters" Watch "Implementing filters" New topic
Author

Implementing filters

Sita Kodali
Ranch Hand

Joined: Dec 02, 2001
Posts: 72
I am in a situation where I have to choose between a devil and deep see J
The situation is I have 200 users connecting to my http server (maximum users may go upto 300-500). Due to licensing issues and economical thingies, we have decided to use latest versions of Linux+Apache+Postgresql+Tomcat. Ported the database from MSSQL 2000 successfully and with little modifications my system works just fine on new setup (Thanks to java, I don’t need to change any of my Servlets, jsp or beans)
Now comes the choice issue - We have some homemade ISAPI filters sitting on top of IIS on Win2K policing every request and determine what to serve. Equivalent to this are Apache modules where we have no expertise to get our hands dirty and customize readily available apache filters such as mod_filter, mod_tracker etc. The way out – Timely introduced filters in Servlet 2.3 – They came as a savior. I wanted to adopt them quickly and boot out apache as a middleman and make Tomcat 4.x as a stand alone server. This gives me ability to write my filters to police every request as ISAPI filters and perform whatever we were doing with ISAPI filters.
My concerns here are summarized as below:
1.Removing Apache as a http server will have any adverse effect on performance and is it scalable in case concurrent users go upto 500 or over. (Precisely can Tomcat 4.0 alone handle the load for static as well as dynamic content?)
2.Is it a good solution to depend on Tomcat 4.0 without a http server to serve static content if concurrent users are restricted to a maximum of 300
Any advice from experts and gurus are highly appreciated.
Regards
--
Venkat
(Don't fume - I am aware that there exists a topic for Apache/Tomcat. But looking at the level of posts there, I have decided to do it here as experts are flocking here this week )
[ April 23, 2002: Message edited by: sita kodali ]
Tim Holloway
Saloon Keeper

Joined: Jun 25, 2001
Posts: 16141
    
  21

Really, now. Just because there are more postings in THIS forum doesn't mean you'll get better service than in the Apache/Tomcat one!
Short answer: If you are primarily serving active content, Apache is actually going to be a performance drag, since servlet requests have to go through an extra layer. Apache is preferred primarily if you have lots of static content like pictures, audio, animations or long HTML-only pages.
Another possiblity is to use Apache 2.0 and convert your ISAPI stuff to its Apache equivalents.


Customer surveys are for companies who didn't pay proper attention to begin with.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Implementing filters