Re: [notmuch] Quick thoughts on a notmuch daemon
authorRuben Pollan <meskio@sindominio.net>
Sat, 20 Feb 2010 01:09:24 +0000 (02:09 +0100)
committerW. Trevor King <wking@tremily.us>
Fri, 7 Nov 2014 17:36:14 +0000 (09:36 -0800)
f4/5eb6223ade541a8eaacbff89849ea358adfec8 [new file with mode: 0644]

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