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

科技回声

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

GitHubTwitter

首页

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

资源链接

HackerNews API原版 HackerNewsNext.js

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

Stripe's Monorepo Developer Environment

393 点作者 edran9 个月前

26 条评论

p-o9 个月前
It&#x27;s always so enlightening to have articles like this one shed light on how companies at scale operate. It goes without saying that many of the problems Stripe faced with their monorepo isn&#x27;t application to smaller businesses, but there are still bits and pieces that are applicable to many of us.<p>I&#x27;ve been working on an ephemeral&#x2F;preview environment operator for Kubernetes(<a href="https:&#x2F;&#x2F;github.com&#x2F;pier-oliviert&#x2F;sequencer">https:&#x2F;&#x2F;github.com&#x2F;pier-oliviert&#x2F;sequencer</a>) and as I could agree to a lot of things OP said.<p>I think dev boxes is really the way to go, specially with all the components that makes an application nowadays. But the latency&#x2F;synchronization issue is a hard topic and it&#x27;s full of tradeoff.<p>A developer&#x27;s laptop always ends up being a bespoke environment (yes, Nix&#x2F;Docker can help with that), and so, there&#x27;s always a confidence boost when you get your changes up on a standalone environment. It gives you the proof that &quot;hey things are working like I expected them to&quot;.
评论 #41294021 未加载
评论 #41295494 未加载
评论 #41291616 未加载
mootoday9 个月前
I&#x27;ve worked with remote dev environments for many years, including some time with one of the providers of such a service.<p>It became clear to me that cloud-only is not the way to go, but instead a local-first, cloud-optional approach.<p><a href="https:&#x2F;&#x2F;mootoday.com&#x2F;blog&#x2F;dev-environments-in-the-cloud-are-a-half-baked-solution" rel="nofollow">https:&#x2F;&#x2F;mootoday.com&#x2F;blog&#x2F;dev-environments-in-the-cloud-are-...</a>
评论 #41293508 未加载
aidos9 个月前
Maybe a silly question, but why all this engineering effort when you could host the dev environment locally?<p>By running a Linux VM on your local machine you get a consistent environment that you can ssh to, remove the latency issues but you remove all the complexity of syncing that they’ve created.<p>That’s a setup that’s worked well for me for 15 years but maybe I’m missing some other benefit?
评论 #41291251 未加载
评论 #41291458 未加载
评论 #41292772 未加载
评论 #41290950 未加载
评论 #41290831 未加载
评论 #41291443 未加载
评论 #41292669 未加载
domenkozar9 个月前
We&#x27;ve been building <a href="https:&#x2F;&#x2F;devenv.sh" rel="nofollow">https:&#x2F;&#x2F;devenv.sh</a> for that reason, I expect more companies to go back to local development once they see DX has improved locally.
评论 #41289284 未加载
评论 #41289067 未加载
评论 #41294935 未加载
physicsguy9 个月前
I think for smaller companies, you can get a long way towards a lot of this with judicious use of docker-compose, and convenience scripts in a Makefile. As long as you don&#x27;t do anything stupid like try and spin up 100 services when you&#x27;re a team of 8, most laptops these days are sufficiently capable of handling a database, Redis, your codebase, and something like LocalStack.
评论 #41292794 未加载
delhanty9 个月前
&gt;Some caveats: It’s been nearly five years, and I have no doubt that I have misremembered some of the specific details, even though I’m confident in the overall picture. I’m also certain that Stripe has continued evolving and I make no claim this document represents the developer experience at Stripe as of today.<p>Are there any more recently ex-Stripe folks here willing and able to comment on how Stripe&#x27;s developer environment might have evolved since the OP left in 2019?
评论 #41291111 未加载
评论 #41291828 未加载
评论 #41290517 未加载
评论 #41291623 未加载
mleo9 个月前
I use syncthing to manage the synchronization of files between local laptop and remote development server. The software code base is upwards of 20 years and has dependencies on Windows for runtime. I can run unit tests locally on very fast MacBook Pro or run it much slower on Windows VM. With syncthing I can easily edit files locally or remotely and they are available locally for source control.<p>The worst problem is refining the ignore settings to ensure only code is synced preventing conflicts on derivative files and that some rule doesn’t overlap code file names.
评论 #41291040 未加载
ronef9 个月前
I love this. I believe I might have even interfaced with your team around that time. I was leading Facebook&#x27;s (now Meta) Developer Products team and we were building against super similar areas internally.<p>We ran back then a similar project that I coined &quot;Developer On-Demand&quot; to tackle that same problem space. It&#x27;s also what eventually lead me to find the magics of Nix and then build Flox.<p>I also agree with a lot of what was shared in other comments, while the problems we tackled at large orgs such as Facebook, Shopify, Uber, Google (to name a few teams I remember working with) and obviously also Stripe, certain areas of the pain are 100% universal regardless of team size.<p>On the Flox side, we&#x27;re trying to help with a few of them today and many more hopefully in the soon future, very open for thoughts! Things like - simple to use Nix for each of your projects + keep deps and config up to date across everyones Macbooks and Linux boxes, etc -- even if you don&#x27;t have a full AWS team and Language Server team ready to support.
anonzzzies9 个月前
We use similar practices in our 3.5 person team; we work via code-server and Aider with our own tooling on VPSs and this gets synced to execution VPSs which run dev versions, a lot of sentry logging and tests (mostly playwright these days). There is also a vps which does builds all day and logs to Sentry too. We can almost instantly get on our own test versions and see what we did, and, over the space of some seconds to minutes we see test and build data coming in. It works incredibly well for many years already. Onboarding people is easy and no one ever has &#x27;it doesn&#x27;t build on my system&#x27; as that&#x27;s not something we do (you can of course, all scripts are there but why waste the time?).<p>I grew up with mainframes, minis and unix batch andor multiuser machines; for me this is the best way for business applications. I didn&#x27;t particularly like the move to local all that much.
reillys9 个月前
I chatted to Nelson when I was designing brisk (<a href="https:&#x2F;&#x2F;github.com&#x2F;brisktest&#x2F;brisk">https:&#x2F;&#x2F;github.com&#x2F;brisktest&#x2F;brisk</a>) and his insight informed the development of it.<p>Among other things, Brisk allows you to run tests for your local code changes in the cloud (basically the pay mini test piece but for any test runner)<p>We also have a sync step much like the one described here and allow users to run one off commands (linters, tsc etc)
评论 #41290278 未加载
评论 #41289078 未加载
codethief9 个月前
Very insightful blog post!<p>&gt; Finally: the development experience, of course, is only part of the story: the full lifecycle of code and features continues onward into CI and code review and ultimately through deployment into production, where it will be further observed, debugged, and evolved. Writing about those systems would require further posts at least this long.<p>In case the author is around: I would love to read those!
Aeolun9 个月前
They decided to keep the code on the local machine, but the language server on the remote one. That seems like a recipe for inconsistency. You only get relevant results from your language server once your code has synced.
评论 #41289928 未加载
评论 #41290334 未加载
评论 #41291190 未加载
adamdecaf9 个月前
We’ve been using a hundred repositories and a hundred Go services in a local docker-compose setup that’s worked fairly well. CI runners can struggle if their disks can’t keep up with Docker.<p>It comes up that we should make a devprod for front end folks to make the backend abstracted more.<p>Overall a lot of people prefer local dev because it gives them access to the entire stack, lets them run branch images easier, and has better performance than remote boxes.<p><a href="https:&#x2F;&#x2F;moov.io&#x2F;blog&#x2F;education&#x2F;moovs-approach-to-setup-and-testing&#x2F;" rel="nofollow">https:&#x2F;&#x2F;moov.io&#x2F;blog&#x2F;education&#x2F;moovs-approach-to-setup-and-t...</a>
bool3max9 个月前
Off-topic but the font on this blog is stunning - after some digging it seems to be &quot;Vollkorn&quot;.
KolmogorovComp9 个月前
&gt; In addition, Stripe’s monorepo was (to our knowledge) the largest Ruby codebase in existence<p>Bigger than shoppify&#x27;s?
评论 #41289191 未加载
评论 #41291104 未加载
评论 #41289303 未加载
crabbone9 个月前
NB. What the article describes isn&#x27;t a developer environment in the cloud. It&#x27;s <i>testing</i> in the cloud. The editor in their model lives on the programmers&#x27; laptops, the editing happens there as well and so on. The code is deployed to cloud infrastructure for testing.
truetraveller9 个月前
&quot;I’ve described a lot of fairly-involved custom tooling; we needed enough engineers to build and maintain it, and enough “customer” engineers for that investment to pay off.&quot;<p>This is so important when deciding to re-invent the wheel. I&#x27;ve gotten bitten by this many times.
prasoonds9 个月前
I wonder if there’s a devbox-as-a-service tool out there. I use a MacBook Air for most of my work and on occasion would be benefited by using a beefier machine in the cloud. I just don’t want to set up a machine, set up sync etc.
评论 #41293900 未加载
secondcoming9 个月前
What&#x27;s the easiest way of sharing things like protobuf definitions across multiple separate repos and making sure things are always in sync?
评论 #41292732 未加载
nivertech9 个月前
This post is more about syncing between local and remote dev environments than about monorepos.
jdtig9 个月前
Does Stripe use RoR?<p>The author mentions the codebase was Ruby, but I didn&#x27;t see if they talked about Rails.
评论 #41290319 未加载
stealthybox9 个月前
This is an awesome writeup of the tools and culture issues you run into maintaining dev environments.<p>From post, the problems that justified central dev boxes are roughly: 1. dependency &#x2F; config mgmt &#x2F; env drift on laptops 2. collaboration &#x2F; debugging between engineers 3. compute scaling + optimization 4. supporting devs with updates and infra changes<p>The last one is particularly interesting to me, because supporting the dev env is separate engineering role&#x2F;task that starts small and grows into teams of engineers supporting the environment.<p>I&#x27;m helping build Flox. We&#x27;re working on these pain points by making environments (deps, vars, services, and builds) workable across all kinds of Mac&#x2F;Linux laptops and servers. 1) a. Virtualize the pkg manager per-project b. Nix packages can install across OS&#x2F;arch pretty well 2) Imperative actions like `flox install`&#x2F;`upgrade` always edit a declarative env manifest.toml -- share it via git 3) less Docker VM&#x27;s -- get more out of devteam Macbooks 4) reduce toil with a versioned, shareable envs --&gt; less sending ad-hoc config and brew commands to people (as mentioned in the post.) Just `git pull &amp;&amp; flox activate`.<p>I think on problem point #2, collab tools are advancing to where, pairing on features, bugs, and env issues can be done without central SSH. (ex: tmate, vscode liveshare, screensharing, etc) -- however, that does sort of fall apart on laptops for async debugging of env issues (ex: when devprod is in the US, and eng is in London). Having universal telemetry on ephemeral cloud dev-boxes with a registry and all of the other DNS and SSH goodies could be the kind of infra to aspire to as your small teams run into more big-team problems.<p>In the Stripe anecdote, adopting the centralized infra created new challenges that their devprod teams were dedicated to supporting: - international latency from central, US-based VM&#x27;s - syncing code to the dev boxes (<a href="https:&#x2F;&#x2F;facebook.github.io&#x2F;watchman&#x2F;" rel="nofollow">https:&#x2F;&#x2F;facebook.github.io&#x2F;watchman&#x2F;</a>) - linting, formatting, generating configs (run it locally or serverside?) - a dev workflow CLI tool dedicated to dev-box workflows and sync&#x27;ing with watchman&#x27;s clock - IaaS, registry, config, glue for all the servers<p>This is all very non-trivial work, but maybe there&#x27;s a future where people can win some portability with Flox when they are small and grow into those new challenges when it&#x27;s truly needed -- now their laptop environments just get a quick `flox activate` on some new, shiny servers or Cloud IDE&#x27;s.<p>I really like the notes from the author on how useing Language Server Protocol across a high latency link has great optimizations that work along side the watchman sync for real-time code editing.
pjmlp9 个月前
Yet another replay of timesharing development experiences, I guess we need a couple of generations more to count how many times does a pendulum swing back and forth during a developer&#x27;s lifetime.
srvaroa9 个月前
&quot;This scale – the scale of devprod, and in turn the scale of the overall organization, such that it could afford 10 FTEs on tooling – was a major factor in our choices&quot;<p>Is basically the summary for most mono&#x2F;multi repo discussions, and a bunch of other related ones.
评论 #41290846 未加载
评论 #41290798 未加载
评论 #41290793 未加载
评论 #41291096 未加载
vfclists9 个月前
How does a payment service wind up with over a 1000 engineers?<p>I understand that &quot;engineers&quot; may not mean &quot;developers&quot;, it could DevOps, site reliability and all the bits and pieces that make up a large service provider, but over a 1000?<p>Can someone please enlighten me?
评论 #41295425 未加载
评论 #41304767 未加载
评论 #41295051 未加载
rvz9 个月前
This isn&#x27;t recommended practice really and there is nothing about this which justifies having to maintain huge code bases in a single folder or multiple folders in one larger one.<p>Won&#x27;t be surprised to see that many would probably need a safari map or README documentation in every single folder to navigate a repository as large as stripes.<p>Sounds like an emergence of a new bad practice if you are having to praise how large your code base is.
评论 #41289422 未加载
评论 #41289354 未加载
评论 #41290342 未加载
评论 #41289627 未加载
评论 #41289380 未加载