hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject HttpClient API redesign: high level component architecture (draft 1)
Date Fri, 07 Jan 2005 16:35:16 GMT
Folks,

I have been quietly working on the HttpClient 4.0 API redesign for quite
a while already. I am confident the time is right to start discussing
the high level concept of the new API and try to agree on the most
fundamental goals and priorities of the API (re-)design and most
fundamental principles of the new architecture.

I would like to open discussion by presenting a VERY rough sketch of how
I tend to see the future of we know today as Jakarta HttpClient (please
do not confuse with Commons HttpClient)

Please note this is far from being even close to something logically
coherent and consistent. I just felt that I should get your feedback as
early as possible.

Evil Comrade Oleg

======================================================================

GOALS
=====

* Transform HttpClient from a client-side monolithic library into a toolset 
  of loosely coupled components.
* Provide a more modular structure enabling the users to assemble custom 
  client- and server-side HTTP services
* Resolve the deficiencies of the 3.0 API

COMPONENT STRUCTURE
===================

This is a purely logical distinction. The below listed components may be
distributed separately or as a part of a larger package (jar).

http-common
-----------

 depends on 
   - Java 1.4 (shall we consider 1.5?)
   - commons-logging (*) (if feasible I'd rather do without this dependency)

 * Http header primitives as defined in RFC 822
   
   - HttpHeader class
   - HttpHeaderElement class
   - HttpHeaderGroup class

 * Http request line and Http status line primitives as defined in RFC 2616

   - HttpVersion class
   - HttpStatus class
   - HttpRequestLine class
   - HttpSatusLine class

 * Http parameter primitives (see preference architecture in 3.0 API)

   - HttpParams interface
   - DefaultHttpParams class

 * Http request and Http response interfaces as defined in RFC 2616 and their
   generic implementation

   - HttpRequest interface
   - HttpResponse interface
   - HttpEntityEnclosingRequest interface
   - HttpRequestParams class
   - BasicHttpRequest class implementing HttpRequest
   - BasicHttpResponse class implementing HttpResponse
   - BasicHttpEntityEnclosingRequest class implementing HttpEntityEnclosingRequest 

 * Http parser interface and the RFC 2616 compliant implementation of it. The
   parser must only be able to parse well formed Http requests and responses.

   - HttpParser interface
   - NIOHttpParser class based on NIO (makes use of Socketchannel and CharBuffer)

 * Http connection interface including a simple dependency mechanism to inject 
   an Http parser implementation, and a generic implementation of Http connection

   - HttpConnection interface
   - HttpConnectionParams class
   - NIOHttpConnection class based on NIO (makes use of Socketchannel)

 * Input / output chunking streams
   
   - ChunkedInputStream class
   - ChunkedOutputStream class

 * HttpFilter interface allowing for request pre-processing and response post-
   processing without having to subclass a given HttpRequest or HttpResponse
   implementing classes
   
   - HttpFilter interface

 * HttpMethodExecutor class capable of executing http requests and receiving 
   Http responses. This class also is capable of retrying failed requests 
   and provides a means of injecting a number of Http filters. This class DOES
   NOT provide connection pooling/management facilities, and DOES NOT handle 
   redirects and authentication challenges.

   - HttpMethodExecutor class
   - HttpRequestRetryHandler interface
   - DefaultHttpRequestRetryHandler class implementing HttpRequestRetryHandler 
     interface

http-cookie
-----------

 depends on 
   - Java 1.2
   - commons-logging (*) (if feasible I'd rather do without this dependency)
   - http-common (*) (if feasible I'd rather do without this dependency)

 * Http cookie interface as defined in RFC2965 and RFC2109 and compatible with
   Netscape cookie draft and servlet specification. Generic Http cookie 
   implementation.

   - HttpCookie interface
   - Cookie class (client side cookie)
   - SetCookie class (Server side cookie)

 * Http cookie specification interface that defines the contract for cookie 
   parsing, validation, formatting and matching.

   - HttpCookieSpec interface
   - CompatibilityCookieSpec class 
   - RFC2965CookieSpec class as defined in RFC 2965
   - RFC2109CookieSpec class as defined in RFC 2109
   - NetscapeCookieSpec class as defined in the Netscape cookie draft 


http-auth
-----------

 depends on 
   - Java 1.4
   - commons-logging (*) (if feasible I'd rather do without this dependency)
   - commons-codec
   - http-common

 * Http credentials primitives
   
   - Credentials interface
   - BasicCredentials class implementing Credentials interface
   - WindowsCredentials class implementing Credentials interface

 * Http authentication primitives. Authentication schemes should be
   able to be produce and respond to authentication challenges (both
   client and server side)

   - AuthScheme interface
   - BasicScheme class implementing HttpState
   - DigestScheme class implementing HttpState
   - NTLMScheme class implementing HttpState
   - AuthChallengeParser class


http-client
-----------

 depends on 
   - Java 1.4
   - commons-logging (logging UGLI? vote?)
   - commons-codec
   - commons-pool (needed? vote?)
   - http-common
   - http-cookie
   - http-auth
   
 * Http connection manager / connection pool interface and most common
   implementations of it.
   
   - HttpConnectionManagerParams class
   - HttpConnectionManager interface
   - SimpleConnectionManager class implementing HttpConnectionManager 
     interface
   - PoolingConnectionManager class implementing HttpConnectionManager
     interface

 * Http state primitives. Http state stores Http session data: credentials,
   cookies.
   
   - HttpState interface
   - CredentialsProvider interface
   - InMemoryHttpState class implementing HttpState interface

 * Http agent primitives
   
   - HttpClientParams class
   - AuthChallengeHandler interface
   - StdAuthChallengeHandler class implementing AuthChallengeHandler interface
   - RedirectHandler interface
   - StdRedirectHandler class implementing RedirectHandler interface
   - StdAuthChallengeHandler class implementing AuthChallengeHandler interface
   - HttpHost class
   - HttpProxyHost class
   - HttpHostParams class
   - HostConfig class
   - HttpClient class. Supports a simple dependency injection mechanism to
     inject HttpConnectionManager, AuthChallengeHandler, RedirectHandler, HttpFilter
     and possibly other dependencies.

http-client-3-compat
--------------------
 depends on 
   - Java 1.4
   - commons-logging
   - commons-codec
   - http-common
   - http-cookie
   - http-auth
   - http-client

  If there are any volunteers to maintain it. <warning>Count me out.</warning>

http-spider
--------------------
 depends on 
   - Java 1.4
   - commons-logging
   - commons-codec
   - http-common
   - http-cookie
   - http-auth
   - http-client

  A web crawler of a sort. Need more people on board

  ideas?

http-proxy
--------------------
 depends on 
   - Java 1.4
   - commons-logging
   - commons-codec
   - http-common
   - http-cookie
   - http-auth
   - geronimo-network (appropriate? better options? vote?)

  A simple reverse proxy of a sort. Need MORE people on board

  ideas?

http-server
--------------------
 depends on 
   - Java 1.4
   - commons-logging
   - commons-codec
   - http-common
   - http-cookie
   - http-auth
   - geronimo-network (appropriate? better options? vote?)

  A simple embeddable HTTP server of a sort. Need MOOOOOOOORE people on board.

  ideas?


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


Mime
View raw message