jeudi 29 janvier 2015

What is the form of the request put into a queue for a multithreaded web server?

I'm building a multithreaded (using a thread pool) web server from scratch in Java. I know I need to create a queue to hold the requests coming in and then notify threads currently in the blocked status to process the requests in the queue.


My question is: what exactly should be put into the request queue? Does the queue hold the client connection and the handler threads use the client to get the HTTP request headers? Or does the daemon thread get the HTTP request header and put that in the queue for the handler to parse? Or does the queue hold both the client and the HTTP request headers?





Aucun commentaire:

Enregistrer un commentaire