Return-Path: X-Original-To: notmuch@notmuchmail.org Delivered-To: notmuch@notmuchmail.org Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id EA725431FBC for ; Fri, 15 Jan 2010 06:18:59 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.047 X-Spam-Level: X-Spam-Status: No, score=-0.047 tagged_above=-999 required=5 tests=[AWL=-0.048, BAYES_50=0.001] autolearn=ham Received: from olra.theworths.org ([127.0.0.1]) by localhost (olra.theworths.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id X8EOYp+Td5sV for ; Fri, 15 Jan 2010 06:18:59 -0800 (PST) Received: from fg-out-1718.google.com (fg-out-1718.google.com [72.14.220.159]) by olra.theworths.org (Postfix) with ESMTP id 21545431FAE for ; Fri, 15 Jan 2010 06:18:59 -0800 (PST) Received: by fg-out-1718.google.com with SMTP id e12so197098fga.2 for ; Fri, 15 Jan 2010 06:18:58 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:sender:from:to:subject :in-reply-to:references:date:message-id:mime-version:content-type; bh=rpW4gS0oj6E0+tHSeaFP5A1dAPPfM+eQdlwepAb1iEs=; b=xGU0cbO3D/Jlib+dOX1HS8/vp2zWt5sZ9JMTLrnmSBz+9+SOztrdqQW1IVGiE8P9km 4CNfIsS22GpGasr6x/ayhwgZPUhzkPs7W+PJgZTpFjk84+My/id1DyfVVVIXTG4PWn8v GdNrPaEgtUtoyhU8BoEEY08rLTIm9nqnFgtXY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:from:to:subject:in-reply-to:references:date:message-id :mime-version:content-type; b=g/NQR/49zw1zCMW7/pz+OcUULDJRwQY3RaXHXlz9s8s0YBLHAGY91F0xU3qUTaOPjo fxFjK8ZEalKaA08SbR2dnu7mBdHQDKZKJNIGg9p1g1P01wWLJ2+usKzUsIjZfu+FoDDQ OKCSG1dD8lbyysCaGZRGE3p8BnWIk0sDXp+ys= Received: by 10.223.2.69 with SMTP id 5mr2673707fai.88.1263565138072; Fri, 15 Jan 2010 06:18:58 -0800 (PST) Received: from kunyang (vawpc43.ethz.ch [129.132.59.11]) by mx.google.com with ESMTPS id 9sm2436784fks.52.2010.01.15.06.18.55 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 15 Jan 2010 06:18:56 -0800 (PST) Sender: Jed Brown From: Jed Brown To: David Bremner , notmuch@notmuchmail.org In-Reply-To: <87r5prcvtx.fsf@rocinante.cs.unb.ca> References: <871vhwei6n.fsf@59A2.org> <87ockva36t.fsf@59A2.org> <87r5prcvtx.fsf@rocinante.cs.unb.ca> Date: Fri, 15 Jan 2010 15:20:36 +0100 Message-ID: <87ljfza1qj.fsf@59A2.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Subject: Re: [notmuch] asynch operations protocol X-BeenThere: notmuch@notmuchmail.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: "Use and development of the notmuch mail system." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jan 2010 14:19:00 -0000 On Fri, 15 Jan 2010 09:59:54 -0400, David Bremner wrote: > Is this over/under engineered? I spent roughly as long on the design as > it took me to type :). Maybe the whole session id thing is redundant and > could be done at the socket level. Or, getting more serious about the > whole thing, maybe each queue operation should return an identifier. The asynchronous interface I work with most is MPI. There you get a Request object when the operation is initiated and you can {test,block}{one,some,any,all}, where the latter takes a list of requests. These variants are all useful, but of course they could be implemented as needed. I don't think that being able to support these variants places any particular burden on the design. I believe in performing operations with appropriate granularity, so I wouldn't expect cases where you need to manage thousands of active requests, thus I'm not sure the "session" grouping offers any real benefit. In any case, I'm not in favor of a single global flush. Jed