High-level API for cancellation
We already have low-level API for cancellation ready. It has necessary handler to respond `CancelRequest` message. However, the application user will still need to wrap everything together in order to get it work. The idea is to provide a higher level API that has all necessary part for an automatic implementation of query cancellation.
It will carry following functionality or components:
- Backend Key generation, for both Protocol 3.0 and 3.2 secret key
- Session management: having a centralized registry for all active session so we can find the `ClientInfo` via backend key
- Capability to cancel an ongoing `on_query` execution in `SimpleQueryHandler` and `ExtendedQueryHandler`
Non-functional requirement:
1. We want to make this high-level API completely optional, it can be turned on via maybe handler wrappers or some toggles. Users are allowed to have their own session management, for instance it can be a distributed session manager, and we provide this high level API as reference implementation.
2. We want to try best not to make breaking changes to current APIs.
关闭于 2026-04-20 4 条评论