Comments (3)
In regards to ignore
growing endlessly: That was implemented to prevent kernels coming back into the activity list, albeit a naive solution. You can see this problem when a kernel is shutdown and then a client disconnects.
The easiest way I can see to solve this is when kernels are added/deleted to the list the ActivityManager
syncs with the list of kernels in the KernelManager
. If there is a kernel in the ActivityManager
which is not in the KernelManager
it should be removed.
from kernel_gateway.
Yep. Understand why ignore exists. Just need to garbage collect it. Checking the kernel manager makes sense. Once the AcitivityManager is like the other managers and shared via settings / constructors, it'll be easy for one to ref the other.
from kernel_gateway.
Paired with @Lull3rSkat3r on the last two items. We agreed to leave things alone for the time being.
Instead of checking kg_list_kernels everywhere that calls ActivityManager methods, just check it in the ActivityManager instance itself. (Easy once it gets instantiated in the gatewayapp and can get the settings.)
Moving all the checking logic into the activity manager still creates a tight binding between the notebook API and activity tracking. Only a pub/sub bus would really disentangle the two, and that seems overkill for the moment.
Calls to the activity manager should probably happen after the action takes place in case it fails.
After looking at the code again, we settled on the mantra that activity values should be updated when there's intent from a client or a kernel, regardless of whether the action actually completes or not. As it stands, we recognize that the CONNECTIONS
count from clients to a kernel can get out of sync if errors occur. We intend to treat that value as approximate for the time being until we receive feedback from users on how all this metadata winds up getting used. For example, if all that needs to be known is whether one or more clients is connected, but not the exact count, the timestamps are enough assuming the clients are sending proper heartbeats.
from kernel_gateway.
Related Issues (20)
- CORS preflight OPTIONS request fails for kernel interruptions HOT 1
- Can't access environment variables with remote kernel HOT 3
- kernel_gateway incompatible with Jupyter API? HOT 9
- Parallel API calls
- JWT Auth Mixin
- block kwarg removed in jupyter-client 7 HOT 2
- jupyter websocket messages not updating UI HOT 5
- How do I run some bootstrap code in the kernels before the startup files? HOT 2
- Support for integrating external contents managers HOT 2
- Moving repo to jupyter-server org HOT 2
- jupyter-kernel-gateway hanging/slow HOT 18
- Update JKG to more recent packages
- Decoding message response in NodeJS WS demo HOT 1
- Decoding message data in nodeJS demo. HOT 1
- Using bash kernel in notebook-http mode HOT 5
- Returning the message associated with the error code HOT 1
- Gateway seems to be stuck when deploying on cloud HOT 3
- 3.x Release HOT 5
- CLI fails to start on windows with signal import issue HOT 1
- Reload cell code without restarting server HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from kernel_gateway.