samples of back pressure which can easily happen#726
samples of back pressure which can easily happen#726musketyr wants to merge 1 commit intoapache:masterfrom
Conversation
just for example. no need to merge if you don't want to implement back pressure handling.
|
Nice example @musketyr . I tried using RxJava's support for reactive pull backpressure: I think that the "reactive pull backpressure" pattern is meant to be used to prevent the backpressure problems you were describing. It would be nice to make sure that it's fully supported in RxGorm. |
|
Yeah, I can see you have the same problem as me when I run it. The problem with the I've tried the batch operator doing the same reactive pull approach as you've did but it doesn't work very well either as actually the batches were read one after another in high rate so I get into back pressure problem again. I know the solution lies somewhere here or here https://github.com/ReactiveX/RxJava/blob/1.x/src/main/java/rx/observables/AsyncOnSubscribe.java but it's way beyond my Rx knowledge. |
|
We support this in cases that we have control over, in the case of the MongoDB implementation support would have to be written in the mongodb-rx drivers. |
|
@musketyr @graemerocher It looks like the mongodb-rx drivers support the "reactive pull" backpressure (flow control) since the producer implements the request method. I assume it's a matter of making sure (=writing tests and fixing problems) that "reactive pull" is supported for all operators in the full chain up to the mongodb rx driver. One way to test it would be to inject some wrapper/proxy in the test that intercepts the interaction with the mongodb rx driver to see if demand is signaled correctly via request method calls. I guess it's easy to break "reactive pull" backpressure since supporting reactive backpressure is optional in RxJava v1. |
|
|
Update spring core to v5.3.29
just for example. no need to merge if you don't want to implement back pressure handling. the test can run very long time or break the build with OOME.
cc @graemerocher