Netflix/ribbon — pull request #46 by allenxwang (2013-09-16 20:39:23+00:00)
Title: Add async HTTP support based on Netty

Adding asynchronous HTTP communication support on top of Netty. Clients can create asynchronous clients and registers callback for asynchronous calls.

```java
public interface AsyncClient {
public void execute(Request request, ResponseCallback callback) throws ClientException;

}

public interface ResponseCallback {
public void onResponseReceived(R response);

public void onException(Throwable e);
}
```

The following features are added:

- A generic serialization framework. Clients can configure serialization factory to serialize/deserialize with Netty ByteBuf. This mechanism will also be used in future for Jersey client doing customize serialization.
- ChannelFuture handler and client callback (where the deserialization happens) are executed in separate thread by default so that the NIO event loop will not be affected by CPU intensive tasks.
- AsyncLoadBalancingClient and LoadBalancingNettyClient provides integration with Ribbon load balancers.
- Proper handling of connect timeout and read timeout.

The following features will be considered for future:

- Route based channel pooling for persistent HTTP connections
- Secure HTTP connection