Reputation: 4833
I am developing a simple web application which contains these 3 components:
I need to decide which java webserver to use. Some options are:
a) use httpserver class in java (com.sun.net.httpserver) and create a multi-threaded process.
b) use Glassfish server and deploy the application on it that creates the webpage,etc.
c) use Jetty.
d) ?
The selection criteria for webserver is:
Stability ( The process(web server) should run for days without restart)
Maximum concurrent requests possible are about 200. and average case is about 30.
Caching is done at the webserver and requests are served from the webserver itself if data is available or not marked dirty by the data processing entity.
Your suggestions are greatly appreciated.
Thank You. Ron.
Upvotes: 1
Views: 667
Reputation: 41858
Tomcat would be able to do this, but you should specify the requirements on the java side. For example, are you using any J2EE functionality?
For caching, would you need something like JBoss cache?
Are you using JNI for interfacing the Java to the C++ backend, or using an ESB, or some other approach?
What type of data is being cached?
Update: Based on your information, I would suggest not using Java, but use a C++ TCP based server for this communication. That way you don't have problems with the JNI/C++ interface. You can write a C++ server fairly easily, and if you use Boost libraries you will be close to the new C++ spec. For threads you can look at: http://www.boost.org/doc/libs/1_40_0/doc/html/thread.html
Upvotes: 1
Reputation: 199274
I used Resin for several years, and it is very good and stable 100% recommended.
Upvotes: 1
Reputation: 118754
Don't use Java's Http Server class.
Glassfish is nice, but probably more than you need.
Jetty will work just fine.
Be aware that if you're using C++ and using JNI to interface with Java, any seg faults will kill the entire server (vs like an exception in pure Java, which will just kill the request and the container can recover).
Upvotes: 5