Asynchronous Search

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view

Asynchronous Search



Thanks for your reply.  I hadn't noticed that you had replied to my question (i failed to subscribe to the list)!  Apologies for that.  I will definitely look at your blog and try to build a prototype.  It really looks as though this is the right solution.  The only thing to do is implement this solution.  Thanks for the offer of help as I will be back soon for more help! :)



Content-type: text/plain; CHARSET=US-ASCII; format=flowed

Date: Wed, 27 May 2009 11:26:46 -0400

From: Jeanfrancois Arcand <[hidden email]>

Subject: Ayschronous Search


Amin Mohammed-Coleman wrote:

> Hi

> I am currently working on building a proof of concept search solution 

> for my company using Lucene and Hibernate Search.  I have built 

> individual components which work fine.  I am now looking at creating a 

> single api that would allow a user to get search results back from 

> different sources (domain + data).  What I would like to achieve is 

> something like a search manager fires search requests to different 

> search components asynchronously and when one set of results have been 

> processed return that result to the user while processing the rest.  

> Once the result of the search has been processed notify teh client that 

> there are more search results available. 

> I came across your article 

> '' and I 

> was wondering if I could get peoples opinion on whether the use of 

> Comet/Atmosphere a good approach?

I'm biased since I'm the creator of Atmosphere, but what your are 

describing above can easily be implemented using a suspend/resume 

architecture. The idea is to suspend the request, delegate the search to 

the search manager, and resume once the result are ready. All 

application server those days have their own Suspend/Resume API, but 

Atmosphere is a layer on top so you can write you application and deploy 

in any java web server supporting the Servlet 2.5 and up specification.

You can either use the Atmosphere-core module (which supports REST via 

Jersey) or the lower lever component called atmosphere-cpr (cpr=Comet 

portable Runtime). You can see a blog here:

Hope that help, and don't hesitate to ask more questions :-)

-- Jeanfrancois

> Cheers

> Amin