by geocar · 10y ago · 0 comments
So what?
You don't need to reproduce that working state: The work has already been done!
Think about how the interactive approach Lisp and Smalltalk programmers use is superior to the compile/run/rerun approach used by C++ and Java programmers -- by exploring the problem in a nonlinear way, you can find your way to a solution more quickly.
Docker package management is like that: You make some changes, you commit often, fork your instance and try lots of different things. Eventually you find something that works and you tag it. You share your tags with other people. This is an extremely productive way to get work done.
My background is physics, and the philosophy there is "If you can't reproduce it, it doesn't exist."
In my experience with software, sharing opaque binary blobs is a Bad Thing. It doesn't matter if the blob is a proprietary firmware image, or a "open source" docker image. It's a magic unreproducible image. And (to me, at least) therefore suspect.
> Docker package management is like that: You make some changes, you commit often, fork your instance and try lots of different things. Eventually you find something that works and you tag it.
Again, the physics philosophy is "If you don't know what you did, you didn't do it".
For software, programming by randomly trying things is one of the worst methods available. You should understand what you're doing, and understand the system you're building.
> You share your tags with other people. This is an extremely productive way to get work done.
Sure. It's a way to quickly create, test, roll back, and share opaque binary blobs. It's "productive" in that you get things done. But you have no real idea what you got done. You just have a magic image that "works".
I would not hire a programmer with that kind of attitude. I've been burnt by that method, and those kind of programmers, too many times.
I believe this assumption needs to be challenged.
Aside from merely believing that.
I can't even tell what you mean. If I want to rebuild my machine same as before, or deploy build 100s of servers at different points in time with the same setup, reproducibility is necessary.
There's not even one argument against that. If you have any, please oblige us.
Should deployments be a surprise?
Or to get out of computers, you have a drug where they say it cures cancer 100% of the time and no one can reproduce the results, it's fine for you?
I can't reproduce me, so do I not exist?
And yet you don't know why.
This is called dogma, and dogma is bad: It leads people to make stupid decisions over and over, all the while repeating that the alternative is worse.
Then you don't know what the word "dogma" means.
What I said was "In my experience." i.e. practice learned over time.
This cannot be interpreted by any reasonable person as "blobs are bad, just 'cause."
That kind of straw man argument leads me to conclude that similar issues are being your inability to understand the use of reproducability.
You aren't offering any evidence or justification besides the statement. I might as well say, "in my experience, ``reproducability (sic) is a waste of time''" -- what's the point of that?
Instead, I'm providing concrete examples of why it's a waste of time, and rather than anyone arguing the contrary, they're doing exactly what you're doing: Repeating that there's some point of "reproducability" (sic). There isn't, you're wrong. End of.
But whatever, my background isn't physics, so what could I possibly know? Running engineering teams for the last two decades that have to develop and deal with high volume, high uptime application servers only means my systems have to work and make money, not that they be "reproducable" (sic).
If you put your hand in a fire 5 times and it burns you 5 times, you don't have to understand anything about fire to know that you should probably stop putting your hand in. And if you saw other people about to put their hand in, you would mention to them that everytime you put your hand in, you end up regretting it.
We don't need religion to keep from getting burned when we have tools.
It's also a surprisingly convenient way to build tests.
If we design systems out of a collection of processes, that we can replace at will, then what we actually have is a collection of checkpoints and branches that we can try simultaneously. Replacing individual branches allows us to try out changes there, without having to rebuild (and wait) the entire system.
Another way to think about this, is that Clojure is more like subversion than like git: It might be better than RCS, but you're still stuck with a linear revision history, and new changes can't completely conflict with old objects and old changes that are created.
And yet another way, is to imagine all of those old class definitions that old objects hold onto are actually global variables, because they have global (time) extent, and yet are unreachable, so it's difficult to find out whether your new code is being affected by those old settings.
Smalltalk, and even other (esp. Commercial) Lisps don't have this problem. It has nothing to do with interactivity, but with hidden state.
I mean, it was a win, not having to untangle the hairball of rpm/deb dependencies. I like that part too. But not understanding the downside was what shocked me. It was like everyone drank the magic kool-aid potion.
Really? This surprises you?
The gross majority of the world runs software this way.
The real issues are quality control and release process.
That's exactly how I recommend applying patches.
If it breaks things you can fix it.
You don't do this on a live system: If you're smart and your live systems are ephemeral you can copy your image, get it working, verify it interactively, and once you have a working image, you spin up new instances using the new system, and start shutting down the old systems.
We've been down this road before. Hacking something until it works, then imaging it and passing it on to your coworkers is a maintenance nightmare.
For example, did you read that article?
You know Docker has none of those problems
> The first problem with a snowflake server is that it's difficult to reproduce. Should your hardware start having problems, this means that it's difficult to fire up another server to support the same functions.
docker tag/push/pull
> If you need to run a cluster, you get difficulties keeping all of the instances of the cluster in sync. docker start tag
> You can't easily mirror your production environment for testing. docker commit/export/import
> When you get production faults, you can't investigate them by reproducing the transaction execution in a development environment. docker push/pull
> The true fragility of snowflakes, however, comes when you need to change them. Snowflakes soon become hard to understand and modify. Upgrades of one bit software cause unpredictable knock-on effects. docker history/diff
The issue that Martin is describing is one where people work on the server - update it in place, and do not have any change management process besides "do stuff" and any quality checking process besides "check stuff".He spent over 500 words to say that's probably not a good idea.
No kidding.
Now.
What I'm actually advocating is interactive development: The exact same way we develop our APL workspaces and our Smalltalk images, can be used to design and build server infrastructure.
Instead of a development cycle that goes:
* Edit nixfile/dockerfile/vagrantfile
* Wait (sometimes hours)
* Test things
* Repeat
You get a very short:
* Do stuff
* Get happy
* Tag the results
Then when you want to run "in production", you publish your tags/image, review the history with your team, not dissimilar to how Smalltalk people will clean up their changes file, and then introduce the new version into the cluster. Once you're satisfied the world hasn't ended, you can decommission the old images.
You can even make scripts that do these many of these steps automatically (divert x% of traffic to new instances, collect results, and so on). If you have a well-designed infrastructure, you can have junior developers use those scripts to make changes on their first day.
Now.
I get it, you have realised that if you start over often enough you get good at it.
I get that you've seen people who treat systems development as a completely linear descent into unmaintainable bat barf that can only be recovered by a bad day reinstalling everything and "starting over",
I also get that you think amortising that cost by taking those hours to rebuild your entire system when glibc changes is necessary to avoid that bad day.
I also get you like static external configuration like Dockerfiles or Vagrantfiles, and view them as instrumental in the audit of that process.
However while you understood that I disagree with that, you didn't understand why: If you had a decade or so of Smalltalk or Lisp experience instead of just ruby experience, you might have known exactly what I meant, but instead of asking, you just ignored the part you didn't understand, making a straw man argument that you did understand.
After all, what's more likely, someone knows something important that you don't? Or someone knows something unimportant and just isn't as smart as you?
The "build from source" camp provides solutions to a couple problems that at first glance seem to be difficult in a "principled mutation of binary image" model:
- Moving to a different architecture, e.g. x86 to ARM or ppcle. In build from source, I essentially change some parameters and components in the lowest level and rebuild.
- Other big changes to base components, e.g. compiling for Linux/libc vs. building atop a unikernel (obviously heavily dependent on what the upper layers are doing, but I can imagine wanting to run similar code atop multiple bases).
- Sharing common components. This is not really a "from source" thing, but is an important part of Nix. If two images include components in different orders, in Nix the common components will be shared (at the arguably coarse granularity of a Nix package), while the linear structure of Docker layers means once two images diverge, everything further down the chain will be its own copy, even if the same bits.
However there's another, perhaps simpler solution: I can have a separate "wu-ftpd" container, and a separate "hylafax" container. This admittedly might not have been as easy when nix started, but it is very very easy now.