Live data from Hacker News

Nobody likes lag: How to make low-latency dev sandboxes

compyle.ai

11–20 of 47 posts

Re: Nobody likes lag: How to make low-latency dev sandboxes

#11
post #7

Great write-up on the evolution of your architecture. The progression from 200ms → 14ms is impressive. The lesson about "delete code to improve performance" resonates. I've been down similar paths where adding middleware/routing layers seemed like good abstractions, but they ended up being the performance bottleneck. A few thoughts on this approach: 1. Warm pools are brilliant but expensive - how are you handling the…

1. The pools are very shallow- two machines per pool. While it's certainly possible for 3 tasks to get requested in the same region within 30 seconds, we handle that by falling back to the next closest region if a pool is empty. This is uncommon, though. 2. I haven't considered it, but yeah- the caching seems to work great for us. 3. The tokens are generated per-task, so if you are worried about your token getting le…

One of the perennial problems with on call situations I encountered was that at some point everyone knew that a production incident was going on and people were either trying to help or learn by following along running the same diagnostics the on point people were running, and exhausting the available resources that were needed to diagnose the problem.

Splunk was a particular problem that way, but I also started seeing it with Grafana, at least in extremis, once we migrated to self hosted on AWS from a vendor. Most times it was fine, but if we had a bug that none of the teams could quickly disavow as being theirs, we had a lot of chefs in the kitchen and things would start to hiccup.

There can be thundering herds in dev. And a bunch of people trying a repro case in a thirty second window can be one of them. The question is if anyone has the spare bandwidth to notice that it’s happening or if everyone trudges along making the same mistakes every time.

Re: Nobody likes lag: How to make low-latency dev sandboxes

#12
post #10

When Covid hit I wasn’t the only one working remotely at my company, but I was the only one working remotely in North America, and apparently the only one trying to Work Smarter. By then there were a handful of feature toggles I had implemented that I quickly set to always on in development, but chief among them was that gzip service calls were a net loss in AWS but very very handy while working from home. I also had…

One of the most dangerous ideologies is "all good things come to those who wait" or that waiting is a virtue. Applied by people working at all the levels of a system for years and years it leads to steps that could be 30ms taking 30s.

Re: Nobody likes lag: How to make low-latency dev sandboxes

#14
post #13

Interesting. It seems to me that client side prediction and lag compensation (aka the basics for games in similar situations) would have been a viable alternative.

These rely on undoing within a game's constrained environment. There isn't a way to magically undo any possible procedure with side effects.

Re: Nobody likes lag: How to make low-latency dev sandboxes

#15
post #13

Interesting. It seems to me that client side prediction and lag compensation (aka the basics for games in similar situations) would have been a viable alternative.

While I can see that working well for echoing keystrokes in a terminal, I'm not sure how it would work when you actually enter commands into the terminal. Same for opening files in the IDE.

Re: Nobody likes lag: How to make low-latency dev sandboxes

#16
post #14
post #13

Interesting. It seems to me that client side prediction and lag compensation (aka the basics for games in similar situations) would have been a viable alternative.

These rely on undoing within a game's constrained environment. There isn't a way to magically undo any possible procedure with side effects.

How so? Perhaps I don’t understand the context. Undoing text display is trivial, undoing code changes is already there, what’s missing? We’re not talking eons, less than a second.

Re: Nobody likes lag: How to make low-latency dev sandboxes

#18
post #13

Interesting. It seems to me that client side prediction and lag compensation (aka the basics for games in similar situations) would have been a viable alternative.

While I can see that working well for echoing keystrokes in a terminal, I'm not sure how it would work when you actually enter commands into the terminal. Same for opening files in the IDE.

I didn’t get that the IDE is running on both sides, if that’s true. Wow.

Re: Nobody likes lag: How to make low-latency dev sandboxes

#19

Why is there all the sudden an explosion of sandbox related posts and tools? Llms and agents always needed sandboxes… was it just the collective conscious decided all at once that it mattered and the area to focus building tools?

Particularly an explosion of SaaS sandboxes... why should I pay a subscription for some remote sandbox with paltry compute power, which I need a constant internet connection to access? I have this brilliant processor in my own laptop I want to use that I have already paid for, I don't want to use someone else's!

Re: Nobody likes lag: How to make low-latency dev sandboxes

#20
post #18

Earlier quoted context omitted.

While I can see that working well for echoing keystrokes in a terminal, I'm not sure how it would work when you actually enter commands into the terminal. Same for opening files in the IDE.

I didn’t get that the IDE is running on both sides, if that’s true. Wow.

Yup! There's a language server and file server running in the sandbox that the editor on the frontend interacts with.
Post reply on HN