simple search api (was Re: mimetype standardisation by testsets)

Joe Shaw joeshaw at novell.com
Mon Nov 27 22:10:46 EET 2006


Hi,

On Mon, 2006-11-27 at 12:12 +0100, Jos van den Oever wrote:
> > > Exactly. And having live queries is similar to this.
> > >
> > > I'm not the best person to propose an asynchronous language because
> > > Strigi has only synchronous queries at the moment. If there's a good
> > > API, i might change that according to that API.
> >
> > Exposing the API over DBUS makes your queries async for free (only those
> > requested over dbus ofcourse :-) ).  Any dbus call has an async and a
> > blocking version, so clients can do what ever they want.
> 
> Yes, my point was defining a request that returns the results in
> packets instead of only one reply. This has the advantage the the gui
> can show results pretty quickly even if the query is slow.

In Beagle, all searches are inherently asynchronous.  The client sends a
query request, and a variety of signals are sent back.  HitsAdded,
HitsSubtracted, and Finished are the main ones.  As long as the
connection to the daemon stays open, events can keep being sent to the
client.  Hence, live queries.

I would suggest a similar setup using unique D-Bus object paths for a
standardized API.  (A synchronous API will be pretty darn slow for large
queries, I'm afraid.)

Joe




More information about the xdg mailing list