Most efficient way to handle HTTP POST REQUEST in Java -


i have respond.php returns json data each http post different header data. efficient way generate roundly 30 requests @ once , handle responded data? needs efficient since hardware rather limited in performance.

it not clear mean "generate roundly 30 requests @ once , handle responded data".

but efficient use of >>your<< time (and our time) implement in straight-forward fashion, , see if performance enough. pointless spend many hours coding ultra-efficient solution when simple solution going enough.

the simple solution create 30 client threads , have each 1 send single post request using httpurlconnection. whether "efficient" depends on resources bottleneck. (and of course, same applies ideas on how make more "efficient".) saying hardware "rather limited in performance" doesn't give of clue ...

once have simple solution, , you've identified actual bottleneck areas (client-side cpu? thread stacks? network speed?) ... make meaningful suggestions how make code faster. asking "the efficient" solution, encouraging people guess bottlenecks are.


one final point. when "most efficient" there 2 ways interpret that. mean, solution sends requests , processes responses in shortest elapsed time. alternatively, mean solution places least resource drain (cpu and/or memory and/or network bandwidth) on client and/or server. not quibble. different flavours of "efficient" require markedly different solutions.


Comments

Popular posts from this blog

Perl - how to grep a block of text from a file -

delphi - How to remove all the grips on a coolbar if I have several coolbands? -

javascript - Animating array of divs; only the final element is modified -