Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transformer.orderedMergeWith: Allow configuring Source Observable Backpressure BufferSize #29

Open
moderakh opened this issue Apr 2, 2018 · 5 comments

Comments

@moderakh
Copy link

moderakh commented Apr 2, 2018

Hi David,

We are using rxjava-extras as a dependency:
https://mvnrepository.com/artifact/com.microsoft.azure/azure-cosmosdb/1.0.0
https://github.com/Azure/azure-cosmosdb-java

We are using Transformer.orderedMergeWith.
It appears to me that in the implementation of BackPressure for the above operator for each of the source observables, RxRingBuffer.SIZE items will be buffered. Am I right?

If not already supported, is that possible to provide a overload for Transformer.orderedMergeWith which allows configuring the buffered size for each source observable? It is critical for our use case.

Thank you @davidmoten

@davidmoten
Copy link
Owner

@moderakh That won't be a problem. I'll knock that up.

@davidmoten
Copy link
Owner

@moderakh when you say it's critical for your use case, can you be more specific?

@moderakh
Copy link
Author

moderakh commented Apr 2, 2018

@davidmoten Azure Cosmos db Orderby is computationally expensive and also each user is assigned a fixed budget for query in every second.

When a query in user's scope is executed we deduct user's budget. Right now for our cross partition orderby query in the SDK side we are relying on Transformer.orderedMergeWith.

The fact that Transformer.orderedMergeWith fetches a lot of data upfront means the computational expense for running orderby query and fetching a lot of data will be paid upfront and even if the user is only interested in the first few pages of results still not having a configurable buffer size means the user will have to pay some additional cost upfront.

@davidmoten
Copy link
Owner

Thanks for the explanation, makes sense. 0.8.0.15 has the new overload, should be available for download from Maven Central in about ten minutes.

@moderakh
Copy link
Author

moderakh commented Apr 2, 2018

wow, that's amazing. Thank you for such quick feature implementation and release. :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants