database-js icon indicating copy to clipboard operation
database-js copied to clipboard

Explore supporting StreamExecute/OLAP workloads

Open mattrobenolt opened this issue 3 years ago • 2 comments

Within some contexts, especially serverless, the memory limits are very low in process. So it can be desirable when performing aggregations in process, or if also streaming out to the end user, to be able to leverage StreamExecute from our API.

I will say, this is going to be rather non-trivial, but I'd like us to see what it'd take to support without fully adopting connect-web or protobufs.

Streaming requires adopting the Connect protocol, rather than simply application/json, which can be done, and is done within connect-web. https://connect.build/docs/protocol#streaming-response

To add to this, this feature is required to support OLAP queries.

cc @reconbot

mattrobenolt avatar Aug 23 '22 17:08 mattrobenolt

This is a functioning POC https://gist.github.com/mattrobenolt/6ca8c37185578cac8970de5a82dcfd52

It definitely needs more work. I also talked with the buf folks, and they agree that we should vendor in their codec stuff like I'm doing here.

mattrobenolt avatar Aug 25 '22 19:08 mattrobenolt