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
Streaming incompatibility with Dubbo #3964
Comments
One of the solution that we can think of is to write down the stream of objects to a local file. Then the interface returns a FileInputStream of that local file. However, this solution really kills the beauty of java.util.stream. We bet that the Dubbo community, with years of experience working with remote method invocation, would have a more efficient and adequate solution for this issue. |
https://github.com/apache/incubator-dubbo/tree/3.x-dev/dubbo-rpc/dubbo-rpc-rsocket I think you need a Stream pipeline between the Client and the Server. This feature in 3.0.0 may meet your requirement. |
Dear @chickenlj, Thanks you for your exciting information.
|
the stream support is basing on rsocket , you can find doc for rsocket at http://rsocket.io/ for now , dubbo-rpc-rsocket is just draft code for demo. |
@uglycow, thanks for your information. |
The |
Environment
Steps to reproduce this issue
We are having an interface that scan records from HBase and return a stream of records.
Stream<CustomRecord> scan(String startRow, String stopRow);
We have learnt that the Duddo protocol does not support Stream, but it can handle the stream of objects when it is converted into
java.io.InputStream
.However, when using
ByteArrayInputStream
as the replacement of theStream<CustomRecord>
for our interface, we got an OutOfMemory exception, since the stream grows too large and exceeds the heap size (ByteArrayInputStream keeps the byte[] in memory).Our question
Our question is: What would be the best approach for this issue? Do you have an alternative InputStream implementation for this use case? Or do you know of any already-used solution in Dubbo community?
The text was updated successfully, but these errors were encountered: