• 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
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

HTTPUrlConnection and performance.

 
Bartender
Posts: 1357
39
IBM DB2 Netbeans IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Good evening guys,

i need some advice from you. So, I have a pure java client which communicates over LAN (or WAN) serializing and deserializing Java Object with a remote AppServer. Java Object are encapsulated in a class which, basically, encapsulates an HashMap so that I can always specify what procedure I need to call on my remote server.
An artisan way to execute RPC over Http.

Now, all works fine, except some cases where clients get poor performance. I tried to use some open-sourced tools to investigate what's happening under the hood, and thanks to these tools it turned out that TCP packets are very fragmented. I can't find a more proper term to define this: it seems evey request (or response) is turned in small pieces; in a LAN enviroments this behaviour does not occur.

I think that fragmenting packets is basically a normal behaviour (of course, if I have a minimun guaranteeded bandwith, I can't suppose that each request uses all the available connection speed), but detected slowness may not still be explained...

So, do you have any suggestions ? Is there a way to avoid overfragmented communication ?

I thought i could rely on HttpClient provided by Apache. What can you suggest me in this sense ?

Thank you in advance !


 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic