You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This issue is meant to discuss implementation details. At this point no idea is too wacky.
I've been noodling on how to implement a backend thread reader.
One challenge I have is that we don't want to read too much into buffers. Ideally I think we want to keep the data queued up in the network instead of reading it all into buffers and then reading it into the result set. Imagine a large result set with many 1G columns. I imagine this to be an improbable case but regardless I don't think we want to double buffer.
So one thought is to use multiple (at least 2) VisibleBufferedInputBuffers and having a cap on how far we read ahead. This seems to be a viable option as the notion of a read ahead buffer is fairly common.
Thoughts ?
Does anyone know how NIO does it ?
The text was updated successfully, but these errors were encountered:
Reactive: consumer asks next elements every time it wants some. This ensures the producer never overflows the consumer. In our case, the consumer could be ResultSet which would ask the background thread to fetch more data which would ask network, and so on.
Regarding the consumer idea above. I think it is a bit more complex because we have async events coming out of the database such as NOTIFY. I am struggling with envisioning code that knows in advance what it is expecting, like a ResultSet, vs the notion of async listeners
This issue is meant to discuss implementation details. At this point no idea is too wacky.
I've been noodling on how to implement a backend thread reader.
One challenge I have is that we don't want to read too much into buffers. Ideally I think we want to keep the data queued up in the network instead of reading it all into buffers and then reading it into the result set. Imagine a large result set with many 1G columns. I imagine this to be an improbable case but regardless I don't think we want to double buffer.
So one thought is to use multiple (at least 2) VisibleBufferedInputBuffers and having a cap on how far we read ahead. This seems to be a viable option as the notion of a read ahead buffer is fairly common.
Thoughts ?
Does anyone know how NIO does it ?
The text was updated successfully, but these errors were encountered: