Hi,
I am currently playing with http2 server push for implementing rest API streaming between vertx client and vertx server.
Recently I just observed strange behavior of push event.
It looks like race condition on sequence of streaming if I used artificial delay for each response events to simulate realistic async events.
Let's say,
(1) push1 with 100ms delay
(2) push2 with no delay
(3) main response end() after 450ms delay
Expected sequence was seen when only first time I loaded the process, then subsequently showing this order :
(2) push2 (no delay) -> (3) main response (450ms) -> (1) push1 (450ms)
Would you please let me know if I need to set some options to avoid this? I guess push1 is suspended by certain event scheduler.
example source:
http2 server :
https://github.com/twobassdrum/http2Server-vertx/blob/master/src/main/java/com/twobassdrum/Http2Server.java http2 client :
https://github.com/twobassdrum/http2Client-vertx/blob/master/src/main/java/com/twobassdrum/Http2Client.javaInterestingly, node-http2 didn't show same problem and it always guarantees the sequence of server push queue.
Currently I am using h2c with no SSL, no ALPN since mutual side I could handle and configure. (SSL and ALPN options are also tested but same behavior)
vertx-core version : 3.3.2
Please help :)
thanks,
Wooseok Jeong