[Xapian-discuss] Remote databases and daemons

Philip Neustrom philipn at gmail.com
Mon Mar 27 06:42:17 BST 2006

I've looked over the docs on remote backends, the protocol, and a bit
of the c++ for doing distributed and remote searches.  I've got a
couple of questions:

 * The remote protocol is usable only as a Database, not as a
WriteableDatabase -- is this correct?  So, if I don't want my
application to have a copy of the database on the same machine I'll
need to write an indexer daemon on the remote machine and talk to it
over TCP if i want to be able to remotely index?

 * The socketserver.cc and the corresponding xapian-tcpsrv looks like
it blocks, even for reads.  As far as I know, Xapian currently
supports "single-write, multiple-reads" of the database, which means
the tcpserver could be doing more.  Am I mistaken in thinking that a
read will block another read with the tcp server?

I'm building an application that I'd love to have near-real-time
indexing, e.g. when a user saves a document it's sent to xapian. 
That's how it works now, but it's on such a small scale that issues
like this don't matter.  What's the easiest way to make this work?

Here's what I'm thinking:  Write a small xapian-daemon server in
Python that listens on TCP and can index and search.  Because xapian
can only do one write at a time (last i checked?) the server will keep
a queue of index requests and apply them in order/thread to avoid
blocking.  Is this something that's useful or is there a more
xapiantic way to do this?

--Philip Neustrom

More information about the Xapian-discuss mailing list