Hi Michael
Thank you for the below
1. I would be happy to but I would need some direction on some of the more 
low-level stuff. I've tried going through RFC's but didn't really get anything 
constructive out of it. I've also read several books on the topic but can't 
seem to find one that gives information on the binary payload structures and 
flows. If you could let me know of a good place to get the information I need 
then I'd be happy to contribute this. I have already studied the existing 
source quite a bit so I am fairly familiar with it.
2. I don't fully understand the purpose of the timer and looking at the code it 
looks as if you could prevent it by changing MAX_REQ and MAX_RES to not be 
hard-coded to -1 but I'm not entirely sure what the implications of changing 
that would be. Again, I would be happy to contribute this but I would need 
access to more background information if it's possible?

Thanks & RegardsAshton
      From: Michael McMahon <michael.x.mcma...@oracle.com>
 To: "ashtonho...@ymail.com" <ashtonho...@ymail.com> 
Cc: net-dev@openjdk.java.net; Pavel Rappo <pavel.ra...@oracle.com>
 Sent: Tuesday, 28 March 2017, 18:09
 Subject: Re: com.sun.httpserver
   
  Hi Ashton,
 
 On 28/03/2017, 17:40, ashtonho...@ymail.com wrote: 
Hi Michael
 
 Thanks for the below.
 
 1. Would it be possible to contribute this feature or is there a reason to not 
have it going forward?
 
 
 I think it would be useful. Maybe Pavel here in Oracle might comment on it 
since he has
 done work on a client implementation. It probably depends on how much 
additional API
 footprint it would create. Are you offering to do it?
 
 
2. Is it possible to disable the other threads and just have the listener? 
Smaller devices that don't have as many cores really struggle with 
multithreaded applications and if there are already threads in an application 
it may add additional overhead and complexity
 
 
 
 Yes, I think it would be possible to combine the timer functionality with the 
listener, and build the timing capability
 into the nio selector. Again that is more work, but if it is something you are 
offering to do..?
 
 Thanks,
 
 Michael.
 
 
Thanks & Regards
 Ashton 
 
 -------- Original Message --------
 Subject: Re: com.sun.httpserver
 From: Michael McMahon 
 To: ashtonho...@ymail.com
 CC: net-dev@openjdk.java.net
 
 
 
Hi Ashton
 
 On 28/03/2017, 12:26, ashtonho...@ymail.com wrote:
 > Hi all
 >
 > I was looking through the archives but did not find any answers to these 
 > questions so I figured I'd try here, hopefully this helps someone else as 
 > well.
 >
 > I've done some testing on the httpserver and come across some things:
 >
 > 1. No support for websockets (ws) or secure websockets (wss) - will this be 
 > in a future release?
 There are no plans at present to add support for websockets to this 
 implementation.
 > 2. When starting the server a number of threads are spawned regardless of 
 > whether you specify an executor or not. Was this the intention? If so then 
 > why does it spawn multiple threads when it could just spawn one for 
 > listening that places all HttpExchange instances into a BlockingQueue or 
 > something for the developer to use in a single or multithreaded environment?
 Yes, just looking at the implementation, there are 2-3 threads created. 
 One thread is the listener for incoming connections,
 plus one or two more for operating timer functionality. The executor is 
 only used for handling incoming requests.
 
 Regards,
 Michael.
 
 > Thanks& Regards
 > Ashton
 
  
 

   

Reply via email to