Re: [notmuch] Quick thoughts on a notmuch daemon

Subject: Re: [notmuch] Quick thoughts on a notmuch daemon

Date: Sat, 20 Feb 2010 02:09:24 +0100

To: Carl Worth

Cc: Notmuch list

From: Ruben Pollan


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@jabber.org
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
Nos vamos a Croatan.
signature.asc (application/pgp-signature)

Thread: