struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "adam" <aa...@columbiaexchange.com>
Subject multithreading within one session
Date Tue, 27 Apr 2004 13:51:03 GMT
Hello all.

 

I have done the following experiment, and I am curious of why I am getting
these results:

 Basically I wanted to know what happens if I send parallel requests within
the same session

for the same action class/path.

 

Ie, I am doing the following:

-          get the session id cookie from the server 

-          log in

-          then schedule n threads for execution at the same moment in time.
Each thread has the same session id

cookie and makes a request for the same path(action class)

Now, the results I am getting are a bit different from what I was expecting.

Basically I thought that I couldn't have multithreading within the same
session, but that I would get a response for request 1 after milliseconds,
then a response for request two after 2n milliseconds and so on.

 

Instead it seems that I am (roughly ) getting all responses after m*n time
where the m is the number of threads and n is the length of time to service
one request. Actually it may not be exactly that time(i.e. m*n) but the idea
is that the more threads I have the longer the response time for all
threads, and all threads finish at about the same time..

 

So, my question is: what exactly is happening when multiple threads access
the same action class within one session?

Regards, Alex Adam


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message