-
Notifications
You must be signed in to change notification settings - Fork 96
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
Add a new stream buffer with an adaptative size #263
Comments
I managed to implement It need the associated type |
Haven't looked at the code thoroughly yet but the gist of it seems like it would make a good addition!
Guessing it is some variation of http://lukaskalbertodt.github.io/2018/08/03/solving-the-generalized-streaming-iterator-problem-without-gats.html ? Even with one of those techniques, a streaming iterator (streaming combine stream?) is not the right fit as it would prevent parsing from continue while a token/range is still alive.
|
You're right about streaming RangeStream, it's not a good idea ! I changed my mind, I will not implement RangeStream. But for a simple streaming combine stream, it works perfectly since the tokens are passed by value. I will test it further and when I think it's okay I create a Pull Request. |
Hello !
The combination of
BufferedStream
,ReadStream
andBufReader
is really great to read data from streaming stdin or else (eg. network input). ButBufferedStream
has a fixed size and it's complicated to find the good one when we don't know the content we will receive.So I developed a new Stream, named
ElasticBufferedReadStream
(I'm not good at finding short names) combining the features ofBufferedStream
,ReadStream
andBufReader
and adapting its size according to the checkpoints still owned by the parsers.It uses
Rc
andWeak
to track the checkpoints lifetimes.You can see my project here : https://github.com/kompass/combine-elastic-buffered-stream
It's still under development, I will add the
RangeStream
feature and continue to test everything to be sure it's stable.What dou you think about it ? Maybe we can add this stream into your project ?
The text was updated successfully, but these errors were encountered: