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

Implement _get_comm_info function to rehydrate comms #4675

Closed
captainsafia opened this issue Nov 4, 2019 · 1 comment · Fixed by #4702
Closed

Implement _get_comm_info function to rehydrate comms #4675

captainsafia opened this issue Nov 4, 2019 · 1 comment · Fixed by #4702
Assignees
Labels
bug outdated workflow: issue should stay closed pkg:jupyter-widgets

Comments

@captainsafia
Copy link
Member

We need to implement a _get_comm_info method that requests info about the active comms from the kernel so that we can rehydrate the state when we refresh the page without changing the kernel.

cc: @miduncan

@miduncan
Copy link
Contributor

miduncan commented Nov 8, 2019

I looked into this today, and here is my current understanding of how this _get_comm_info flow works and why I don't think it is right for our scenario:

  1. _get_comm_info sends a message to the kernel, specifying the 'jupyter.widgets' target
  2. Kernel responds by sending a list of comm_ids (which map to model_ids)
  3. Manager creates a Comm for each comm_id and sends a request_state message to get the data it needs

In our flow, since we are already given a model_id before we even instantiate Manager, I think we should modify our code to get the model information to be something like this:

try{
  return getModelById(id)
}catch{
  return await requestState(id)
}finally{
  throw ...
}

@lock lock bot added the outdated workflow: issue should stay closed label Feb 13, 2020
@lock lock bot locked as resolved and limited conversation to collaborators Feb 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug outdated workflow: issue should stay closed pkg:jupyter-widgets
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants