[Xapian-discuss] Node.js binding

Olly Betts olly at survex.com
Thu Nov 3 01:36:56 GMT 2011


On Thu, Oct 20, 2011 at 06:23:30PM -0700, Liam wrote:
> Making binding APIs a bit higher-level is pretty common in Node modules.

I think the correct approach here is probably to take this idea further.

It feel that bindings for node.js are really more akin to a plugin for a
framework.  While the "js" part is certainly a language, the "node."
part brings in a whole set of ways of thinking about things which makes
it much more like a framework.

Also, you don't have SWIG to generate your wrappers automatically - if
you did, it would be a lot less effort to closely follow Xapian's API,
but since you don't, it's going to need manual wrappers writing whether
you do or don't.

So rather than trying to directly map the Xapian API into node.js, I
would suggest you instead think about the sort of API which you would
ideally want to use for text indexing and search in node.js, and then
implement *that* API using Xapian.  

Cheers,
    Olly



More information about the Xapian-discuss mailing list