• Post Reply Bookmark Topic Watch Topic
  • New Topic

thread performance  RSS feed

mohit joshi
Ranch Hand
Posts: 243
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I used multithreading while working on a java spider program, so that multiple threads can simultaneously make http connections and download files from websites. This did increase the performance of the program. However I read later that the java green threads are not the same as native threads, and use of native threads is more efficient for IO operations which use systems resources. Can anybody throw some light on this.
Also, when I tried to reuse the sockets made to a perticular server to request for different files, it didnt workout. It seems that http1.1 supports persistent sockets and some webservers claim to implement http 1.1, like javawebserver and IIS server, but i was not able to achieve it. There is very little information on HTTP1.1 on the net.
Doing some research indicated that if the response can tell the length of data before sending the data, then another request can be made after the response gets over. This way persistant HTTP sockets can be operated. I would request if anybody has worked on this to share the experience.
Also in my case, I guess the proxy server might have been the problem. perhaps it was not set to operate on HTTP1.1. Kindly share your experience and views on this.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!