Comments (5)
Currently, RunMe serializes/deserializes notebooks inside the GoLang server. I believe there was an experiment to run serialization in the browser using WASM. However, it looks like the WASM code path is being removed (stateful/vscode-runme#349).
WASM pre-dated the gRPC (de-)serializer. While it worked great in the VS Code desktop app we ran into runaway memory issues in remote execution environments. This was likely a side-effect from cross-compiling the Runme CLI to WASM instead of breaking out the Serializer into a discrete library. In any case, WASM was abandoned because the Runme kernel's role expanded and needed to live much closer to the system (io, tty, etc).
Known Blockers
There are two main blockers I'm aware of to making RunMe compatible with vscode for web
- gRPC
- Moving serialization into the browser
While not impossible from a pure technological point of view, the VS Code platform has some firm boundaries here. Many of the APIs (e.g. terminal, code lenses, file system operations, etc) as well as "work out of the box" like "product experience" are provided by VS Code's Extension Host APIs. These are vastly limited for what VS Code calls "Web Extensions" which basically limits them to either read-only rendering or something purely WASM-based: https://code.visualstudio.com/api/extension-guides/web-extensions & https://github.com/microsoft/vscode-extension-samples (search for directories containing wasm
).
While one might think VS Code is "just a webapp", it's really a IDE micro-services architecture and operating outside of architectural boundaries comes with VS Code Platform incompatibility as well as delivery/packing tradeoffs.
from runme.
Here's a diagram illustrating how I would like to deploy RunMe.
One light-lift option for a serverless deployment could be VS Code's tunneling capabilities. And, code-server
(by Coder) or the Theia project might have some more flexible answers which I haven't fully explored.
E.g. The GHA we've built that let's you drop into a tunneled VS Code like a "breakpoint" in workflow: https://github.com/stateful/vscode-server-action/blob/main/src/main.ts#L45-L51
I believe MSFT's licensing restricts the tunnels for non-commercial use but otherwise should allow for open/public delivery.
Not saying we don't want "serverless" ourselves, however, just trying to offer alternatives that are available "now".
from runme.
VPC perimeters and bastion nodes
Enterprise infrastructure usually lives within a secure VPC. This means to run the steps in a playbook (e.g. kubectl, gcloud, awscli commands etc...), you usually have to tunnel into a machine within the perimeter.
With the proposed architecture users could open up RunMe notebooks in their browser and then execute those commands inside a machine inside the VPC via RunMe's GoLang server. The notebooks would be stored locally.
Reproducible / Containerized Environments
A major headache today with operations is that each developer has to install and configure all the tools used in playbooks. The above architecture means this can be replaced with containerized environments provisioned with role accounts. All that needs to be installed on the client is a browser and network access.
Remote Debugging
When troubleshooting problems with VMs or Containers its often necessary to execute commands within those containers or environments. The above architecture would mean we could start the RunMe server inside the target (E.g. as a K8s ephemeral container) and then execute parts of our playbooks inside that machine.
Runme by extension VS Code's Remote Development capabilities supports these scenarios in multiple ways. They are well maintained by MSFT and Docker and have whether we "believe" it or not come with credibility of Microsoft' & Docker's brands.
-
Attach VS Code to Bastion via SSH: https://docs.runme.dev/how-runme-works/runme-via-ssh#how-to-set-up-ssh-connection-in-vs-code
No change in the Runme notebook UX changes, except that now the host system is your jumphost. -
First-class Devcontainer Support: https://docs.runme.dev/guide/devcontainer
I call this "opscontainer" but the idea is the same as SSH. Instead of the bastion host, you run against a locally hosted container.
While we are open to improve the engineer's experience we're "trying" really hard to build on existing open standards and leverage all the benefits that come with it.
Btw, here's an example repo from a recent talk I've given at Rejekts: https://github.com/stateful/rejekts-eu-2024
from runme.
Thanks that's useful context.
So I think the partial work around today would be to use the vscode option in RunMe to specify the gRPC address of the RunME server and use a remote server. I would still use vscode locally. I plan on experimenting with this soon.
This is different from VSCode in ssh because the filesystem where notebooks are stored and the server where commands are running are colocated.
from runme.
So I think the partial work around today would be to use the vscode option in RunMe to specify the gRPC address of the RunME server and use a remote server. I would still use vscode locally. I plan on experimenting with this soon.
This is different from VSCode in ssh because the filesystem where notebooks are stored and the server where commands are running are colocated.
Please let me know how that goes. Another experiment you could give a try is to run Runme's kernel server through an SSH tunnel which is likely not so different than using a remote socket.
from runme.
Related Issues (20)
- Bring back Docker-based Python Test
- Question: How to render cell output using Data Table Renderers HOT 5
- vim keybindings can break input HOT 3
- Providing input to a Bash script using the CLI doesn't work very well HOT 3
- "bufio.Scanner: token too long" after large binary stream
- Internal failure executing runner: fork/exec /bin/zsh: no such file or directory - Trying to run runme in remote server HOT 9
- User Error/ Question: VSCode Terminal keeps Popping up when executing a cell HOT 15
- Better command execution in Docker HOT 1
- Is here a better way to parameterize markdown URLs? HOT 2
- Docs about RunMe CLI `run <command>` are unclear HOT 1
- FiFo issue: CTRL+C runs indefinitely when signals are being caught by process HOT 1
- Panic when reading/writing to closed pipe HOT 6
- Option to disable masking of outputs by default HOT 1
- Migrate to protobuf-es from protobuf-ts HOT 3
- runme attempts to access unreadable files or directories HOT 2
- `runme open` fails to install code-server when executing in fish shell HOT 4
- Internal failure executing runner: fork/exec /bin/zsh: argument list too long HOT 5
- Feedback: New code cells inserted with language ini and are not executable HOT 2
- Long Pauses Rendering Notebooks On Initial Load with Code-Server HOT 4
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 runme.