Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

General Tomcat Question / Opinions Sought.

Status
Not open for further replies.

GiffordS

Programmer
May 31, 2001
194
CA
I would love to get some feedback on a project that I will be starting soon. It's funny, but there is literally nowhere to get an unbiased opinion on this so all I can do is ask for as little bias as possible. The project will absolutely require a few Servlet applications for some pieces. This means that I will, in all likelihood, be running it on Tomcat ( though I am interested in Glassfish ). There are also several aspects of the project ( a forum, basic data handling stuff ), that will not require servlet technology though that would certainly be one way to handle them. I am wondering what the benefit is of combining technologies on this project as opposed to doing everything in JSP / Servlet. Right now the plan is to run an Apache front end with the Tomcat being used as a container. All of the "light" lifting would be done via PHP running off of the Apache server with the Tomcat used only for the Servlets. I know that this will greatly lighten the load on the Tomcat but I am wondering to what extent it benefits me. I know that Apache handles the static serving much faster than Tomcat but with Tomcat 6x that gap has allegedly narrowed quite a bit. I'm just looking for opinions on running everything in JSP / Servlet vs building the basics in PHP and serving everything that does not require a Servlet through an Apache front end.
 
It is not convenient to use php and jsp in this way. I have used php for a year and Java for four years.
Your approach seems to use php to generate the look of the website and let servlet to fill in the blanks. There is a small chance that the php server has to wait more for the servlet result. I do not say Java is slow. But after some html code has been generated from php and server finds there is a link(a call
to servlet), the php server will wait for the result of the servlet.

You cannot always use Java Data Access Object.
I recommend you use php or Java either and you can get more benefit from one of the lanuage.

php is a scripting language and I think the degree of reuse can be higher with Java to me.

Do you have more experience in php or Java?
 
I may have mis-represented the situation. There are certain aspects of the site that will require servlets because I will need applets to sustain a connection. Constant refresh via PHP is not an option. However, there are many other aspects, such as forums and the like for which PHP would be fine. My concern is that if I use JSP / servlets for these things that I will be placing too great a load on Tomcat and will suffer a performance hit in the areas where I really need the java. The idea of using PHP was simply to lessen the burden on the Java server. Another option would be to leave off the PHP but integrate Python as much as possible to once again ease some of the Tomcat burden. Any thoughts?
 
First of all, you don't need a servlet to use an applet. After that, merginf technologies is always harder to code and maintain. But if your design meets your application needs without more problems, I'd go on.

I'd choose just one technology, mainly because I think you can do it with both of them alone.

Cheers,
Dian
 
If you do not send thousands of very large data transfer object(a dao with hundreds of attributes), I think the traffic
is ok. You can read the topics about coarse grain or fine grain in design pattern.

I myself do not like to start project with complicated approach. Because the project may become more complicated gradually when it grows in size.

You do not need to worry about the processing power of Tomcat because you can install Tomcat on two computer and running them in cluster mode. You need to configure in Tomcat and (Apache) as well.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top