Received: from makus.postgresql.org (makus.postgresql.org [98.129.198.125]) by mail.postgresql.org (Postfix) with ESMTP id E1F89215DC5 for ; Mon, 23 Jan 2012 10:36:45 -0400 (AST) Received: from mail-bk0-f46.google.com ([209.85.214.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1RpL0l-0005KQ-S5 for pgsql-jdbc@postgresql.org; Mon, 23 Jan 2012 14:36:45 +0000 Received: by bkas6 with SMTP id s6so2483544bka.19 for ; Mon, 23 Jan 2012 06:36:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; bh=76UcGk+DDX018Bb+TpLLy2K9C/foRrrVbsluWejbkmg=; b=dCHdqsvvcJn2Lpnl7geG8ZL9zJLHn9ioDq7hsuxnQ37sBTxmIRAAiNwpuaM2jCydgv LPx7BAegQj2vKxtOqUpGMCEiaZYNl4LrWCFA/HW3IMgeUoRcAizQxVCmw3vHohVLkjeu S+MtQ98bZtddfISUOfO/CtszaVp8is0b2DCo8= Received: by 10.204.153.27 with SMTP id i27mr3324682bkw.81.1327329390887; Mon, 23 Jan 2012 06:36:30 -0800 (PST) Received: from [10.64.1.26] ([94.45.140.16]) by mx.google.com with ESMTPS id ci12sm28737934bkb.13.2012.01.23.06.36.28 (version=TLSv1/SSLv3 cipher=OTHER); Mon, 23 Jan 2012 06:36:29 -0800 (PST) Message-ID: <4F1D706F.4070704@gmail.com> Date: Mon, 23 Jan 2012 16:36:31 +0200 From: Vitalii Tymchyshyn User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.24) Gecko/20111109 Lightning/1.0b2 Thunderbird/3.1.16 MIME-Version: 1.0 To: pgsql-jdbc@postgresql.org Subject: Re: Java 1.4 References: <4F1D1BB0.1000204@kickstone.com> In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Pg-Spam-Score: -2.3 (--) X-Archive-Number: 201201/82 X-Sequence-Number: 22622 23.01.12 16:02, Dave Cramer написав(ла): > More recently a patch has been presented with the subject NIO support. > This patch in fact only provides an alternative implementation of > setTimeout. The author has promised an NIO implementation later. Small correction for everyone to understand it right: the patch does contain NIO support for V3 non-secure connections. V2 and secure requires extra work I am going to perform in the nearest time. I posted to the list early because I simply wanted to get feedback as early as possible. Note that NIO itself do not provide any specific benefits (may be performance?). What you get is much better control on IO, comparing to using streaming. So, you can get timeout processing in same thread, you can see when your buffers overflow and react accordingly, you can see when your SSL data is available for reading. As far as I can see, introducing NIO do not require global changes. The tricky thing is handling read during write, but this is additional feature NIO makes possible. Best regards, Vitalii Tymchyshyn