uwdata / mosaic

An extensible framework for linking databases and interactive views.
https://idl.uw.edu/mosaic
Other
823 stars 52 forks source link

Parallel requests in the web socket connector #547

Open domoritz opened 3 weeks ago

domoritz commented 3 weeks ago

The web socket connector serializes queries as it only allows a single query at a time. We should update the connector (and the servers) to allow parallel queries. This will require sending multiple messages for arrow responses as we cannot mix JSON (for the metadata with as what query the result is for) and binary (for the arrow data).

jheer commented 3 weeks ago

As an alternative to sending multiple messages, we might use a simple custom binary format. For example: an int32 query id followed by the arrow bytes (or JSON string payload). Or variations with additional fields, such as including the query execution time (as measured in the DB), as information that might inform future cache eviction policies.

Note that I'm not endorsing this, just noting the possibility :)