• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Jeanne Boyarsky
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • paul wheaton
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Frits Walraven
Bartenders:
  • Piet Souris
  • Himai Minh

Applet takes time to send request to servlet.

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
 
Rancher
Posts: 43027
76
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
 
Beware the other head of science - it bites! Nibble on this message:
Free, earth friendly heat - from the CodeRanch trailboss
https://www.kickstarter.com/projects/paulwheaton/free-heat
reply
    Bookmark Topic Watch Topic
  • New Topic