Remember that instances and threads are two totally separate concepts.
A servlet container will typically only create one instance of a servlet
per declaration in the web.xml for your application, but each request
will be handled by a separate thread.  Similarly, Action instances are
reused, but multiple threads can be executing a single Action instance
simultaneously.  You will only have a performance bottleneck in
synchronized sections.  As long as you aren't storing state data with
your Actions (which shouldn't be necessary at all) then you probably
won't run into any concurrency problems related to the Struts
architecture itself.

-- 
Tim Moore / Blackboard Inc. / Software Engineer
1899 L Street, NW / 5th Floor / Washington, DC 20036
Phone 202-463-4860 ext. 258 / Fax 202-463-4863


> -----Original Message-----
> From: David Cherryhomes [mailto:[EMAIL PROTECTED]] 
> Sent: Friday, May 10, 2002 6:15 PM
> To: Struts Developers List
> Subject: RE: Scalability question
> 
> 
> I'm sorry, maybe I was unclear. I am not challenging the 
> usefulness of Struts, I am well aware of the vast amount of 
> functionality that the framework encompasses. I am currently 
> using Struts as a core part of the MVC approach in my 
> enterprise application. My question is about the scalability 
> of Struts Action classes.
> 
> It is my understanding that a Servlet engine will create new 
> instances/threads of a Servlet as needed (similar to 
> stateless session beans), and hence is very scalable for 
> multiple concurrent requests. My understanding is that an 
> Action class, on the other hand, is stored as an instance 
> variable. The question is this: if I have a class that 
> performs a massive amount of business processes (inclusive of 
> attaching to multiple EJB's), will the multiple concurrent 
> requests end up queued in a wait status until each one is 
> finished processing, or is there a multiple instance/thread 
> approach to Action classes (similar to a Servlet engine with 
> Servlets)?
> 
> The enterprise application I'm working on isn't for some 
> website, but a truly web-deployed enterprise app which must 
> scale to thousands of concurrent users with millions of 
> records in the DB. Thus, performance is a HUGE concern (e.g., 
> a wait of 500 miliseconds is about the max permitted).
> 
> Thanks
> 
> --- James Mitchell <[EMAIL PROTECTED]> wrote:
> > Yes, you can create your entire web site with only servlet filters, 
> > jsp, and a few beans.
> > 
> > And at some point you will find out what struts does for 
> you (the hard 
> > way) and why it is superior to all other Java Web Application
> > Development
> > Frameworks.
> > 
> > I hope this helps.
> > 
> > JM
> > 
> > "Its a dog-eat-dog world out there, and I feel like I'm wearing 
> > milkbone underwear!"
> >   Guess who?
> > 
> > 
> > > -----Original Message-----
> > > From: David Cherryhomes [mailto:[EMAIL PROTECTED]]
> > > Sent: Friday, May 10, 2002 5:27 PM
> > > To: Struts Developers List
> > > Subject: Scalability question
> > >
> > >
> > > Have there been any solid tests in regards to the
> > scalability of
> > > using the Action Servlet and Action class (as opposed to
> > using a
> > > single Filter servlet which forwards to other Servlets)? I
> > am
> > > especially concerned since my Action class connects (thru a
> > > BusinessDelegate) to one or more EJB's that are really 
> responsible 
> > > for processing the business logic.
> > >
> > > Any thoughts on this would be greatly appreciated.
> > >
> > > __________________________________________________
> > > Do You Yahoo!?
> > > Yahoo! Shopping - Mother's Day is May 12th! 
> > > http://shopping.yahoo.com
> > >
> > > --
> > > To unsubscribe, e-mail: 
> > > <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail: 
> > > <mailto:[EMAIL PROTECTED]>
> > >
> > >
> > 
> > 
> > --
> > To unsubscribe, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> > <mailto:[EMAIL PROTECTED]>
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Shopping - Mother's Day is May 12th! http://shopping.yahoo.com
> 
> --
> To unsubscribe, e-mail:   
> <mailto:struts-dev-> [EMAIL PROTECTED]>
> For 
> additional commands, 
> e-mail: <mailto:[EMAIL PROTECTED]>
> 
> 

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to