[ 
https://issues.apache.org/jira/browse/SOLR-599?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16619784#comment-16619784
 ] 

Shawn Heisey commented on SOLR-599:
-----------------------------------

SolrJ hasn't used commons-httpclient in a LONG time.  Both commons-httpclient 
and httpcomponents were included in 3.6, but commons-httpclient was removed in 
4.0.

This is the full list of dependencies when solrj 7.4.0 is specified with a 
dependency manager:

{noformat}
commons-io-2.5.jar
commons-math3-3.6.1.jar
httpclient-4.5.3.jar
httpcore-4.4.6.jar
httpmime-4.5.3.jar
zookeeper-3.4.11.jar
stax2-api-3.1.4.jar
woodstox-core-asl-4.4.1.jar
noggit-0.8.jar
jcl-over-slf4j-1.7.24.jar
slf4j-api-1.7.24.jar
{noformat}

There are XML and JSON libraries because SolrJ supports XML and JSON transfer 
formats.  If 7.x/8.x client objects are created with defaults and only the more 
mainstream methods are used, the XML and JSON dependencies could probably be 
removed, since SolrJ defaults to javabin transfer on both request and response. 
 If CloudSolrClient is not being used, then the zookeeper jar will not need to 
be included.

The decision to use the Apache httpclient was made a long time ago.  Now we are 
proceeding with a switch to the Jetty httpclient to get HTTP/2 support, which 
will greatly alter the dependency landscape.

I'll leave the decision to others about whether we need a client based on 
Java's built-in http; my guess is that such a client is NOT needed.  The work 
related to HTTP/2 is being spearheaded by [~caomanhdat] and 
[[email protected]].


> Lightweight SolrJ client
> ------------------------
>
>                 Key: SOLR-599
>                 URL: https://issues.apache.org/jira/browse/SOLR-599
>             Project: Solr
>          Issue Type: Improvement
>          Components: clients - java, SolrJ
>            Reporter: Shalin Shekhar Mangar
>            Assignee: Noble Paul
>            Priority: Minor
>             Fix For: 4.9, 6.0
>
>         Attachments: SOLR-599-fix-for-SolrJ-on-GAE.patch, SOLR-599.patch, 
> SOLR-599.patch
>
>
> SolrJ provides a SolrServer implementation backed by commons-httpclient which 
> introduces many dependency jars (commons-codec, commons-io and 
> commons-logging). Apart from that SolrJ also uses StAX API for XML parsing 
> which introduces dependencies like stax-api, stax and stax-utils.
> This enhancement will add a SolrServer implementation backed by 
> java.net.HttpUrlConnection and will use BinaryResponseParser as the default 
> response parser. Using this basic implementation out of the box would require 
> no dependencies on either commons-httpclient or StAX. The only dependency 
> would be on solr-commons making this a very lightweight and distribution 
> friendly Java client for Solr.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to