Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

server: implement the current_activity interface #611

Open
oliver-sanders opened this issue Jun 28, 2024 · 0 comments
Open

server: implement the current_activity interface #611

oliver-sanders opened this issue Jun 28, 2024 · 0 comments
Milestone

Comments

@oliver-sanders
Copy link
Member

Jupyter Server extension applications may implement a current_activity interface.

This is used to inform Jupyter Server of any activity with the extension for the purposes of implementing the shutdown_no_activity_timeout which is a handy way of killing idle servers.

https://github.com/jupyter-server/jupyter_server/blob/b85c15b5678cd6ea9de28e4f547bc0dfef0a69c7/jupyter_server/extension/application.py#L449-L451

In Cylc UI Server, we would consider "activity" to mean GraphQL queries or active websocket connections. So this would require listing active websocket connections which is an issue which will also need to be solved for #585 and #597.

There are currently two caveats to this approach:

  1. Currently, if a client disconnects, the server might not find out about this until the next update is sent to the client.
    • This means that websocket connections may remain alive indefinitely if no workflows are active.
    • This can be resolved by configuring a websocket ping interval, however, we are currently waiting for an upstream fix to go in before we can do this.
    • websockets: configure default ping interval #557
  2. The Cylc UI app may remain active as long as it is open somewhere in a browser tab.
@oliver-sanders oliver-sanders added this to the pending milestone Jun 28, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant