[Xapian-discuss] Node.js binding
Liam
xapian at networkimprov.net
Thu Nov 3 01:02:46 GMT 2011
On Sat, Oct 29, 2011 at 3:42 PM, Richard Boulton <richard at tartarus.org>wrote:
> On 29 October 2011 21:49, Liam <xapian at networkimprov.net> wrote:
> > It would help to know whether Xapian::Document composition methods (e.g.
> > add_term, add_value) do I/O for a new Document, one not yet added to a
> > WritableDatabase. I'm guessing they may write to a temporary store?
>
> They don't write to a temporary store, and won't do I/O; if you have a
> document large enough that it won't fit in memory, you're almost
> certainly doing something wrong.
>
Ah, so then I'd assume that TermGenerator::index_text(), and its siblings
also don't do I/O, is that correct?
So for WritableDatabase, I gather that these *may* do I/O:
add_document()
replace_document()
delete_document()
begin_transaction() -- due to implicit commit
and these *will* do I/O:
commit()
commit_transaction()
Also, in the Node binding, I was persuaded to use a "busy" member in each
class that has async methods to prevent concurrent access to those objects.
:-)
BTW, Node is easy to set up as it has no external dependencies: download at
http://nodejs.org, ./configure, make, make install.
I suspect Node is quite well suited to creating Xapian front-ends. It can
use all available cores to process queries, and when the thread pool is
busy it queues requests with minimal overhead.
More information about the Xapian-discuss
mailing list