gradle / build-analysis-demo

Build data analysis applications
MIT License
10 stars 7 forks source link

Consume compressed response streams #1

Open ldaley opened 5 years ago

ldaley commented 5 years ago

https://github.com/gradle/build-analysis/blob/57572c80d55491946cd33207d363d7372900d9b6/build-event-collectorator/src/main/kotlin/org/gradle/buildeng/analysis/consumer/BuildConsumer.kt#L106

Needs Accept-Encoding: gzip

eriwen commented 5 years ago

@ldaley if I add this and run, I get:

Error streaming /build-export/v1/builds/since/1542339674393: java.lang.IndexOutOfBoundsException: length(21) exceeds dst.writableBytes(13) where dst is: PooledUnsafeDirectByteBuf(ridx: 0, widx: 243, cap: 256), resuming from null...

I tried also "deflate, gzip" with no success. Some searching didn't turn up any obvious solutions. Do you have an example where this is applied correctly?

ldaley commented 5 years ago

Looks like RxNetty doesn't support compression, sad face… https://github.com/ReactiveX/RxNetty/issues/411

ldaley commented 5 years ago

There's some discussion of how to achieve it here: https://github.com/ReactiveX/RxNetty/issues/573

The impact of compression can be quite significant in terms of increased throughput. I think it's definitely worth some time trying to get working.

eriwen commented 5 years ago

Thanks, I'll spend some time on it tomorrow.

eriwen commented 5 years ago

This is handled by the ratpack-client branch, but needs some work.