Received: from socket.newsnipple.com (postfix@[208.243.144.102]) by hub.org (8.10.1/8.10.1) with ESMTP id e942FvG25897; Tue, 3 Oct 2000 22:15:57 -0400 (EDT) Received: by socket.newsnipple.com (Postfix, from userid 1000) id 71F733588D; Tue, 3 Oct 2000 20:40:41 -0700 (PDT) Date: Tue, 3 Oct 2000 20:40:40 -0700 From: Adam Haberlach To: Tim Allen Cc: pgsql-hackers@hub.org, pgsql-interfaces@hub.org Subject: Re: C++ client libs Message-ID: <20001003204040.A4515@ricochet.net> References: <200010040051.e940pZG05525@hub.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii User-Agent: Mutt/1.0.1i In-Reply-To: ; from tim@proximity.com.au on Wed, Oct 04, 2000 at 12:38:35PM +1100 X-Archive-Number: 200010/80 On Wed, Oct 04, 2000 at 12:38:35PM +1100, Tim Allen wrote: > >3) Implement asynchronous calls to the back-end permitting multiple > > queries to be executed concurrently > > Implement async calls, yes, definitely a good thing to do. But this by > itself doesn't buy you multiple queries concurrently; for that you need > multiple connections to the database, which would also be worth doing in > this library. > > BTW, for async calls, you would want to create some convenient way of > registering your interest in the socket connection, and some standard > methods that read the result from it. Presuming the normal use for this is > via a select-driven event loop, you want to be able to register the socket > with whatever code drives the select, and register a callback that looks > at the socket whenever select goes off. Given that there are umpteen dozen > implementations of a select-driven event loop, it will be a challenge > developing something that works nicely with all of them. My preference would be an easily-overridable function so I could subclass the parent object and drop in a function to send a BMessage to an arbitrary BLooper. Your messaging system may vary... -- Adam Haberlach | A billion hours ago, human life appeared on adam@newsnipple.com | earth. A billion minutes ago, Christianity http://www.newsnipple.com | emerged. A billion Coca-Colas ago was '88 EX500 | yesterday morning. -1996 Coca-Cola Ann. Rpt.