All,

I am seeking input/feedback for the work that is going into KNOX-593. There is 
an initial patch uploaded and as can probably be gleaned fairly quickly, the 
idea is to move code out from Dispatch implementations and leverage apache 
common's HttpClient functionality as much as possible. Besides the code 
maintenance win, this hopefully reduces the need to create custom dispatches if 
we allow for HttpClient's to be pluggable.

Therefore while undertaking this effort, there is an attempt to make the 
HttpClient creation pluggable as well. Hence the new interface for 
HttpClientFactory. Right now the create method on factory interface is being 
passed the entire FilterConfig object. This felt odd to me from an interface 
cleanliness standpoint but it was my initial stab at the interface simply 
because it contained the information that the factory would likely need. I 
think I would like to make a more appropriate config object for this.

The only pluggability mechanism in the patch is that of adding the http client 
factory class name to the dispatch config in the service definition. The 
question becomes, do we need an overall setting in gateway-site? Do we need 
overrides at the topology level?

For example, the dispatch config in a service definition could look like this:

    <dispatch 
http-client-factory="org.apache.hadoop.gateway.MockHttpClientFactory"/>

Thanks in advance for the feedback.
Sumit.

Reply via email to