Scalability is difficult to achieve

The latest versions of the servlet spec specify that, unless a servlet is
marked SingleThreadModel, the servlet container should create only one
instance of a servlet (or a JSP page once it's compiled as a servlet).

Many servlet containers do this now, although apparently some do create
multiple instance of threadable servlets (I don't know which).

This means that all code in your JSP pages and/or servlets should be
thread-safe.  Start with "Java Servlet Programming" (Hunter & Crawford,
O'Reilly).  For good, solid information on threads in Java, check out Java
Threads (Oaks & Wong, O'Reilly).

Another good resource for scalable programming is the "Java 2 Performance
and Idiom Guide" (Larman & Guthrie, Prentice Hall PTR).

Very few people can predict what will happen to a JSP site under load
without actually testing it.  Even one hidden bottleneck will foil your best
plans;  even after detailed code reviews, the only way to be sure is to load
test it to shake them out.

For application-server specific information, consult the vendor's
documentation, but I'd then chat with other folks online who have done it -
particularly for things beyond the specs like clustering.

Michael

-----Original Message-----
From: A mailing list about Java Server Pages specification and reference
[mailto:[EMAIL PROTECTED]]On Behalf Of Alex Strasheim
Sent: Thursday, June 01, 2000 5:25 PM
To: [EMAIL PROTECTED]
Subject: Docs explaining what happens under the hood?


Here's a very vague question:  What core skills should people who want
to be able to architect scalable web apps using JSP have?

I'm fuzzy on how many instances of servlets there might be floating
around, how you cantrol or monitor that, how application servers
spread them around across several machines, etc.  I have no idea how
to predict what would happen to a JSP site under even a moderate load,
or how to describe what happens inside the JVM.

What you have to know about writing thread safe servlets to make your
JSP application safe and scalable?

Is this stuff I'll find in servlets books?  Websphere (or Resin) docs?
EJB books?

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff
JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

===========================================================================
To unsubscribe: mailto [EMAIL PROTECTED] with body: "signoff JSP-INTEREST".
Some relevant FAQs on JSP/Servlets can be found at:

 http://java.sun.com/products/jsp/faq.html
 http://www.esperanto.org.nz/jsp/jspfaq.html
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=JSP
 http://www.jguru.com/jguru/faq/faqpage.jsp?name=Servlets

Reply via email to