TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

Virtualizing development environments in 2023

113 点作者 hugodutka将近 2 年前

13 条评论

stephenr将近 2 年前
This whole article is weird to me.<p>I don&#x27;t really understand the point of a &quot;dev box&quot; that&#x27;s hosted in a DC and shared, <i>at all</i> - at least not the way they&#x27;re painting it here.<p>Hardware capabilities for even consumer level laptops and desktops have progressed much faster than average network connections.<p>Having testing&#x2F;preview&#x2F;branch named environments in a DC? Sure. But this line:<p>&gt; They should be able to run any software they want inside their own workspaces without impacting each other.<p>What does that even mean?<p>Is this about someone working on a feature branch that uses some new dependency that needs to be installed?<p>That&#x27;s 100% the sort of thing your <i>local</i> development environment is for, until you&#x27;re ready to push it to your hosted test&#x2F;whatever environment.<p>&gt; But when it&#x27;s running in a VM, the VM gobbles up as much memory as it can and, by itself, shows no inclination to give it back.<p>Someone, anyone, tell me which hypervisor <i>doesn&#x27;t</i> enforce a memory limit on VMs?
评论 #37005013 未加载
评论 #37004912 未加载
评论 #37009357 未加载
评论 #37009276 未加载
评论 #37006859 未加载
评论 #37007763 未加载
SkyMarshal将近 2 年前
Author doesn’t mention it but I wonder if tried or considered Nix&#x2F;NixOS’s reproducible developer environments and ruled them out for any reason. I couldn’t tell from the article if there’s something unique to his requirements that disqualifies them.<p><a href="https:&#x2F;&#x2F;nixos.org&#x2F;explore" rel="nofollow noreferrer">https:&#x2F;&#x2F;nixos.org&#x2F;explore</a><p><a href="https:&#x2F;&#x2F;nix.dev&#x2F;" rel="nofollow noreferrer">https:&#x2F;&#x2F;nix.dev&#x2F;</a>
评论 #37003169 未加载
nickstinemates将近 2 年前
I am curious how important 100GB dev environment support and efficiently binpacking dev environments and rat-holing on memory efficiency actually matters for the first X enterprise customers for Hocus.<p>Memory and CPU cores are cheap. Getting the UX, resource allocation&#x2F;sizing&#x2F;instance type, and general pattern for multi-tenant dev boxes seems more fruitful.<p>Would love to see any data supporting this prioritization, and what the answer is for Workstation &#x2F; HEDT-type environments given the industry&#x27;s current focus on AI.
ohthehugemanate将近 2 年前
TFA goes right into the core complexity and misses it.<p>&quot;Dev environment&quot; depends on what kind of work you are doing. What a web developer needs is worlds apart from what a driver developer needs in terms of capability, resourcing, isolation, and rebuilds. Trying to offer a single environment for anyone who builds anything using a computer, is analogous to a single environment for anyone who uses a screwdriver. An electrician is using the same tool, sure, but they&#x27;re doing fundamentally different work from a kitchen installer or a plumber and have vastly different needs. The single environment with all the capabilities that any computer developer needs is called a &quot;computer.&quot;<p>IMO this is the genius of VSCode remotes. They built a core capability of running the bulk of the IDE &quot;somewhere else&quot; with just the display layer on your local machine. Then they can allow the developer to choose if container(s), VM(s), and local or remote are right for their case, without having to learn new tooling. They can even let you choose if &quot;owning a computer&quot; is required, or if a web browser is sufficient.
siliconc0w将近 2 年前
Eh, might as well use the crazy power of that MacBook you&#x27;re provisioning for each engineer.
overnight5349将近 2 年前
I keep trying to use Jetbrains Gateway. It spins up the IDE on a remote machine and renders it locally.<p>I honestly can&#x27;t find a use for it. My personal machines are ancient quad core setups, but I have a beefy server at my disposal.<p>But the benefit of faster build times isn&#x27;t worth the hassle. Between the suboptimal performance of the remote interface, syncing files back to my local machine, and all of the little idiosyncrasies of setting up the remote environment, it&#x27;s still faster to develop locally. I just go grab a glass of water when I start my compile.<p>This might make more sense if you&#x27;re working on some C++ monstrosity with millions of lines of code that takes hours to build on a mainframe, but if you&#x27;re in the region of minutes per build, there&#x27;s just no benefit.<p>Or I guess if all you have is a thin client, this might be better than nothing. But then again, you can get an IDE and compiler for most languages on an android tablet. If you have a machine with a processor, it can compile your code.
rvdginste将近 2 年前
I prefer having a powerful development machine and install and use development environments natively. The only times I am prepared to use a (local or remote) VM is when the development environment cannot be installed on the OS of my development machine, or when I absolutely do not want to install those tools natively (because they might impact my main OS).<p>I am often involved with multiple projects at the same time, but if those projects are set up well (and the toolset is decent), that does not cause any issues. In practice that means that developers always have to take into account that the project itself includes references to the specific versions of the tools that the project needs. And that those tools are -as-much-as-possible- installed in the context of those projects instead of in the context of the whole machine.<p>A concrete example in node world is to use &quot;nvm&quot; and to always install tools locally in the context of a project instead of globally. In dotnet world, use global.json to specify the version of the tools you want to work with, install dotnet tools locally in the context of a project instead of globally.<p>I have worked on projects where this is a problem. For example, projects that depend on hardcoded paths. Or projects that depend on hardcoded connection strings for a database. Or projects that do not use something like nvm to specify the version of node&#x2F;npm they are compatible with.<p>Each of those things is an issue with the setup of the project and is something that you will bump against when you try to setup a CI&#x2F;CD pipeline for the project. Although, I agree that it can be useful to use docker containers with a correct version of the tools to create builds in a build pipeline.<p>The reason that I prefer to develop natively is that it is faster, snappier and more enjoyable. I also believe that it is easier to diagnose issues and investigate performance. Aside from that, renting a virtual machine with the same performance as my development machine, would be a lot more expensive, and I would still have to deal with the lag. I am aware of recent changes that allow you to for example run a JetBrains IDE locally (similar to what VSCode already had for a long time?) that is connected with a remote headless version of the IDE. I do not have any experience with that kind of setup yet, but I assume that would remove most of the lag.
foxbyte将近 2 年前
Consider exploring LXC for a more mature alternative to Docker. It&#x27;s not confined to the OCI ecosystem and offers a higher degree of isolation for development environments.
评论 #37005394 未加载
评论 #37006509 未加载
swozey将近 2 年前
I know this is an article specific to hocus so I don&#x27;t mean to take away from that but the title is much more open ended and plural so I&#x27;d like to ask this -<p>What has been your favorite local dev environment?<p>I personally docker-compose everything w&#x2F; .env overrides and I don&#x27;t really feel like I&#x27;ve ever needed anything more than this.
评论 #37006619 未加载
评论 #37006953 未加载
easton将近 2 年前
&gt; Many cloud providers, like AWS inside VM-based EC2 instances, won&#x27;t let you run a VM since they don&#x27;t support nested virtualization<p>Does anyone know if there&#x27;s a technical limitation to nested virt on EC2 or if it&#x27;s just so people use .metal? I know Azure recently (1-2 years?) started offering it.
评论 #37002330 未加载
评论 #37003200 未加载
pphysch将近 2 年前
This blog doesn&#x27;t convince me why I should care about Hocus over solutions like VSCode devcontainer + Vagrant. That is more what it is competing with, not raw Docker&#x2F;VM.
评论 #37003490 未加载
评论 #37003351 未加载
therealmarv将近 2 年前
Gitpod, just use Gitpod. You can even run docker inside there.
评论 #37006013 未加载
评论 #37012931 未加载
ravenstine将近 2 年前
Good god, no. Or, at least, let us never make this a sort of standard way of developing that you&#x27;re going to push on to your engineers.<p>Containers have their place, they can be great, but I&#x27;ve tried the whole &quot;containerize everything&quot; approach, and it&#x27;s no less time consuming than not containers, and now you have another Thing You Have To Learn (TM).<p>This isn&#x27;t to say that virtualization is a bad thing for a development environment. It can be a very good thing, actually, but you don&#x27;t need containers. A development environment, in my opinion, should be well organized, easy for a new developer to pick up, but also scrappy and adaptable to new and interesting situations. Containers, at least in their current conception, are antithetical to this. They&#x27;re best kept to deployments or running things in a scenario where you know for sure you&#x27;re not going to tinker with anything. I don&#x27;t think I&#x27;ve worked on a software project where, at some point or another, I didn&#x27;t need to reach under the hood in some unconventional way to investigate an issue or simulate some circumstance. Yes, you can do those things with containers, but now you have to deal with that complexity, which can get in the way by merely being confusing and indirect.<p>Having given up on using containers for development, when I want to use virtualization, I just spin up minimalist instances of Debian under Qemu (using the UTM GUI). This way, I can run a Thing (TM) in isolation, easily open up a shell, or SSH into it from the host shell, or start a GUI from within it if I need to, or install however many services I want within it and open up ports to the host, or have shared folders, etc. etc. etc.<p>But what if I need multiple of a Thing (TM) running at the same time? In that case, I just clone the VM. No Dockerfiles, no docker-compose.yml, no &quot;volumes&quot;, no orchestration, no images failing to build because reasons, no qcow2 files blowing up with Docker For Mac (though that situation has improved), no pruning of orphaned containers&#x2F;images, no worrying about whether your container should only be running a single process&#x2F;service, and so on.<p>The only drawback to this is that, if the host is Linux, then it&#x27;s indeed kinda dumb to be running other Linux kernels in VMs. But hey, it&#x27;s 2023 and the difference in performance may not be meaningful depending on what you&#x27;re doing. I know that, on an M1 Mac, I can run graphical applications at monitor resolution with incredible speed (perhaps moreso with Parallels instead of Qemu), so I&#x27;d struggle to care about any performance drawback if my host was Linux on the same hardware.<p>I&#x27;m sure that, for some, containers in development will be totally worthwhile. But if they don&#x27;t seem worthwhile to you, dear reader, then that&#x27;s probably because they wouldn&#x27;t be.
评论 #37007974 未加载