-
Notifications
You must be signed in to change notification settings - Fork 392
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
How can i create my own kernel and attach to UI? #3799
Comments
You might not need to use I'd try skipping the Sizing an IFRAME based on the outer content is a whole other problem. It's often done using a script hosted in the outer content to send a message over postMessage to a script hosted in the IFRAME. This isn't specific to Polyglot Notebooks. The VS Code web view should behave like a typical browser. |
Thank you very much for responding so quickly, @jonsequitur . Even though I am launching a c# kernel, I launch it remotely. I am programming a data mesh, the technology is called [MeshWeaver] (https://github.com/Systemorph/MeshWeaver). It is a brand new technology, and I will launch my own YouTube channel to speak about it. I will extensively use polyglot notebooks in these videos. The kernel is connected via SignalR in the following way: %%{init: {'theme': 'base', 'themeVariables': { 'primaryColor': '#ffcc00', 'edgeLabelBackground':'#ffffff', 'tertiaryColor': '#ffcc00'}}}%%
graph TD
subgraph Notebook
A[Post command envelope]
end
subgraph Mesh
B[Route]
E[Route]
end
subgraph Kernel
C[Prepare View]
D[Submit result formatted as iframe]
end
A -->|Post| B
B -->|Route| C
C -->|Handle| D
D -->|Post| E
E -->|Route| A
obviously I don't like this solution at all. I am running a blazor app, but I could easily include react code. I am not a react expret but read your code and couldn't see any way to include it in my blazor app. I also tried to include my blazor renderer into polyglot notebooks but failed because you haven't supported net9. I saw that you completed this. Neverhteless I would like to connect to any instance of the mesh reachable on the internet. Bring computations to the data, not data to the computation! BTW: polyglot notebooks handles it almost perfectly, except the issue that I don't see my kernel in the drop down and the formatting of outputs. In order to guide you to my code, please have a look at the following classes:
If you want working examples, please
I am also happy to donate this setup to your project, mine is also under MIT. I think there is a value in such an approach, as in the time of AI and big data we won't be able to download all this stuff onto our computers. The worst in terms of styling is ChartJs. It cannot deal with the setup in iframe and polyglot notebooks. As charting is important for me, doing a lot of data analysis, I would be happy for any suggestion for better integration than iframe. Again, thanks a lot for your help. |
There's a lot going on here and it's hard for me to comment on. At a glance, I would think that the ProxyKernel and KernelHost should (meaning they're intended to) do what you need, and there's some complexity there in wiring up the proxies that you probably don't want to try to reinvent. The version of the SignalR connector that's in the repo is a bit outdated and pending a design discussion we'd be happy to help you prepare PRs for this or other feature areas. |
Thanks again for your answer, @jonsequitur. Let me please repeat my original questions:
Would it be possible to have a voice conversation on the topic? I would be very keen to see where I can take polyglot notebooks. But I have now invested quite a long time in reading the source and creating my implementation, and I cannot advance without your help. My alternative is to avoid using polyglot notebooks. |
As long as your code is returning a new kernel from |
The UI is mostly VS Code's UI. Embedding this in a webview in another app would be non-trivial and isn't in scope for this project. But we do have a way to use an external webview or browser as an output (with no editor functionality) for the kernel. I could make suggestions if you can say more about what you're trying to achieve. |
Absolutely. Feel free to DM me and we can set something up. |
The package and version I'm asking about:
latest
Question
I have created my own ConnectKernelDirective and connect to a kernel via SignalR (not the one included). However, I don't get the kernel to show up in the UI. When I hack the notebook and put my kernel manually, all works fine.
My questions:
Thanks very much for the support.
The text was updated successfully, but these errors were encountered: