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

Jay Kreps commented on KAFKA-1316:
----------------------------------

I updated this patch to
1. Address a number of comments.
2. Get all the unit tests passing (there were a couple of bugs that caused 
tests to sporadically hang)

I think overall there are two levels of feedback here. The first is to iron out 
whether the API actually makes sense and is convenient (i.e. is what we are 
trying to do worth doing) and then figure out any additional stylistic or 
correctness issues (i.e. have we done it well).

The current approach has two layers. The network layer is in 
org.apache.kafka.clients.network and has the selector and logic for sending and 
receiving size-delimited byte arrays across a bunch of connections.

The new NetworkClient/KafkaClient layer (name could be improved) is basically 
adding on top of this several concerns:
1. Serialization
2. Cluster metadata management
3. Connection management

So let's really put some thought into seeing if we have these layers right and 
have the right apis.

> Refactor Sender
> ---------------
>
>                 Key: KAFKA-1316
>                 URL: https://issues.apache.org/jira/browse/KAFKA-1316
>             Project: Kafka
>          Issue Type: Sub-task
>          Components: producer 
>            Reporter: Jay Kreps
>            Assignee: Jay Kreps
>         Attachments: KAFKA-1316.patch, KAFKA-1316_2014-06-03_11:15:38.patch, 
> KAFKA-1316_2014-06-03_14:33:33.patch, KAFKA-1316_2014-06-07_11:20:38.patch
>
>
> Currently most of the logic of the producer I/O thread is in Sender.java.
> However we will need to do a fair number of similar things in the new 
> consumer. Specifically:
>  - Track in-flight requests
>  - Fetch metadata
>  - Manage connection lifecycle
> It may be possible to refactor some of this into a helper class that can be 
> shared with the consumer. This will require some detailed thought.



--
This message was sent by Atlassian JIRA
(v6.2#6252)

Reply via email to