From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from localhost (localhost [127.0.0.1]) by olra.theworths.org (Postfix) with ESMTP id 74688431FCF for ; Fri, 19 Feb 2010 17:06:21 -0800 (PST) X-Virus-Scanned: Debian amavisd-new at olra.theworths.org X-Spam-Flag: NO X-Spam-Score: -0.866 X-Spam-Level: X-Spam-Status: No, score=-0.866 tagged_above=-999 required=5 tests=[AWL=-0.867, 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 8vbTO8cHo8C6 for ; Fri, 19 Feb 2010 17:06:20 -0800 (PST) Received: from flatline.sindominio.net (flatline.sindominio.net [82.144.4.26]) by olra.theworths.org (Postfix) with ESMTP id 922B8431FC7 for ; Fri, 19 Feb 2010 17:06:19 -0800 (PST) Received: from localhost (localhost.localdomain [127.0.0.1]) by flatline.sindominio.net (Postfix) with ESMTP id 43AB9348027; Sat, 20 Feb 2010 02:06:18 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at sindominio.net Received: from flatline.sindominio.net ([127.0.0.1]) by localhost (flatline.sindominio.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id eLNqoTcEvbvh; Sat, 20 Feb 2010 02:06:15 +0100 (CET) Received: from blackspot (a185042.upc-a.chello.nl [62.163.185.42]) by flatline.sindominio.net (Postfix) with ESMTPA id 5C74F348021; Sat, 20 Feb 2010 02:06:15 +0100 (CET) Received: by blackspot (Postfix, from userid 1000) id A5D028BC02; Sat, 20 Feb 2010 02:09:24 +0100 (CET) Date: Sat, 20 Feb 2010 02:09:24 +0100 From: Ruben Pollan To: Carl Worth Message-ID: <20100220010924.GD17814@blackspot> References: <874oo7hex2.fsf@yoom.home.cworth.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="MnLPg7ZWsaic7Fhd" Content-Disposition: inline In-Reply-To: <874oo7hex2.fsf@yoom.home.cworth.org> User-Agent: Mutt/1.5.20 (2009-06-14) Cc: Notmuch list Subject: Re: Quick thoughts on a notmuch daemon 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: Sat, 20 Feb 2010 01:06:21 -0000 --MnLPg7ZWsaic7Fhd Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable I started to code something base on your idea of a notmuch daemon. You can = find it on: git://gitorious.org/notsomuch/notmuch.git On the server branch. The idea is to use unix named sockets to intercomunicate between the daemon= and the client. And threads on the server to handle every request. The implementati= on is=20 no great, it's a fast hack. It can only handle one request per connection a= nd breaks=20 some times on concurrent request. But I hope helps to see the idea. I implemented both, daemon and client in the same binary. So you can still = run as before: $ notmuch search inbox If the daemon is already running (so the socket is in MAILDIR_PATH/.notmuch= /socket)=20 it will connect to it and ask for the search. If is not running will fork creating it and send it the search. Up to now the comunication between daemon and client is with the same synta= x of notmuch. But I think will be a nice idea to use JSON (or some other computer-friendly syntax) and convert it to human readable on the client. What do you think about that approach? Will it fit on what you imagined or = is it to far? I'm not sure if that is adding to much complexity to notmuch or is a good i= dea. --=20 Rub=E9n Poll=E1n | jabber:meskio@jabber.org -=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-=3D-= =3D-=3D-=3D-=3D-=3D- Nos vamos a Croatan. --MnLPg7ZWsaic7Fhd Content-Type: application/pgp-signature; name="signature.asc" Content-Description: Digital signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.10 (GNU/Linux) iEYEARECAAYFAkt/NkQACgkQGKOQ92SwNMK1UACfUOZGNocy5az5VlKXaJltRVky RVAAnjESHYZfHFWKg4ysX9tLigccOis4 =Olcn -----END PGP SIGNATURE----- --MnLPg7ZWsaic7Fhd--