[notmuch] Quick thoughts on a notmuch daemon

Ruben Pollan meskio at sindominio.net
Fri Feb 19 17:09:24 PST 2010


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 implementation is 
no great, it's a fast hack. It can only handle one request per connection and breaks 
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) 
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 syntax 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 idea.

-- 
Rubén Pollán  | jabber:meskio at jabber.org
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Nos vamos a Croatan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://notmuchmail.org/pipermail/notmuch/attachments/20100220/3f2ce28c/attachment.pgp>


More information about the notmuch mailing list