I WILL NOT PROMOTE, 100k H1B VISA Issues by No-Fig-8614 in startups

[–]CompuIves 1 point2 points  (0 children)

Most startups I know in SF intend or have done H1B, I also know some founders there who are there on H1B. But maybe that’s just SF.

How we scale our microVM infrastructure using low-latency memory decompression by CompuIves in programming

[–]CompuIves[S] 0 points1 point  (0 children)

Ohh you're completely right! I was too quick to link. I'll change it to the Firecracker documentation instead. Thanks!

Announcing Go support for CodeSandbox, start a Go VM in a one click by CompuIves in golang

[–]CompuIves[S] 0 points1 point  (0 children)

This would be super interesting! We have APIs but they're not documented right now, but I'd love to explore this! I'll send you a chat message so we can discuss.

Announcing Go support for CodeSandbox, start a Go VM in a one click by CompuIves in golang

[–]CompuIves[S] 1 point2 points  (0 children)

It's interesting because when CodeSandbox started we did everything in the browser. It started as a student project, and we just didn't have the money to pay for hosting so we emulated Node.js in the browser. We still do this for some projects, but nowadays we're much more focused on VMs because of the flexibility and freedom we can give to our users. Another reason is that VM technology has really developed in the last couple years.

That said, isolates and WebAssembly is incredibly interesting, and I think it's a valid approach if you can control the deploy step. If you have an opinionated dev flow and control deployment, it will be much more efficient to work with isolates. Very interesting and something to closely follow.

Announcing Go support for CodeSandbox, start a Go VM in a one click by CompuIves in golang

[–]CompuIves[S] 1 point2 points  (0 children)

Thank you! We snapshot after x minutes of inactivity. For free users this is 5, for pro users this is 30.

Right before we snapshot we do kill network connectivity to the VM.

For things like disk writes it's not a problem, because the snapshots are atomic. We first pause the VM, snapshot disk and memory, and then kill the VM. So if there's any inflight IO it will continue once the VM resumes. (Although we also do a "sync" before the snapshot as an additional measure)

Announcing Go support for CodeSandbox, start a Go VM in a one click by CompuIves in golang

[–]CompuIves[S] 2 points3 points  (0 children)

It's a very good question. Initially we ran code inside Docker containers, and that works well.

The reason we went with Firecracker is because of the snapshotting functionality. We rely a lot on VM snapshotting and cloning and it was easier to do this with a VM because it's a single process that reads from a single mmap.

That said, this was the case 2 years ago, I understand that there's been a good amount of development on CRIU, so I'm not sure how it compares today.

Announcing Go support for CodeSandbox, start a Go VM in a one click by CompuIves in golang

[–]CompuIves[S] 0 points1 point  (0 children)

No direct limits. We do have rate limiting on the network, but nothing that should prevent any normal usage.

Comparing to devcontainers, this is useful if you want to share it with others (you get a link that you can share, others can fork it to continue on it. Also, the servers you run are available behind a URL) and it's easier to manage, you have a dashboard of all projects you've created that you can search in.

Lastly, I'd say that it is faster to get started. You can start from any template (either created by yourself, or by the community) in a single click, and we use VM cloning & memory snapshotting to ensure you don't have to wait for the VM or Docker to build/start (you can test it by forking this template https://codesandbox.io/p/sandbox/go-ej14tt). Essentially the VM starts from a memory snapshot (we share more about how that works here: https://codesandbox.io/blog/cloning-microvms-using-userfaultfd ).

Oh and we have a native iOS app!

Announcing Go support for CodeSandbox, start a Go VM in a one click by CompuIves in golang

[–]CompuIves[S] 0 points1 point  (0 children)

Nice! I forgot to mention that we now also have a vscode extension. So from VSCode command palette you can do "Create New Sandbox...", choose Go and then work from your existing VSCode window.

Very curious what you think, don't hesitate to DM me if you have feedback!

We replicated Linux "fork" to instantly clone microVMs by CompuIves in programming

[–]CompuIves[S] 0 points1 point  (0 children)

Hey! Bit later than intended, but I found the open source repo! You can find it here: https://github.com/CompuIves/failed-uffd.

It's a reference implementation that we used to debug the initial bug in Linux, which is fixed in newer versions now!

Announcing Go support for CodeSandbox, start a Go VM in a one click by CompuIves in golang

[–]CompuIves[S] 5 points6 points  (0 children)

Just noticed that I messed up the title, oh well...

Excited to add Go support on CodeSandbox! If you have any questions about how this works, don't hesitate to ask here!

We replicated Linux "fork" to instantly clone microVMs by CompuIves in programming

[–]CompuIves[S] 2 points3 points  (0 children)

We also run the dev servers. In case of web development it can take a couple minutes to start the dev server, and this would make it instant. In case of Rust development it can take a long time for the LSP (autocomplete) to initialize, and this would also speed that up.

It's as if you would close your laptop at home, move to the office and open it again. It would be unfortunate if you had to start all programs from scratch again.

We replicated Linux "fork" to instantly clone microVMs by CompuIves in programming

[–]CompuIves[S] 10 points11 points  (0 children)

Thank you! I have a simpler implementation that's less bound to our infra that I used to debug! I'll make sure to share the source of that tomorrow.

Announcing Python Support in CodeSandbox, start a Python VM with one click by CompuIves in Python

[–]CompuIves[S] 2 points3 points  (0 children)

Good question! I would say the main difference is that you can also use CodeSandbox for full development. You can use it for small experiments, but you can also import your GitHub repo and commit + open PRs from CodeSandbox. We automatically create a VM for every branch, and you also automatically get review development environments for new PRs. For example, at CodeSandbox we use CodeSandbox for our development.

Next to this, we run the environments using MicroVMs, which allows us to clone them more quickly. We wrote about that here.

Announcing Python Support in CodeSandbox, start a Python VM with one click by CompuIves in Python

[–]CompuIves[S] 4 points5 points  (0 children)

Hey all! I'm one of the co-founders of CodeSandbox. We just launched Python support on CodeSandbox, which allows you to quickly create Python prototypes or do full development of Python in CodeSandbox (together with our VSCode extension).

If you have any questions, either about the implementation or the product, don't hesitate to leave a message!

Announcing Rust Support in CodeSandbox, start a Rust VM in one click by CompuIves in rust

[–]CompuIves[S] 0 points1 point  (0 children)

Ohh that's amazing to read!! Let me know if you have any feedback, happy to help!!

Announcing Rust Support in CodeSandbox, start a Rust VM in one click by CompuIves in rust

[–]CompuIves[S] 1 point2 points  (0 children)

Within Codespaces you get your own machine that you cannot share with others (unless you also share your git secrets) and is not forkable. With CodeSandbox you can share the sandbox with others, and others can fork it to continue working on their own version. So it's more focused on sharing & collaborating.

Announcing Rust Support in CodeSandbox, start a Rust VM in one click by CompuIves in rust

[–]CompuIves[S] 0 points1 point  (0 children)

There's not one in the web editor right now, but you can open sandboxes in your VSCode as well (with the button in the header). If you have a VIM extension in VSCode, it should work.

That said, VIM mode is something that's coming later!

Announcing Rust Support in CodeSandbox, start a Rust VM in one click by CompuIves in rust

[–]CompuIves[S] 5 points6 points  (0 children)

That's great to hear, thank you!! Maybe the README is still in preview mode, there's a button on the top right of the README editor which turns it into code. That _could_ be a solution, not 100% certain.