Return-Path: X-Original-To: apmail-tomcat-dev-archive@www.apache.org Delivered-To: apmail-tomcat-dev-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 84B00CD58 for ; Sun, 20 May 2012 18:50:38 +0000 (UTC) Received: (qmail 57484 invoked by uid 500); 20 May 2012 18:50:37 -0000 Delivered-To: apmail-tomcat-dev-archive@tomcat.apache.org Received: (qmail 57414 invoked by uid 500); 20 May 2012 18:50:37 -0000 Mailing-List: contact dev-help@tomcat.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: "Tomcat Developers List" Delivered-To: mailing list dev@tomcat.apache.org Received: (qmail 57405 invoked by uid 99); 20 May 2012 18:50:37 -0000 Received: from minotaur.apache.org (HELO minotaur.apache.org) (140.211.11.9) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 May 2012 18:50:37 +0000 Received: from localhost (HELO [192.168.23.9]) (127.0.0.1) (smtp-auth username markt, mechanism plain) by minotaur.apache.org (qpsmtpd/0.29) with ESMTP; Sun, 20 May 2012 18:50:37 +0000 Message-ID: <4FB93CF6.7090707@apache.org> Date: Sun, 20 May 2012 19:50:30 +0100 From: Mark Thomas User-Agent: Mozilla/5.0 (Windows NT 5.2; WOW64; rv:12.0) Gecko/20120428 Thunderbird/12.0.1 MIME-Version: 1.0 To: Tomcat Developers List Subject: Re: APR/native and per socket timeouts. References: <4FB939F5.8020109@apache.org> <8CE19033-A020-4FCE-9C17-918ACCADEAF8@gmail.com> In-Reply-To: <8CE19033-A020-4FCE-9C17-918ACCADEAF8@gmail.com> X-Enigmail-Version: 1.4.1 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On 20/05/2012 19:44, Henri Gomez wrote: > Did there is a need to have sockets with differents timeout in day to day case ? So far, no. The requirements could be met by three pollsets. One for new connections, one for keep-alive connections and one for WebSocket connections. My concern is that this approach is not sustainable. I don't yet know what requirements may emerge from the Servlet 3.1 or WebSocket EGs. Even if no new requirements emerge, a per socket time out would be simpler to work with, consistent with BIO and NIO and may allow for further refactoring to deduplicate code. This is based on my current understanding of the native code which is that adding a per socket time out is relatively simple. I could be wrong. If I am wrong, three pollsets is my fall back plan. Mark > > For example did it is required by specs or API ? > > The finer, the better but only if there is a real need :-) > > Btw, i'll take a look to your commits. > > Le 20 mai 2012 à 20:37, Mark Thomas a écrit : > >> Currently, time outs for APR/native sockets are managed at the Pollset >> level. This means all sockets in a single Pollset must have the same >> time out. This is starting to become a nuisance. >> >> I have already had to add a second Pollset to AprEndpoint to handle >> separate connection and keep-alive time outs. Now I need to be able to >> handle infinite time outs for WebSocket and I do not want to have to add >> a third Pollset. >> >> Therefore, I intend modifying the APR/native code to support per socket >> time outs. I would be grateful if those of you with more C knowledge >> than I (which is most people on this list) could: >> a) tell me now if this is a crazy idea (and why) >> b) keep an extra close eye on any commit of mine that touches the C code. >> >> I intend to retain backwards compatibility so newer versions of the >> native connector will work with older Tomcat versions but Tomcat 7 will >> have a new minimum native version so that this feature is available. >> This means that the next Tomcat 7 release is likely to have to wait for >> the next native release. >> >> Looking at the code so far, I am likely to start with some renaming to >> clarify the current code before actually changing anything functional. >> >> Mark >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org >> For additional commands, e-mail: dev-help@tomcat.apache.org >> > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org > For additional commands, e-mail: dev-help@tomcat.apache.org > --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org For additional commands, e-mail: dev-help@tomcat.apache.org