Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Applet takes time to send request to servlet.

 
Bineet Singh Uppal
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I have a Web Application which runs in two HTML frames viz. Left.html and Right.html . Left frame contains an applet (HeartbeatApplet) that sends requests to a servlet. It's job is to validate session every 1500 miliseconds.

Right frame contains an applet (ViewerApplet) that displays the current statistics of the server. It sends 8 different requests to servlet continuously ( in a while(true) )and updates UI according to the data received. User can select this refresh rate from a combo box on the applet.

The applet goes to sleep ( Thread.sleep() ) for 'refresh rate' seconds and on waking up sends new requests to servlet.

Everything works fine in our development and testing environment, but is failing on client (customer) site.
Now the problem is that this Viewer Applet takes around 30-40 seconds to send the request, even when 'refresh rate'is set 1 second. The Heartbeat applet send request regularly after 1.5 secs without delay.

The behaviuor is strange and Hope we can solve it together.
Regards,
Bineet
 
Ulf Dittmer
Rancher
Posts: 42969
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Which part takes up the time - sending the request, processing the request, sending the response or processing the response?
 
Bineet Singh Uppal
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thank You Dittmer for your interest in the problem.
I think the Thread.sleep() is not behaving properly. Once the thread is invoked, it sends and receives response for all the 8 requests in one go.
I am putting in more time based loging to exactly catch the piece of code that is taking time. I shall update about the same tommorow when I get back to work.
Regards,
Bineet.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic