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

Ryan Schmitt commented on HTTPCLIENT-1942:
------------------------------------------

[~olegk] Thanks for the pointer. I'm working on some integration tests and I've 
found a couple of issues. In my tests, I decided to parameterize over HTTP/1.1 
and HTTP/2, since the two protocols appears to have substantially different 
streaming implementations. Everything has been going pretty smoothly on the 
HTTP/1.1 side, but the integration tests don't work well on HTTP/2:

1. The test for the [happy 
path|https://github.com/rschmitt/httpcomponents-core/commit/065118886993b05235fc793130ae5c0804d029b8#diff-1a8be7a218920e8829ad007c75de4f09R210]
 often hangs forever at {{Future#get}} (but it succeeds when it doesn't hang)
2. The test for [request 
errors|https://github.com/rschmitt/httpcomponents-core/commit/065118886993b05235fc793130ae5c0804d029b8#diff-1a8be7a218920e8829ad007c75de4f09R250]
 also hangs forever at {{Future#get}}, and furthermore the exception in the 
request stream is translated into a {{GOAWAY}} frame instead of a 
{{RST_STREAM}} on the relevant request stream

In addition, I've noticed that my {{ReactiveDataConsumer}} is called upon to 
buffer quite a bit of data before it ever signals that it has any capacity 
free. I have seen it required to buffer hundreds of kilobytes of data across 
dozens of {{consume(ByteBuffer)}} calls before it ever has a downstream 
subscriber who requests data. This isn't necessarily a bug, but the exact 
buffering requirements (whatever they are) should ideally be documented as part 
of the {{AsyncDataConsumer}} interface (which currently only 
[states|https://github.com/ok2c/httpcore/blob/api_javadocs/httpcore5/src/main/java/org/apache/hc/core5/http/nio/AsyncDataConsumer.java#L52-L63]
 that the entire buffer must be consumed whenever {{consume}} is called).

> Add support for Reactive Streams
> --------------------------------
>
>                 Key: HTTPCLIENT-1942
>                 URL: https://issues.apache.org/jira/browse/HTTPCLIENT-1942
>             Project: HttpComponents HttpClient
>          Issue Type: Wish
>          Components: HttpClient (async)
>    Affects Versions: 5.0 Beta1
>            Reporter: Ryan Schmitt
>            Priority: Major
>              Labels: stuck, volunteers-wanted
>             Fix For: Future
>
>
> It would be very helpful to me if the Apache client provided an 
> implementation of the [Reactive Streams|http://www.reactive-streams.org/] 
> spec, particularly as an implementation of the standard 
> [interfaces|https://search.maven.org/artifact/org.reactivestreams/reactive-streams/1.0.2/jar].
>  These interfaces are JDK6-compatible and have no other dependencies, but 
> they unlock interoperability with many other frameworks, such as RxJava.



--
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