Y
HN Search
Hacker News Search
new
|
comments
|
top
|
jobs
CompuIves
searching PlanetScale…
1.
▲
2.
▲
3.
▲
4.
▲
5.
▲
6.
▲
8 ms
·
31.
▲
Nodebox: A Node.js runtime that runs in any browser
(codesandbox.io)
91 points
by
CompuIves
4y ago
|
30 comments
32.
▲
by
CompuIves
4y ago
No, we've built our own web editor & iOS code editor. In our v1 editor we did run VSCode in the browser, but that was before code-server was released (in 2018). Even if we wanted to run code-server, that would be impossible as we a
33.
▲
by
CompuIves
4y ago
Ah right, the main advantage I have here is that the dev server also stays running when I go to another branch (since it's a different VM). So I can work on one thing, share it with the team and in the meantime continue on another bran
34.
▲
by
CompuIves
4y ago
Yeah Repl.it is one of the bigger ones. I'd say that CodeSandbox has a strong focus on extending the existing workflow for developers. That's why we have a VSCode integration, a GitHub integration with a GitHub App that creates a
35.
▲
by
CompuIves
4y ago
I'm using a web based IDE for my dev, but I'm biased in that sense. The main advantage for me is that I can easily switch branches, as every branch has its own VM. + I can easily share in-progress work. I do use the VSCode integra
36.
▲
by
CompuIves
4y ago
Yep that works, you can either create a task in the editor for it (using the CLI), or you connect it to a GitHub Repo and install actions. That said, it is something on our radar, being able to press a button for deploy from CodeSandbox wou
37.
▲
by
CompuIves
4y ago
Hey all! I'm one of the co-founders of CodeSandbox and a big fan of Rust. Rust support is something that we've been working on for a while, but the recent addition of Docker support in CodeSandbox really enabled it. Happy to answe
38.
▲
Introducing Rust Support in CodeSandbox, start a Rust VM in one click
(codesandbox.io)
63 points
by
CompuIves
4y ago
|
26 comments
39.
▲
by
CompuIves
4y ago
The online editor doesn't support rebinding yet, however, we have an integration with VSCode which allows you to open any branch/sandbox inside your local VSCode, with your own extensions and keybindings. That's how I've
40.
▲
by
CompuIves
4y ago
Yes, I should've clarified that the opinionated part is mainly in the workflow. When you open a repo on CodeSandbox, you automatically open the main branch (e.g. https://codesandbox.io/p/github/codesandbox
41.
▲
by
CompuIves
4y ago
That's great to hear! We're now working a lot on making CodeSandbox a great experience for development, and we're now at the point that we're doing all our development of CodeSandbox on CodeSandbox as well. It's a q
42.
▲
by
CompuIves
4y ago
That's so great to hear, thank you!
43.
▲
by
CompuIves
4y ago
It might be interesting to try out the CodeSandbox app: https://apps.apple.com/nl/app/codesandbox/id1423330822?l=e . It's the same concept, you get a VM you can work on from a native app, but our app is f
44.
▲
by
CompuIves
4y ago
Thank you for creating this! I remember using this for the header of my portfolio website before I got my first job. Happy to see that it's still active, I hope that the monetization model is working out well!
45.
▲
by
CompuIves
4y ago
That would work! You could even run the Postgres inside the VM, and the data inside the DB will be cloned as well between clones.
46.
▲
by
CompuIves
4y ago
Yep, that's exactly it. So the moment the fork happens, we create both a new layer for VM A and VM B, so they can both use the same base layer.
47.
▲
by
CompuIves
4y ago
That is very interesting, would it also be able to handle paused VMs where it buffers the packets up to certain threshold?
48.
▲
by
CompuIves
4y ago
Thanks a lot, I appreciate that!
49.
▲
by
CompuIves
4y ago
Right, that makes sense. Once the memory page is in memory it should be fast though. We use shared mapping right now, and practically the pages stay in memory during the lifetime of a VM once they've been loaded, but we need to do more
50.
▲
by
CompuIves
4y ago
You're completely right. Right now we're hosting the VMs on bare-metal at Hetzner, and we're looking at OVH or Contabo for hosting in the US.
51.
▲
by
CompuIves
4y ago
So let's say VM A is already running, and it's cloned to VM B. When that happens, we freeze the memory of VM A, and link it to VM B. For both VM A and VM B, any new write will be done to a new layer.
52.
▲
by
CompuIves
4y ago
The TCP connection gets "paused", it doesn't get broken but packets don't arrive. The packets that don't arrive are seen as packet loss, and so they get resent. If the connection stays frozen too long it will lead t
53.
▲
by
CompuIves
4y ago
Yes, and this is also the biggest challenge. Right now we use XFS to enable CoW, but that quickly leads to filesystem fragmentation. I'm still looking at a way that we can quickly let both VM A and VM B use the same base snapshot, and
54.
▲
by
CompuIves
4y ago
This is something I will look into! I'm thinking it could reduce start time because we have to copy the mem snap from disk to tmpfs, essentially loading it into memory, but I'm going to try this!
55.
▲
by
CompuIves
4y ago
Yes! We're watching cloud-hypervisor as well, it might also be more suitable for our use cases. Yes, we did look at live migrations since there's a lot written about it and it's the closest to cloning a running VM. Lots of de
56.
▲
by
CompuIves
4y ago
Exactly! We're looking at the second use case, to have a VM running tied to the git history. Right now we do this on a branch level, so you could say "connect to branch X on microservice Y" from another microservice, and you
57.
▲
by
CompuIves
4y ago
Yes it's a good point, this is one of the reasons that we wanted the fork time to be low. If we keep it low enough, the connection won't break and other users won't notice it. That said, for some things (like terminal access)
58.
▲
by
CompuIves
4y ago
I'm very eager to see more developments in the fresh start times! The main reason why snapshotting became interesting for us, is because we're running development servers defined by our users. A development server could take a lon
59.
▲
by
CompuIves
4y ago
Could you share why you're seeing such a slowdown? I've mainly experienced a slowdown when loading pages for the first time, since new pages need to be page faulted into memory from disk first, but after those pages have been load
60.
▲
by
CompuIves
4y ago
I don't believe Firecracker currently supports GPU (latest what I saw about it is here: https://github.com/firecracker-microvm/firecracker/issues/11... ). But I wouldn't be surprised if there's
More ›