Latest Posts (20 found)

When Every Distributed Database is 'Highly Available'

An irritating thing about database vendors is that they all claim their offering is "highly available". If pressed they'll say they're talking about their SLA , and while this is not technically lying, it is very misleading, because people who know some distributed systems lore may have a much different conception of what "availability" is; namely this from the CAP theorem : The CAP theorem has been critiqued - which we'll get to - but it is massively influential. Jepsen of database report fame uses the term similarly, furnishing us with three categories of availability: In the Jepsen terminology most databases today are unavailable. A good rule of thumb is anything with a single writing node falls under this - no matter what their marketing material says. I feel availability has been diluted too far to serve in the technical lingua franca of people building systems. Database vendors have convinced large numbers of us that there isn't even a availability/consistency trade off to be made - that they in their engineering might have miraculously achieved both. It's at times like this we need an academic. Not just a specialist, but a generalist, one who is able to take a broad subject area, analyse it intensely, and understands what he reads so totally he is able to explain it to a general audience. Availablity is dead, is anybody here a doctor??? In his excellent paper A Critique of the CAP Theorem , Martin Kleppmann goes into some detail, noting both the metric that is empirically observed definition the vendors use, and the more academic one used in the literature. It's well worth reading in full, but I want to focus on his "delay sensitivity framework": reproduced here (where d is network delay): In typical Kleppmannian fashion he has managed to reduce complex phenomena from a great number of real world systems into a simple table. But I think to serve as a piece of lingo, "delay sensitive" is not quite catchy to use in real speech. And so I humbly propose consistency/latency . It works because it's a single term; that DB is high cosnsitency/latency , that one is low consistency/latency . Consistency/Latency are an inseparabable package; you are either high or low, no "strong consistency AND highly available" vendor shennanigans. I am of course simplifying a great deal of complex research, but the general rule is that as consistency rises, latency increases with it; all else being equal it's always going to be faster & more robust to directly write to your local node than wait for a consensus protocol to finish. While I desperately hope this becomes popular enough that we can call it conlat for short, I have already started using this classification when talking about systems at a high level, and will continue do so. I hope it may also serve others well.

0 views

Waterfall Reconsidered

We all know waterfall is bad. It's outdated, bureaucratic, ineffective, and makes you late for dinner. It's just a stupid thing we did in the bad old days, before we were taught better by a group of consultants at a mountain retreat. Or so the Agilists would have us believe. Today agile apologists claim the true meaning of agile has been distorted. What we commonly think of as Agile - bureaucratic processes, standups, backlogs, product owners, sprints etc etc - is actually Industrial Agile, sometimes or Big-A Agile. But, actually , the original agile (small-a!) is wonderful, and contains only what's in agile manifesto. I will show we can make the exact same argument for waterfall; that there is an original, uncorrupted kernel we have neglected, and that the horrible nasty Industrial Waterfall - held up as a bogeyman by agilists - is a distortion of the initial, elegant idea. You have been lied to, dear reader - and if you would learn more of the truth of small-w waterfall, read forth! Today "Waterfall" is taken to mean a one pass development process. First all the requirements are done, then the specs, then the coding, then the tests - in more or less granularity. You can only go forward between these phases - never backwards. Problem in the specs? Too bad, they've been signed off on. But it did not mean this to the men who coined it. The first mention of "Waterfall" was the 1976 paper Software Requirements: Are They Really a Problem? by Bell & Thayer. In it they argue that software requirements do not just "arise naturally", but need an engineering effort to define well (a finding that still eludes many software teams some 50 years thence), and early in the second page they write of "software development systems"; what we might today call methodologies: ...practicioneers have concluded that a top-down approach is superior to the bottom-up approach of the past. The Military Standard set MIL- STD 490/483 recognized this newer approach by specifying a system requirements document, a "design-to" requirements document that is created in response to the system requirements, and then a "code-to" requirements document for each software module in the design. Each of these is at a lower level of detail than the former, so the system developers are led through a top-down process. The same top-down approach to a series of requirements statements is explained, without the specialized military jargon, in an excellent paper by Royce [5]; he introduced the concept of the "waterfall" of development activities. In this approach software is developed in the disciplined sequence of activities shown in Figure I. Each of the documents in the early phases of the waterfall can be considered as stating a set of requirements. At each level a set of requirements serve as the input and a design is produced as output. This design then becomes the requirements set for the designer at the next level down. Their Figure I is based on the infamous "Waterfall Diagram" (retroactively named) of Royce's 1970 paper Managing the Development of Large Software Systems (Royce, 1970) : (First off, let me state clearly - I've read the Royce paper, yes I know he wasn't arguing for phase-gated development, yes I know he didn't coin the term waterfall, and yes I know the people most angry at the title of the article won't read this far and will still comment that I am ignorant of all the above. Back to the article.) So what impressed Bell & Thayer was not some notion of a rigid gated process, but just how clearly the top-down software development process had been illustrated, showing clearly that higher designs naturally flowed down to lower. Indeed they took it for granted that requirements development must be iterative; writing on page 6: The importance of continually reviewing requirements for their impact on design solutions is obvious, especially in a top-down environment where each iteration through the development cycle affords the opportunity to deal with changing or incorrect requirements, and to factor these changes into the evolving design. So if phase-gating gremlins are not an integral part of waterfall (more lies from the Agile-Industrial complex), what's left is what Bell & Thayer immediately zeroed in on: Top-Down design. The papers I am drawing from were written in the 70s, and many of the terms may be strange to us today. So let's break down a modern top-down design into three phases: REQUIREMENTS DESIGN DEVELOPMENT Note how inherent direction of the whole thing. If there's a change in the design, it likely means more development work. If there's a change in requirements, then the design must change, and hence more development - it quite literally flows as surely as water does. This is of course a heuristic and not an absolute rule; in a well functioning organisation with effective testing an issue in development can definitely propagate its way up and cause higher level designs to be debugged. From Bell & Thayer, page 5: However, reports documenting requirement-related problems or needed change can be generated throughout the development cycle, not just during appropriate requirement reviews. In fact, such information also comes from the design phase and as late as the formal testing phase... While the principal activity may be software design or testing, documented problems at any point in the development cycle may identify the source of the problem as any previous activity, e.g., a requirement error documented on a software problem report written during formal testing. Does it then follow that their waterfall is purely circular? I argue not - there's a directionality to it, and design flows downwards. All software is judged by problems it solves in the real world, how it is to use, and how well developed it is - in that order. That issues lower in the waterfall (ie, slow unmaintainable code) can affect things further up does not change this. Rarely will a technical development issue change high level requirements - there is a direction, a gravity drawing us towards the implementation, and waterfall describes it. As Fred Brooks said in No Silver Bullet : The hardest single part of building a software system is deciding precisely what to build...No other part of the work so cripples the resulting system if done wrong. No other part is more difficult to rectify later. The agile manifesto is a slippery piece of work - hinting at much and saying little - but I think even they acknowledge this: Anyone who's been a contract dev on a day rate will confirm that changing requirements are absolutely a thing to welcome. Bell & Thayer's "waterfall of development activities" exists, whether a team produces artefacts for it or not. A failure to acknowledge a phenomenon does not make it go away. We are told to judge agile in its purist form, and in the most charitable way; but the ideas behind waterfall have a clarity of thought and a clearness of metaphor that far surpasses anything in that dreary "manifesto". So, why not carry the name proudly? Waterfall is just top-down iterative development, and that is an sensible, effective approach. A brave new world of waterfall coaches, waterfall consulting and waterfall conferences await us, if only we would reach out our hands to grasp it.

0 views

Short Reflection on being Offline for 24 hours

There are, I think two reactions to the title of this post. One is to scoff at how short a time 24 hours really is; something barely worth mentioning. But another, perhaps less voiced reaction is to think "wow, I can't remember when I last did that..." When I last did this it was involuntary - I was living in a shack in the mountains and a sheep had chewed through the cable connecting me to the satellite dish, which was in turn connecting me to the web. And so I spent a couple of weekends net-less (with weekdays at a co-working space so I could keep in contact with my client). But I can remember kind of enjoying it, reading things I claimed I would get round to reading but never did, and thinking more deeply. "Maybe I should make it a regular thing" I thought, "just to reset things and get a new perspective...". That was some six years ago, and the most I'd managed since then is maybe an hour of self-imposed internet exile. But things have been building recently. Having a three your old who - while she does enjoy a cheeky music video or three - is nevertheless content to do things like read, draw, and play with blocks through her day made me reflect. How much was she seeing her father doom scrolling with the excuse of "I just need a break"? Why couldn't I be more like her, and how long until she was more like me? I took note of the contemporary moral panic around kids and smart phones, and I deemed it pointless if society at large was addicted; the generation who had chided us millenials for "always TXTing" on our monochrome nokias were now grey, wisened, and often more addicted to contemporary devices than we ever were. But unlike the generations before or after, I at least had partial immunity from remembering old youtube with it's amateur video content and primitive skinner box mechanisms; of having some natural resistance to the more modern and extreme developments of shorts and AI thumbnails. What hope does a child have of resisting contemporary, weapons-grade slop addiction? And so I've spent the last 24 hours cut off from the internet as an experiment. Completely self imposed - just disconnected my devices and set an alarm. Once again I read more, once again I thought more deeply, and once again I liked it. My alarm will be ringing soon and I will be lying if I said I wasn't excited to re-connect. And nor am I trying to say that the internet itself as some wholly negative thing - after all, that's where the things I read come from; the best written material the world has to offer, saved to my machine. And yet despite the incredible upside of the internet, I can't help wonder if my continued resistance against its dark side might require more drastic action. I'd already quit facebook, reddit, lobsters, HN (ok...provisionally) bluesky, several discords, and most recently I'd been off youtube entirely for days. But there's always a hook back in. "I can't quit X" I tell myself, "I've met so many great people... oh what's that, tech drama? Well they surely need to hear my opinion..." My time online draws near. The ever-full needle of stranger's opinions hovers tantalisingly over my swabbed, tensed arm. Still, I like to think I've taken the first step.

0 views

Why I think Rust is Object Oriented

Before we begin, I want to say I don't care that much if you disagree with me. There's no sound precise mathematical definition of Object Oriented, no ISO standard, and no grand arbiter who decides what is and what is not OO (although I believe Casey Muratori may have applied for that position somewhere in his 12 day monologue about the subject). You are unlikely to change my mind, and I am unlikely to change yours, and that's perfectly fine. On with the post! In my heart of hearts, Rust feels like an object oriented language. Practically everything I write in Rust is a datum + set of behaviours intimately associated therewith. I hide my struct fields, give my totally-not-objects equality semantics and string representation. I utilise polymorphism via traits - and while I know that traits are not technically interfaces, that fact occupies the same region of my brain that knows that mandrills are not technically baboons. Almost all my functionality is written in methods, and those methods belong to the data they operate on, in a way that they definitely don't in something like C or OCaml. But what about inheritance? OO-haters often fixate on this as the defining thing about objects, which has always perplexed me. I came up in the JavaMania era and "composition over inheritance" was the accepted wisdom of every programmer who took OO seriously. I scarcely used it during my time in the C# mines. Historically speaking the case is weak as well; neither the first smalltalk, nor the first simula had inheritance. Self was hugely influential (traits originated in Self) and didn't have it either. I won't deny it wasn't a common feature, but it never took center stage in my mind outside the brief "Cat inherits Mammal" phrase we all go through, and it certainly wasn't encouraged in the OO design books I read. So why the disconnect? Why does talking about this not resonate with other Rust programmers? I think because in the Rust culture, "objects" are something very different. They're virtual destructors & inheritance trees. They're a nasty thing C++ had that Rust forwent because dynamic dispatch is slow (except in Zig of course where it's fast now). Of course Rust isn't OO! But for those of us who took object-oriented design seriously, everything you read just reinforced that they're neat little black boxes you call methods on. And of those, rust is full.

0 views

The Insecure Evangelism of LLM Maximalists

I just can't help feeling these training wheels are getting in the way of my bicycle commute.

0 views

Do Files want to be Actors?

Is 1970s distributed systems theory finally meeting 2020s kernel development?

0 views

Does Supply Chain Know what a Blockchain is?

Must the gulf between supply chain professionals and software technologists remain forever vast?

0 views