If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Re: Servlet Question

That's impossible to answer without knowing a whole lot of statistical
things such as: how long does each call to the servlet take, how often will
users access it, and you need averages and distributions of those factors
and an M.Sc. in queueing theory to figure it out.

But you can use the BOTE (back of the envelope) method... for example
suppose your servlet takes 10 seconds to run, and each of your 500 users
accesses it once per day, some time in an 8-hour period. Then you have
about 1 access per minute (8 hours = 480 minutes) and only 10 seconds used,
so if the accesses are spread out evenly you don't have a problem. But if
everybody wants to use it at lunch time, then you do have a problem.

So take your actual estimates for those parameters, grab an envelope, and
have a try. The harder calculation is, what if you weren't single-threading
those requests? Good luck.

PC2

"JohnSmith" <any@email.com> wrote in message
news:3afc40fb$1@news.devx.com...
> Hi,
>
> I have a servlet that implements SingleThreadModel, as I indicated below.
> public class interactToDatabase extends HttpServlet implements
> javax.servlet.SingleThreadModel
>
> My question is, would implementing SingleThreadModel will greatly affect
the
> performance of the Servlet because I will have a 200-500 client that will
> connect to the server and run this servlet.
>
> Thanks for any help.
>
>

Re: Servlet Question

You should be aware that implementing SingleThreadModel does not mean that
you can safely write servlet code that isn't re-entrant. Although it gives
you a single-threaded servlet, static class variables and classes outside
the scope of the servlet will not be thread safe. This tends to make implementing
SingleThreadModel for any non-trivial servlet more dangerous than biting
the bullet and writing thread-safe code.

"JohnSmith" <any@email.com> wrote:
>Hi,
>
>I have a servlet that implements SingleThreadModel, as I indicated below.
> public class interactToDatabase extends HttpServlet implements
>javax.servlet.SingleThreadModel
>
>My question is, would implementing SingleThreadModel will greatly affect
the
>performance of the Servlet because I will have a 200-500 client that will
>connect to the server and run this servlet.
>
>Thanks for any help.
>
>