apache / arrow-rs

Official Rust implementation of Apache Arrow
https://arrow.apache.org/
Apache License 2.0
2.52k stars 751 forks source link

How to determine when a client disconnects #6509

Open cisaacson opened 2 days ago

cisaacson commented 2 days ago

Which part is this question about arrow-flight-sql, but it could apply to arrow-flight as well

Describe your question I do not see anything in the arrow-flight-sql protocol to determine when a client has disconnected. We need this to be able to reliably close a server side session.

If there is a way to do this please let me know.

tustvold commented 2 days ago

gRPC, on which flight is built, is a request oriented protocol, not a connection oriented protocol. If you want a notion of a session that spans multiple requests, you will need to implement this on top, e.g. using some sort of session token.

cisaacson commented 2 days ago

Thanks @tustvold, this is helpful. We will investigate how to implement this. We are using the provided auth token mechanism, that could be the session token. We already store the open sessions, so the only thing missing is when a client closes its connection or disconnects. Do you have any advice on how to implement that?

tustvold commented 2 days ago

Timeouts would be the most common approach