Received: from maia.hub.org (maia-2.hub.org [200.46.204.251]) by mail.postgresql.org (Postfix) with ESMTP id 6C6261337BF3 for ; Mon, 4 Apr 2011 04:51:48 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.251]) (amavisd-maia, port 10024) with ESMTP id 91133-07 for ; Mon, 4 Apr 2011 07:51:30 +0000 (UTC) X-Greylist: delayed 00:56:09.86817 by SQLgrey-1.7.6 Received: from mail-pv0-f174.google.com (mail-pv0-f174.google.com [74.125.83.174]) by mail.postgresql.org (Postfix) with ESMTP id 0A8061337BF5 for ; Mon, 4 Apr 2011 04:51:23 -0300 (ADT) Received: by pvg12 with SMTP id 12so1253571pvg.19 for ; Mon, 04 Apr 2011 00:51:23 -0700 (PDT) MIME-Version: 1.0 Received: by 10.142.117.5 with SMTP id p5mr6385174wfc.246.1301900113311; Sun, 03 Apr 2011 23:55:13 -0700 (PDT) Received: by 10.68.49.102 with HTTP; Sun, 3 Apr 2011 23:55:13 -0700 (PDT) In-Reply-To: References: Date: Sun, 3 Apr 2011 23:55:13 -0700 Message-ID: Subject: Re: experimental Netty-based protocol implementation From: Maciek Sakrejda To: Oliver Jowett Cc: pgsql-jdbc@postgresql.org Content-Type: text/plain; charset=ISO-8859-1 X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-1.9 tagged_above=-10 required=5 tests=BAYES_00=-1.9 X-Spam-Level: X-Archive-Number: 201104/13 X-Sequence-Number: 21739 For what it's worth, I've been working on an ActionScript PostgreSQL driver [1] off and on for a year and change, and I've found the event-driven I/O is a godsend when writing this sort of library. It's much easier to just react to protocol-level messages as they happen rather than trying to follow one of several specific sequences of steps. I don't know anything about Netty, but from glancing through the patch, Oliver, this actually looks rather similar to what I did. Of course, in ActionScript, I had the luxury of defining an asynchronous interface for the driver. In fact, due to Flash Player's non-blocking nature, this was a requirement. With Java, we still need to serve the blocking interface of methods like execute(), and that might get a little tricky. However, my overall point is that I'm very excited for this work. It could get greatly simplify a lot of driver guts and help solve a number of open "back-burner" issues. [1]: https://github.com/deafbybeheading/pegasus (N.B.: although trust and basic password authentication and most major aspects of both the simple and extended query protocols work, this still hasn't had a public release--caveat emptor) --- Maciek Sakrejda | System Architect | Truviso 1065 E. Hillsdale Blvd., Suite 215 Foster City, CA 94404 (650) 242-3500 Main www.truviso.com