lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Underwood <wun...@wunderwood.org>
Subject Re: SolrJ with Async Http Client
Date Wed, 03 Jan 2018 15:22:32 GMT
HTTPClient is non-blocking. Send the request, then the client gets control back. It only blocks
when you do the read. So one thread can send multiple requests then check for each response.

wunder
Walter Underwood
wunder@wunderwood.org
http://observer.wunderwood.org/  (my blog)


> On Jan 3, 2018, at 5:11 AM, RAUNAK AGRAWAL <agrawal.raunak@gmail.com> wrote:
> 
> Yes, I am talking about event driven way of calling solr, so that I can
> write pure async web service. Does SolrJ provides support for non-blocking
> calls?
> 
> On Wed, Jan 3, 2018 at 6:22 PM, Hendrik Haddorp <hendrik.haddorp@gmx.net>
> wrote:
> 
>> There is asynchronous and non-blocking. If I use 100 threads to perform
>> calls to Solr using the standard Java HTTP client or SolrJ I block 100
>> threads even if I don't block my program logic threads by using async
>> calls. However if I perform those HTTP calls using a non-blocking HTTP
>> client, like netty, I basically only need a single eventing thread in
>> addition to my normal threads. The advantage is less memory usage and an
>> often better scaling. I would however expect that the main advantage would
>> be on the server side.
>> 
>> 
>> On 02.01.2018 22:02, Gus Heck wrote:
>> 
>>> It's not very clear (to me) what your use case is, but generally speaking,
>>> asynchronous requests can be achieved by using threads/executors/futures
>>> (java) or ajax (javascript). The link seems to be a scala project, I'm
>>> sure
>>> scala has analogous facilities.
>>> 
>>> On Tue, Jan 2, 2018 at 10:31 AM, RAUNAK AGRAWAL <agrawal.raunak@gmail.com
>>>> 
>>> wrote:
>>> 
>>> Hi Guys,
>>>> 
>>>> I am trying to write fully async service where solr calls are also async.
>>>> Just wondering did anyone tried calling solr in non-blocking mode or is
>>>> there is a way to do it? I have come across one such project
>>>> <https://github.com/inoio/solrs> but wondering is there anything
>>>> provided
>>>> by solrj?
>>>> 
>>>> Thanks
>>>> 
>>>> 
>>> 
>>> 
>> 


Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message