3 ms·
Hm I do see that point of view, but to me the trends seem to be in the opposite direction. I'd question if that view even makes sense at Google, because like I
by chubot 5y ago
Hm I do see that point of view, but to me the trends seem to be in the opposite direction.
I'd question if that view even makes sense at Google, because like I said nobody ever recompiles all the code in a cluster at once and reboots it. This is the "lack of atomic upgrade problem", which tilts you toward a dynamic view. Some more links here, I will probably put it on the blog:
https://old.reddit.com/r/ProgrammingLanguages/comments/t0lzeq/types_considered_harmful_pdf_2008/hyfhhu2/ https://old.reddit.com/r/ProgrammingLanguages/comments/t0lze...
It's even more true if you're AirBNB or Lyft -- are you going to recompile Google Maps or Stripe? No you use it dynamically through an API. Pretty much all organizations are like this now, not just software companies. They're a big pile of dynamically composed services, and so the static view has less and less power.
I was thinking today about a slogan Poorly Factored Software is Eating the World. My first job was working on console games where you shipped a DVD and never updated it, and it was incapable of talking to a network. But basically no software is like that anymore, including games and embedded systems.
What I see is that the world is becoming a single big distributed system and that actually influences what you'd consider technical details like the type systems! And static vs. dynamic libraries. There is pressure from applications on languages and operating systems.
-----
The DLL vs IPC question has a few different dimensions... I'd say Linux distros do it very poorly. The whole model of "named versions" and "constraint solving" is extremely brittle:
1. It reduces something that's multi-dimensional to one or 2 dimensions (a version number)
I wrote this awhile back, and it's related to the Clojure and protobuf style of "versionless" software evolution:
https://github.com/oilshell/oil/wiki/Feature-Detection-Is-Better-than-Version-Detection https://github.com/oilshell/oil/wiki/Feature-Detection-Is-Be...
2. It means that you're often running a combination of software that nobody has ever tested! In Linux distros, testing is basically done by users.
Google does a little better -- you have a test cluster, and you deploy to that first, so ideally you will have tested the exact combination of versions before it reaches end users. And you have canarying and feedback too, so even when you have bugs their impact is more limited.
https://old.reddit.com/r/ProgrammingLanguages/comments/t0lzeq/types_considered_harmful_pdf_2008/hyfhhu2/ https://old.reddit.com/r/ProgrammingLanguages/comments/t0lze...
So while I favor IPC, I'd say you can probably do dynamic linking well, but there are some "incidental" reasons why it's done poorly right now, and has a bad reputation. It leads to breakage and is hard to deploy, but that's not fundamental.
----
I guess the overall frame I'm trying to fight is "static vs. dynamic". What I'd say is that static is local and domain-specific, and you should take advantage of it while you can. But dynamic is inevitable at a large scale and we need better mechanisms to deal with it, better ways of thinking about it, better terms and definitions, etc.
Shell is of course all about dynamic composition -- it's basically unheard of to recompile all the programs a shell script invokes :) The language is such that you can't even determine all the programs it invokes statically (but Oil is going in that direction for deployability / containers)
----
Oh and the language project wasn't mine -- I just circulated it. I did 2 related experiments called "OHeap" that were protobuf/capnproto like, which I described on the blog, but I'm not using them, and they were only mildly interesting. In Oil there's not a hard line between front end and back end, so serializing the AST didn't end up being a major requirement.
- chubot 5y agoAdding one more thing: I'd also say there's a big asymmetry in DLLs vs. static libraries. DLLs that can be independently upgraded pretty much have to use the C ABI, which is more like RPC/IPC. It doesn't really make sense to have a pure Rust or C++ DLL -- you lose all your types and type safety; you have to write glue. So actually I'd say IPC and DLLs are closer together, and static libraries are on the other end of the spectrum. IPC and DLLs are both dynamic, and that's the important distinction. That's what a lot of the decisions in the acko.net article hinge on
- skybrian 5y agoYes, there are no atomic upgrades. Even when a static binary is replaced, there are many instances of it running and the processes aren't restarted atomically. However, in a protobuf-based system within a single organization, you can at least say that every deployed binary expects an API that was defined by some version of the same protobuf file. At Google there is (or was - it's been a while) a linear history of this file in source control somewhere. That limits the possible API variations in existence. By contrast, in the acko.net article, he describes the ad-hoc variation that happens when many organizations make their own extensions to the same protocol, with little coordination with each other. (And yes, the web is like this too.)