[Monetdb-developers] MapiClient asynchronous interface?

Fabian Groffen Fabian.Groffen at cwi.nl
Sat Nov 18 16:30:11 CET 2006

On 18-11-2006 16:22:48 +0100, Martin Kersten wrote:
> Hi Fabian, Johann
> I can see the need for an asynchronous call. It works for applications
> that that don't care about the outcome of a transaction. It also seems
> relatively easy to implement in the Mapi server side. You have to
> trap the async query call and handle it in the context of a new
> server thread that discards the output (>/dev/null).
> The 'asynquery' can immediately return to the client with an ACK
> and terminate the session.

The what are the effects of a long running query?  I don't see any
advantage here.  You can just pool between sockets with one "main"
thread, and try to read every once in a while by checking if there is
data available to be read in the (TCP) buffers.  This is, however, with
many connections a deadly situation.

Since Johann is working with a webserver, it sounds quite weird not to
use threads in the first place to me anyway.

More information about the developers-list mailing list