You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Chantal Ackermann (JIRA)" <ji...@apache.org> on 2010/07/29 10:05:17 UTC

[jira] Created: (SOLR-2020) HttpComponentsSolrServer

HttpComponentsSolrServer
------------------------

                 Key: SOLR-2020
                 URL: https://issues.apache.org/jira/browse/SOLR-2020
             Project: Solr
          Issue Type: New Feature
          Components: clients - java
    Affects Versions: 1.4.1
         Environment: Any
            Reporter: Chantal Ackermann
            Priority: Minor


Implementation of SolrServer that uses the Apache Http Components framework.

Http Components (http://hc.apache.org/) is the successor of Commons HttpClient and thus HttpComponentsSolrServer would be a successor of CommonsHttpSolrServer, in the future.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (SOLR-2020) HttpComponentsSolrServer

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12893658#action_12893658 ] 

Yonik Seeley commented on SOLR-2020:
------------------------------------

Thanks!  It will be nice to not be stuck on the older HttpClient forever.  This will change some public APIs of course, since HttpClient is exposed, but that should be OK for trunk (4.0-dev).

Any thoughts on StreamingUpdateSolrServer's use of RequestEntity?


> HttpComponentsSolrServer
> ------------------------
>
>                 Key: SOLR-2020
>                 URL: https://issues.apache.org/jira/browse/SOLR-2020
>             Project: Solr
>          Issue Type: New Feature
>          Components: clients - java
>    Affects Versions: 1.4.1
>         Environment: Any
>            Reporter: Chantal Ackermann
>            Priority: Minor
>         Attachments: HttpComponentsSolrServer.java, HttpComponentsSolrServerTest.java
>
>
> Implementation of SolrServer that uses the Apache Http Components framework.
> Http Components (http://hc.apache.org/) is the successor of Commons HttpClient and thus HttpComponentsSolrServer would be a successor of CommonsHttpSolrServer, in the future.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (SOLR-2020) HttpComponentsSolrServer

Posted by "Chantal Ackermann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12894142#action_12894142 ] 

Chantal Ackermann commented on SOLR-2020:
-----------------------------------------

Hi Yonik,

I had a look at the sources of SearchHandler and ResponseBuilder. It think it would work replacing the CommonsHttpSolrServer with the HttpComponentsSolrServer and replace the part where the HttpClient is initialized with the new initialization procedure for version 4.

While contemplating these comments from SearchHandler/HttpCommComponent I wonder whether upgrading to Http Components would not be a good time to address these TODOs:
"""
// TODO: generalize how a comm component can fit into search component framework
// TODO: statics should be per-core singletons

class HttpCommComponent {

  // We want an executor that doesn't take up any resources if
  // it's not used, so it could be created statically for
  // the distributed search component if desired.
"""

Have there already been ideas on how to generalize that comm component? I'm not sure I understand that comment correctly.
I also wondered why there aren't specialized classes for the shard requests? Something like:

-> subclass ShardSearchHandler extends SearchHandler
-> subclass ShardResponseBuilder extends ResponseBuilder
containing all code handling distributed requests, including the HttpCommComponent.

Maybe the plugin framework does not allow these subclasses without breaking a lot - if at all possible?

Or some kind of "ShardingService" that takes over the work for the SearchHandler when it comes to distributed requests. Maybe this could be what is called generalized comm component in the comment?
If a request is distributed the SearchHandler (and others?) delegates to the ShardingService.
This ShardingService could be configurable to use any implementation of SolrServer. (Does that make sense? Using an embedded SolrServer for distributed requests? Not really - but maybe using their own SolrServer implementations?)

> HttpComponentsSolrServer
> ------------------------
>
>                 Key: SOLR-2020
>                 URL: https://issues.apache.org/jira/browse/SOLR-2020
>             Project: Solr
>          Issue Type: New Feature
>          Components: clients - java
>    Affects Versions: 1.4.1
>         Environment: Any
>            Reporter: Chantal Ackermann
>            Priority: Minor
>         Attachments: HttpComponentsSolrServer.java, HttpComponentsSolrServerTest.java
>
>
> Implementation of SolrServer that uses the Apache Http Components framework.
> Http Components (http://hc.apache.org/) is the successor of Commons HttpClient and thus HttpComponentsSolrServer would be a successor of CommonsHttpSolrServer, in the future.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (SOLR-2020) HttpComponentsSolrServer

Posted by "Chantal Ackermann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12894174#action_12894174 ] 

Chantal Ackermann commented on SOLR-2020:
-----------------------------------------

Concerning StreamingUpdateSolrServer's RequestEntity:

The replacement is probably EntityTemplate which takes a ContentProducer as argument.

http://hc.apache.org/httpcomponents-core/httpcore/apidocs/org/apache/http/entity/EntityTemplate.html
http://hc.apache.org/httpcomponents-core/httpcore/apidocs/org/apache/http/entity/ContentProducer.html

EntityTemplate entity = new EntityTemplate(new ContentProducer() {
    public void writeTo(OutputStream out) {
        // the current implementation of RequestEntity.writeRequest(OutputStream) in StreamingUpdateSolrServer
    }
}

The following lines (lines 149pp) need to be changed, as well. I can have a look at that (next days?).

> HttpComponentsSolrServer
> ------------------------
>
>                 Key: SOLR-2020
>                 URL: https://issues.apache.org/jira/browse/SOLR-2020
>             Project: Solr
>          Issue Type: New Feature
>          Components: clients - java
>    Affects Versions: 1.4.1
>         Environment: Any
>            Reporter: Chantal Ackermann
>            Priority: Minor
>         Attachments: HttpComponentsSolrServer.java, HttpComponentsSolrServerTest.java
>
>
> Implementation of SolrServer that uses the Apache Http Components framework.
> Http Components (http://hc.apache.org/) is the successor of Commons HttpClient and thus HttpComponentsSolrServer would be a successor of CommonsHttpSolrServer, in the future.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Updated: (SOLR-2020) HttpComponentsSolrServer

Posted by "Chantal Ackermann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chantal Ackermann updated SOLR-2020:
------------------------------------

    Attachment: HttpComponentsSolrServerTest.java

Tests GET and POST, but not multipart POST.

> HttpComponentsSolrServer
> ------------------------
>
>                 Key: SOLR-2020
>                 URL: https://issues.apache.org/jira/browse/SOLR-2020
>             Project: Solr
>          Issue Type: New Feature
>          Components: clients - java
>    Affects Versions: 1.4.1
>         Environment: Any
>            Reporter: Chantal Ackermann
>            Priority: Minor
>         Attachments: HttpComponentsSolrServer.java, HttpComponentsSolrServerTest.java
>
>
> Implementation of SolrServer that uses the Apache Http Components framework.
> Http Components (http://hc.apache.org/) is the successor of Commons HttpClient and thus HttpComponentsSolrServer would be a successor of CommonsHttpSolrServer, in the future.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (SOLR-2020) HttpComponentsSolrServer

Posted by "Chantal Ackermann (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12894112#action_12894112 ] 

Chantal Ackermann commented on SOLR-2020:
-----------------------------------------

The HttpComponentsSolrServer.java requires the following libraries in the classpath:

httpcore-4.0.1.jar
httpclient-4.0.1.jar
httpmime-4.0.1.jar

> HttpComponentsSolrServer
> ------------------------
>
>                 Key: SOLR-2020
>                 URL: https://issues.apache.org/jira/browse/SOLR-2020
>             Project: Solr
>          Issue Type: New Feature
>          Components: clients - java
>    Affects Versions: 1.4.1
>         Environment: Any
>            Reporter: Chantal Ackermann
>            Priority: Minor
>         Attachments: HttpComponentsSolrServer.java, HttpComponentsSolrServerTest.java
>
>
> Implementation of SolrServer that uses the Apache Http Components framework.
> Http Components (http://hc.apache.org/) is the successor of Commons HttpClient and thus HttpComponentsSolrServer would be a successor of CommonsHttpSolrServer, in the future.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Updated: (SOLR-2020) HttpComponentsSolrServer

Posted by "Chantal Ackermann (JIRA)" <ji...@apache.org>.
     [ https://issues.apache.org/jira/browse/SOLR-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Chantal Ackermann updated SOLR-2020:
------------------------------------

    Attachment: HttpComponentsSolrServer.java

Complete implementation that works for GET and is untested for POST.

> HttpComponentsSolrServer
> ------------------------
>
>                 Key: SOLR-2020
>                 URL: https://issues.apache.org/jira/browse/SOLR-2020
>             Project: Solr
>          Issue Type: New Feature
>          Components: clients - java
>    Affects Versions: 1.4.1
>         Environment: Any
>            Reporter: Chantal Ackermann
>            Priority: Minor
>         Attachments: HttpComponentsSolrServer.java
>
>
> Implementation of SolrServer that uses the Apache Http Components framework.
> Http Components (http://hc.apache.org/) is the successor of Commons HttpClient and thus HttpComponentsSolrServer would be a successor of CommonsHttpSolrServer, in the future.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org


[jira] Commented: (SOLR-2020) HttpComponentsSolrServer

Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
    [ https://issues.apache.org/jira/browse/SOLR-2020?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12893660#action_12893660 ] 

Yonik Seeley commented on SOLR-2020:
------------------------------------

Also see HttpCommComponent below Solr's SearchHandler class here:
http://svn.apache.org/viewvc/lucene/dev/trunk/solr/src/java/org/apache/solr/handler/component/SearchHandler.java?view=markup


> HttpComponentsSolrServer
> ------------------------
>
>                 Key: SOLR-2020
>                 URL: https://issues.apache.org/jira/browse/SOLR-2020
>             Project: Solr
>          Issue Type: New Feature
>          Components: clients - java
>    Affects Versions: 1.4.1
>         Environment: Any
>            Reporter: Chantal Ackermann
>            Priority: Minor
>         Attachments: HttpComponentsSolrServer.java, HttpComponentsSolrServerTest.java
>
>
> Implementation of SolrServer that uses the Apache Http Components framework.
> Http Components (http://hc.apache.org/) is the successor of Commons HttpClient and thus HttpComponentsSolrServer would be a successor of CommonsHttpSolrServer, in the future.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org