[Monetdb-developers] MapiClient asynchronous interface?

Martin Kersten Martin.Kersten at cwi.nl
Sat Nov 18 16:22:48 CET 2006


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.


Fabian Groffen wrote:
> On 18-11-2006 16:11:04 +0100, Johann Borck wrote:
>> Fabian Groffen wrote:
>>> Hi Johann,
>>>
>>> I don't really understand what you mean by "asynchronous" in the sense
>>> of Mapi(Client).  Can you give an example of what you ideally would like
>>> to do?
> 
>> I'd like to use nonblocking sockets, so that I can send a request to
>> MonetDB, and the call returns immediately. When monet sends data, the
>> client is notified (by poll/select or similar) and processes data as it
>> arrives. Because this is the core-functionality of my webserver anyway
>> I'd like to prevent it from blocking on a recv/read on the socket,
>> because that would force me to use dedicated threads for db-connections.
> 
> Ah, I see.  No, this is not possible.  The design of the whole protocol
> is based on answer/response rituals that are serial.  This is also
> backing up transactions, hence will not change.  The conventional way of
> solving this is by using threads for connections (e.g. connection
> pooling).  If you don't want to go that route, there is not much we can
> do.
> 
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share your
> opinions on IT & business topics through brief surveys - and earn cash
> http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
> _______________________________________________
> Monetdb-developers mailing list
> Monetdb-developers at lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/monetdb-developers




More information about the developers-list mailing list