Cloudflare's blog post at https://blog.cloudflare.com/cloud-computing-without-containe... contains a graph in which requests are handled in 200 microseconds, orders of magnitude faster.
11,783 karma · joined March 23, 2009
john@john-millikin.com
Currently semi-retired; formerly at Google (2011-2017) and Stripe (2017-2022)
Cloudflare's blog post at https://blog.cloudflare.com/cloud-computing-without-containe... contains a graph in which requests are handled in 200 microseconds, orders of magnitude faster.
If containers and WASM are in fact competing technologies, as you and the article imply, then this shouldn't be possible.
On the other hand, if WASM is a format for executable code as I claim, then packaging WASM as a container image and executing it in a container runtime is fine and should work as well as any other machine-independent bytecode (such as JVM).
If someone wants to try to advertise some weird custom platform that uses WASM as an intermediate bytecode for its packaging format then that's fine, but they'll need to pick a different name.
A comparison between WASM and "containers" is meaningless, because the binaries being executed by a container runtime could be written in WASM. The executable format and the packaging format are separate concerns.
This might be easier to think about if you imagine the article was written as "native code vs containers" -- what conclusions (if any) could you draw from the benchmarks in an article with that premise?
The typical way to deploy CGI during the '90s was to have a compiled program in C/C++, which would be executed once per request. There were entire frameworks built around this "process per request" model, with various optimizations like pre-warming (start the process, connect to db, wait for request on stdin) and variant protocols (SCGI).
Any time you have an execution model based on running a single address space per request, it's fundamentally CGI-ish. It doesn't have anything to do with the implementation language. The limitation of CGI is that state can't be persisted in-process between requests.
---
Going back to the thread, there's multiple aspects when thinking about the structure of a hosted service:
1. Whether state is shared between requests (CGI vs long-lived process).
2. Whether the binary is native code (x86/ARM/) or bytecode (WASM/JVM/).
3. Whether the binary is standalone or comes with additional files.
4. If it needs additional files, whether it's distributed as a package (apt/rpm) or chroot (container image).
Does breaking those different concepts down into a list help? You can see that trying to compare the performance of "WASM deployed as standalone binary with CGI execution model" and "native code deployed in container image" just isn't meaningful. The article is mixing up too many different ideas when trying to benchmark.
> Actually there is support for using WASM as a container runtime.
Isn't that what I said?Some container runtimes (such as `runc`) execute a native binary. There are also container runtimes that execute a WASM+WASI binary.
So trying to compare WASM with "containers" is like asking "should you deploy your code as x86 or as a container", which isn't a useful question.
To provide a security boundary between Linux processes, it's currently considered best practice to use something like Firecracker or gVisor.
This may be me shouting into the void, but I wish there were an article directly comparing jails with namespaces, which is the Linux functionality that Docker uses. I can totally believe that FreeBSD jails provide a better / more unified / more secure experience than Docker, but to extend that into saying "FreeBSD jails are better than Linux namespaces" feels like a category error.
Questions I would like to see answered in that article:
* Can jails be used to run subprocesses in the normal filesystem, but with a different network environment (for example making a given command run its net traffic through TAP)?
* Can jails be used to limit memory/cpu/IO/network for subprocesses? For threads within a process?
* Can live processes be moved into or out of a jail?
* Can jails be used to make a process think it's running as a different user?
I feel like the answer to these questions is generally "no, that's not what jails are for", which is (1) a fine answer given the apparent goal of being a better chroot(), and (2) reinforces that jails and namespaces are addressing different problem domains.
> You can setup Linux in a jail.
I don't see how this can be possible. Could you explain more how to boot a Linux kernel within a FreeBSD jail?edit: I'm not talking about running binaries compiled for Linux under FreeBSD. The parent said it's possible to set up Linux within a jail, so I want to see instructions to boot an actual Linux kernel as a FreeBSD process.
The idea of trying to learn some new ecosystem-specific build tool (in this case msbuild) is unappealing. Done that too many times, and I'm tired of fighting with tools written for/by people who think projects are written in a single language.
[0] I hear Buck2 is a step in this direction.
> Banshee is a pretty long-lived project; we might be talking 10+ years ago.
I looked through my archives and I think most of my contributions were pre-2010, so 13+ years.Mono was a very different thing back then -- less mature, and Microsoft (mid Ballmer era) seemed to have a love/hate relationship with it.
There's clearly something else underneath, the <LinkerArg> element is exactly what I would want to generate when running link.exe, but most of the configuration options are wrapped in a layer of gunk.
Ideally it would be possible to invoke a command directly to convert a bunch of *.cs files into a .dll (or .a), then I could use existing logic to link it with link.exe (or ld).
My favorite in terms of looks and behavior is Windows 2000, and it's still in the top 5 when I think of desktop UIs that don't try to grab the user's attention. It was also much lighter on resources than XP, and didn't have poorly-animated dogs hiding behind the menus.
But oh man, let me tell you, the first time I experienced one of the newer versions restart its graphics driver without losing state was magical. I can't remember how many hours I lost to blue screens with a stack trace deep inside some ATI/nVidia dll, and to this day I can get a kernel panic in Linux if I tickle the GPU the right way, but modern Windows has proper GPU driver isolation and they did it without wrecking performance.
I wish it were somehow possible to run the pre-XP interface on the modern OS.
The actual implementation was something like this:
const char *cluster = "ex";
uint16_t enc_cluster = (((uint16_t)cluster[0]) << 8) & (uint16_t)cluster[1];
A proposal to reserve the high bit to signal a "long name" was unfortunately(?) not accepted.This was nearly a decade ago, so things may be different now. You'd have to ask someone who currently works there to tell you what their cluster names look like.
When I saw that .NET 7 included AOT, I immediately downloaded it to play around. It's clearly not fully baked (missing macOS support), but what is there is great. AOT makes C# a direct competitor to Go for projects that don't need to wring every last cycle out of the CPU, and it doesn't have the same squeamishness about language complexity that characterizes Go.
The only part of .NET 7 that really bothers me is the compilation process. I couldn't find any compile-to-obj command with flags and such, instead there's a `dotnet` command that takes its input via a monolithic `.csproj` XML file and spits out a fully-formed binary. Trying to integrate C# into a Unix-style build pipeline (make/Bazel) doesn't seem straightforward in the current SDK.
The purpose is to have a Schelling point that bypasses any tedious weeks-long arguments. Otherwise your Frankfurt datacenter gets named "ceurope" because the London datacenter got "europe" first, or you named the Ohio datacenter "east" and there's a fight about whether to call the new Virginia datacenter "easter".
[0] If you're building a submerged datacenter in the middle of the Atlantic then ... well, do your best.
My favored format is somewhat complex in terms of layout, but is compact and easy to read once you get used to it:
IATA code (https://en.wikipedia.org/wiki/IATA_airport_code)
Cluster number (digits)
'r' (for "rack") \______ if meaningful for you
Rack number / (ignore for EC2/GCP)
'm' (for "machine")
Machine number
An example hostname might be `dls1r56m10.mycompany-prod.com`.Alternatives that don't work as well:
* Don't use a fixed-width field anywhere. Google used two-letter cluster names, and when those ran out they discovered that the two-letter assumption had worked its way into every layer of the stack. One of the important core services had `uint16_t cluster` in its wire protocol.
* Don't make up your own cluster names. Don't use names like "northwest" or "east". IATA codes are your friend and you will love them because someone else already decided what they should be and wrote them down.
* Don't use fields without delimiters. Being able to say "read digits until the next non-digit" is incredibly useful when writing ad-hoc parsers in shell scripts, because those parsers won't break when you bring up the first datacenter with more than 99 racks. If you tell people not to write hacky ad-hoc parsers in shell scripts, they will (1) do so anyway and (2) not tell you.
* Don't leave off the cluster number. Yes, you only have one cluster in us-west-2 right now, but maybe in five years you'll need to have more than one because you want to run 30,000 EC2 instances there but all your per-cluster infrastructure software falls over at 20,000 instances. Then you can just turn up "pdx2" instead of trying to explain to Hashicorp engineers why you want to run the world's biggest Consul cluster.
* Do not put the production hostnames under a subdomain of your corporate website. If you are ACME LLC then your hostnames should end with `.acme-prod.com` instead of `.prod.acme.com`. The same is true of corporate IT assets like laptops or workstations (`acme-corp.com` -- NEVER `.corp.acme.com`). Why? Browser cookies.
> most abandon programming proper rapidly - I'd hazard within 3 years - and
> go on to other tertiary fields (PM, DevOps, SRE, etc)
SRE is a specialized subfield of programming. Someone has to write and debug all those low-level tools (runc, systemd, etcd) that sit "below" what most people consider to be the backend stack.If someone becomes an SRE because they don't like programming, they're going to be in for a big surprise when they discover how much quality time they're about to share with the unshare(2) manpage.
You can "transfer" a 1 GiB `Vec` between threads without having to actually copy it, which is not true of stack-allocated values.
The relative scarcity/cost of the stack vs heap only gets more extreme as the machines get bigger. My desktop has 128 GiB of RAM, and `ulimit -s` reports a default thread size of 8 MiB. A typical rack-mounted server is going to have 1 TiB or more of RAM, and almost certainly the same stack size.
Could I make the stack size bigger on my machine? Sure, yes, but what would that get me when the entire world writes software with the assumption that any allocation over a few dozen MiB needs to be on the heap?
Time flies like an arrow, fruit flies like a banana.
In this example, "flies" could be either a noun or verb depending on context. That sort of construct isn't possible in Lojban.Of course, it's still possible to use Lojban to express statements that have an ambiguous or unclear meaning.
I wrote more about this at <https://news.ycombinator.com/item?id=35985835> and <https://john-millikin.com/software/anansi#history>.
You could probably even do it with Markdown directly, using fenced code blocks as part of your begin/end lines.
I think you'll find that this approach offers very little benefit over either traditional commentary or linear notebook-style inline code blocks.
It's not especially useful. For literate programming you really need the ability to move blocks of code around without the ceremony of function signatures.
I'll quote from the linked page regarding my conclusions:
------------>8----------
But in the end, I was never able to realize the promised benefits of Literate Programming. The typeset PDF was not easier to read than hypertext documentation generated by Haddock, and both were obviously worse than the very nice docs being created by the Python community with Sphinx.
So in mid 2012 (~3 years after starting the project) I removed all the literate annotations and styles, dropped the fancy build scripts, and released haskell-dbus 0.10 as standard Haskell.
------------>8----------
I'm sure an expert in LaTeX could do a better job with the formatting, and with the benefit of 10 additional years of experience there are some design decisions I would do differently in the code, but even so I think it was a reasonably effortful attempt.
I've never felt any urge to try Literate Programming again.
[0] https://john-millikin.com/software/anansi#history
[1] https://github.com/jmillikin/haskell-dbus/releases/download/...
> it would be much more reasonable for OP to note that they don't
> have a clue if anybody would be breaking the law
If someone who does not qualify as an Accredited Investor has invested into a security that is only allowed to be sold to people who qualify as Accredited Investors, then the law has clearly been broken by someone. You don't need to graduate from Yale to understand this. > Your teenaged kid takes your car without you knowing and kills somebody in
> a car accident. Drunk. On your alcohol. Did they steal it? What's your
> liability? Do you need to talk to a lawyer, or is it reasonable for OP to
> give you his opinion?
The OP's opinion would likely be like mine, or like any reasonable person's, which is that (1) an illegal thing has clearly happened, (2) your kid has clearly done at least one illegal thing, (3) you may also have done something illegal.What kind of person would look at the facts of that situation and think "hmm, I dunno, this law stuff is difficult, no way for me to know if I have any legal risk"?
The easiest way to not go to jail for assault with a deadly weapon is to not assault people. It is very easy to follow this guideline, and the success rate is quite high (most people in the world are not currently in jail).
If you absolutely must assault someone, and you decide to use a weapon, then yes, you will likely want to hire a lawyer to write a bunch of carefully-argued pages about why you shouldn't go to jail.
But it's not like you would just be walking down the street, knocking people out with a tire-iron as one does, and then get ambushed by the complexities of the law.
You and I wouldn't notice if that entire industry was replaced by ChatGPT because nobody reads that text, it doesn't exist to be read, it exists to tickle some ranking model deep in the bowels of Google. But you can be sure that the people selling coherent text for $0.01/word will notice when ChatGPT can generate the same thing for $0.000001/word.
You cite examples where the law forbids something, but a judicial opinion allows it. So one easy way to avoid doing something illegal in all of your examples is to simply follow the law as written.
Sure, maybe with legal counsel you could push things a little further, get your nunchuck possession charge dismissed because you were pulled over two hundred yards past the Yuba county line or whatever, but that's different from someone who wants to avoid getting in trouble in the first place.
The reason lawyers get paid so much is that if you're doing something that is right on the boundary[0] then the difference between legal and illegal might be extremely fuzzy, and also worth a lot of money, so it's worth paying someone $1000 an hour to write a long brief in your local judge's preferred WordPerfect template about why what you're doing is OK.
On the other hand, the SEC website linked by OP just has a checklist of Accredited Investor qualifications, and it's possible to read them. Do you have a salary of $300,000? You qualify. Did you make $195,000? Well, that's less than $200,000 so unless one of the other checkboxes matches, you're out of luck[1].
[0] Maybe it's illegal by the letter of the law but you think it shouldn't be, like ride-sharing in locations with taxi regulations. Or maybe it's not illegal but might be viewed with extreme skepticism by regulators, like offering a non-fraudy Bitcoin exchange. In both of those cases, there's an easy solution (just don't do the maybe-illegal thing) that is accessible to the layman.
[1] Maybe you can hire a lawyer and/or CPA to get your $6000 of undeclared dog-walking income counted for the purposes of Accredited Investor qualification, but is it really worth the hassle?