[Xapian-discuss] Future of Xapian (long)

James Aylett james-xapian@tartarus.org
Mon, 21 Jun 2004 13:20:15 +0100


On Mon, Jun 21, 2004 at 12:30:49PM +0100, Richard Boulton wrote:

> Francis Irving wrote:
> >>b. A web server for Xapian.
> >Why?  Sounds like an actually bad idea to me.
> 
> I should rephrase this: "An application server providing an interface to 
> Xapian over HTTP".  (This would probably also use XML to format the 
> returned data.) The idea of this is that it allows a web application 
> developer to talk to a Xapian system, possibly running on a remote 
> machine, using a standard protocol which is supported in many languages. 
>  The idea is certainly not that the Xapian webserver would be exposed 
> directly to the public internet.

I'm going to buck the trend in the world and say that this is the
wrong approach. I think we'd be better off using a protocol that is
more appropriate for application servers than HTTP. (Actually, I'm not
really bucking the trend - note that SOAP provides an abstraction over
HTTP that gets rid of most of its functionality to provide a layer
more useful to most web apps; note also that some aspects of HTTP have
made SOAP's life very difficult. As a contra argument, however, nobody
has actually solved the hard problems SOAP tries to address as yet.)

The ideal of an app server for Xapian is a good one, though, at least
in theory. What sort of interfaces would it support?

> Why use HTTP for this?  Mainly because many languages now have support 
> for HTTP built in, so integration is extremely easy.

Actually, I disagree with this statement. Even Python, which has
reasonable HTTP support, can be a pain to Do The Right Thing with as a
client. HTTP has too many options, and too many libraries do the wrong
thing in a couple of subtle cases; I can't remember what Python's are
off-hand, except that I have to use httplib half the time and urllib2
half the time, and sometimes have to subclass or extend parts of them that
are only semi-documented - most people don't have the knowledge or
patience for that.



I'm prepared to lose this argument, though. Certainly the pro-argument
that wide deployment of client libraries makes this easier than if we
use something newer or more funky is fairly compelling.

J

-- 
/--------------------------------------------------------------------------\
  James Aylett                                                  xapian.org
  james@tartarus.org                               uncertaintydivision.org