I'm working on barely / barelyvm [0] which replaces docker desktop with a new MacOS app and docker context.
I've been using Theo's "hill climbing" technique [1] applied to more than just UX and getting pretty good results.
The new docker context points at a customised VM with a patched kernel to do memory and storage ballooning.
That is, containers return unused ram back to the Mac and things like volume prunes get trimmed from the disk automatically freeing up disk space.
It also does some magic to decide if a container is "idle" and will auto suspend the container to swap getting more ram back for Mac OS. If all containers get suspended the guest VM itself hibernates to disk and scales down to zero.
On any request to one of the container ports the whole thing comes back in milliseconds and responds like nothing happened.
This is mostly built for those of us with limited ram and storage in our macs but also for those who have memory hungry build steps that happen in your dev container builds but only need a fraction of the ram for running your app.
I've been doing this with one of my VM projects and hit message caps really quickly, threads start stalling out.
In the end I needed to use a coordinator.md file to backdoor messages and locking state in a pull instead of push model to keep them running overnight.
I need a lot of inter-thread comms because my app has to build a kernel inside itself and then replace itself to run tests which meant I was hitting concurrency and load issues with multiple sessions trying to run things like benchmarks against their own work tree.
Thanks for linking this. I've reached a point I need to overhaul one of my MacOS apps and these laws are the perfect find.
What's the best approach to applying these in practice? Should I evaluate every screen with each of these laws in mind or should I evaluate the app entirely one law at a time?
Had to /hug a few times before it got back to work.
reply