Tuesday, June 18, 2019

Book review. Range: Why Generalists Triumph in a Specialized World

This is a very recent book, released on May 28, 2019. I got drawn to this book due to its interesting and controversial title: "Why Generalists Triumph in a Specialized World". The blurb about the book says:
"If you take a closer look at the world's top performers, from professional athletes to Nobel laureates, you'll find that early specialization is the exception, not the rule.
[David Epstein] discovered that in most fields--especially those that are complex and unpredictable--generalists, not specialists, are primed to excel. Generalists often find their path late, and they juggle many interests rather than focusing on one. They're also more creative, more agile, and able to make connections their more specialized peers can't spy from deep in their hyperfocused trenches. As experts silo themselves further while computers master more of the skills once reserved for highly focused humans, people who think broadly and embrace diverse experiences and perspectives will increasingly thrive."

Another thing that drew me to the book is the author. Epstein's previous book was "Sports Gene". Epstein is very careful and diligent with his research. He always goes to the source and reads many journal papers as part of his research. The notes at the end of the book take the last 30% of the book. Epstein doesn't refrain from questioning the validity of popular understanding and beliefs. In this book, he does that to the popularization of the grit research results and the 10,000 hour rule results.

The book was a very good read, but it is long, at 351 pages. It is 12 chapters, in addition to introduction and conclusion. I thought I learned a lot from the book, and I was only at Chapter 5. The book could have been sweeter had it been shorter. I think it would be better to remove 3-4 chapters toward the end. To keep my post short and manageable, I left out majority of my highlights. Out of the 14 chapters I only provide highlights from 5 chapters.

The book clearly communicates the dangers of overstating/overemphasizing hyperspecialization and the benefits of being an effective generalist, but there aren't actionable lessons on how to go about that. I highly recommend you read this book, and make your own mind about it. At the end of this post, I discuss what I learned from the book and my take and opinions on this subject.

Highlights from the book

Introduction: Roger vs. Tiger

Tiger [Woods] has come to symbolize the idea that the quantity of deliberate practice determines success—and its corollary, that the practice must start as early as possible.

The push to focus early and narrowly extends well beyond sports. We are often taught that the more competitive and complicated the world gets, the more specialized we all must become (and the earlier we must start) to navigate it.

Moving high-ranking government officials between departments, he wrote, “is no less absurd than rotating Tiger Woods from golf to baseball to football to hockey.” Except that Great Britain’s massive success at recent Summer Olympics, after decades of middling performances, was bolstered by programs set up specifically to recruit adults to try new sports and to create a pipeline for late developers--“slow bakers,” as one of the officials behind the program described them to me. Apparently the idea of an athlete, even one who wants to become elite, following a Roger [Federer] path and trying different sports is not so absurd.
             
Eventual elites typically devote less time early on to deliberate practice in the activity in which they will eventually become experts. Instead, they undergo what researchers call a “sampling period.” They play a variety of sports, usually in an unstructured or lightly structured environment; they gain a range of physical proficiencies from which they can draw; they learn about their own abilities and proclivities; and only later do they focus in and ramp up technical practice in one area.
             
One study showed that early career specializers jumped out to an earnings lead after college, but that later specializers made up for the head start by finding work that better fit their skills and personalities.

I dove into work showing that highly credentialed experts can become so narrow-minded that they actually get worse with experience, even while becoming more confident --a dangerous combination. And I was stunned when cognitive psychologists I spoke with led me to an enormous and too often ignored body of work demonstrating that learning itself is best done slowly to accumulate lasting knowledge, even when that means performing poorly on tests of immediate progress. That is, the most effective learning looks inefficient; it looks like falling behind.

Starting something new in middle age might look that way too. Mark Zuckerberg famously noted that “young people are just smarter.” And yet a tech founder who is fifty years old is nearly twice as likely to start a blockbuster company as one who is thirty, and the thirty-year-old has a better shot than a twenty-year-old. Among the fastest-growing start-ups, the average age of a founder was forty-five when the company was launched.
             
One revelation in the aftermath of the 2008 global financial crisis was the degree of segregation within big banks. Legions of specialized groups optimizing risk for their own tiny pieces of the big picture created a catastrophic whole. “No one imagined silos like that inside banks,” a government adviser said later. Overspecialization can lead to collective tragedy even when every individual separately takes the most reasonable course of action.
             
Highly specialized health care professionals have developed their own versions of the “if all you have is a hammer, everything looks like a nail” problem. Interventional cardiologists have gotten so used to treating chest pain with stents—metal tubes that pry open blood vessels—that they do so reflexively even in cases where voluminous research has proven that they are inappropriate or dangerous. A recent study found that cardiac patients were actually less likely to die if they were admitted during a national cardiology meeting, when thousands of cardiologists were away; the researchers suggested it could be because common treatments of dubious effect were less likely to be performed.

Increasing specialization has created a “system of parallel trenches” in the quest for innovation. Everyone is digging deeper into their own trench and rarely standing up to look in the next trench over, even though the solution to their problem happens to reside there.
               
Scientists and members of the general public are about equally likely to have artistic hobbies, but scientists inducted into the highest national academies are much more likely to have avocations outside of their vocation. And those who have won the Nobel Prize are more likely still. Compared to other scientists, Nobel laureates are at least twenty-two times more likely to partake as an amateur actor, dancer, magician, or other type of performer.
             
... electrical engineer Claude Shannon ... launched the Information Age thanks to a philosophy course he took to fulfill a requirement at the University of Michigan. In it, he was exposed to the work of self-taught nineteenth-century English logician George Boole, who assigned a value of 1 to true statements and 0 to false statements and showed that logic problems could be solved like math equations. It resulted in absolutely nothing of practical importance until seventy years after Boole passed away, when Shannon did a summer internship at AT&T’s Bell Labs research facility.
             

Learning, fast and slow

One of those desirable difficulties is known as the “generation effect.” Struggling to generate an answer on your own, even a wrong one, enhances subsequent learning. Socrates was apparently on to something when he forced pupils to generate answers rather than bestowing them. It requires the learner to intentionally sacrifice current performance for future benefit.

Metcalfe and colleagues have repeatedly demonstrated a “hypercorrection effect.” The more confident a learner is of their wrong answer, the better the information sticks when they subsequently learn the right answer. Tolerating big mistakes can create the best learning opportunities.
             
Struggling to retrieve information primes the brain for subsequent learning, even when the retrieval itself is unsuccessful. The struggle is real, and really useful.

... there was a group of Calculus I professors whose instruction most strongly boosted student performance on the Calculus I exam, and who got sterling student evaluation ratings. Another group of professors consistently added less to student performance on the exam, and students judged them more harshly in evaluations. But when the economists looked at another, longer-term measure of teacher value added—how those students did on subsequent math and engineering courses that required Calculus I as a prerequisite—the results were stunning. The Calculus I teachers who were the best at promoting student overachievement in their own class were somehow not great for their students in the long run. “Professors who excel at promoting contemporaneous student achievement,” the economists wrote, “on average, harm the subsequent performance of their students in more advanced classes.” What looked like a head start evaporated.
             
The economists suggested that the professors who caused short-term struggle but long-term gains were facilitating “deep learning” by making connections. They “broaden the curriculum and produce students with a deeper understanding of the material.” It also made their courses more difficult and frustrating, as evidenced by both the students’ lower Calculus I exam scores and their harsher evaluations of their instructors.
             
Desirable difficulties like testing and spacing make knowledge stick. It becomes durable. Desirable difficulties like making connections and interleaving make knowledge flexible, useful for problems that never appeared in training. All slow down learning and make performance suffer, in the short term.


The trouble with too much grit

Malamud’s conclusion: “The benefits to increased match quality outweigh the greater loss in skills.” Learning stuff was less important than learning about oneself. Exploration is not just a whimsical luxury of education; it is a central benefit.
             
It should come as no surprise that more students in Scotland ultimately majored in subjects that did not exist in their high schools, like engineering. In England and Wales, students were expected to pick a path with knowledge only of the limited menu they had been exposed to early in high school. That is sort of like being forced to choose at sixteen whether you want to marry your high school sweetheart. At the time it might seem like a great idea, but the more you experience, the less great that idea looks in hindsight. In England and Wales, adults were more likely to get divorced from the careers they had invested in because they settled down too early. If we treated careers more like dating, nobody would settle down so quickly.
             
For professionals who did switch, whether they specialized early or late, switching was a good idea. “You lose a good fraction of your skills, so there’s a hit,” Malamud said, “but you do actually have higher growth rates after switching.” Regardless of when specialization occurred, switchers capitalized on experience to identify better matches.

In 2004, at the beginning of Beast, Duckworth gave 1,218 plebes in the incoming class the grit survey. They were asked to pick from five ratings how much each of twelve statements applied to them. Some of the statements were plainly about work ethic (“I am a hard worker”; “I am diligent”). Others probed persistence or singular focus (“I often set a goal but later choose to pursue a different one”; “My interests change from year to year”). Where the Whole Candidate Score failed to predict Beast dropouts, the Grit Scale was better. Duckworth extended the study to other domains, like the finals of the Scripps National Spelling Bee. She found that both verbal IQ tests and grit predicted how far a speller would get in the competition, but that they did so separately. It was best to have a ton of both, but spellers with little grit could make up for it with high verbal IQ scores, and spellers with lower verbal IQ scores could compensate with grit.

“I worry I’ve contributed, inadvertently, to an idea I vigorously oppose: high-stakes character assessment,” she wrote. That is not the only way in which grit research has been extended or exaggerated beyond its evidence.
             
The fact that cadets are selected based on their Whole Candidate Score leads to what statisticians call a “restriction of range.” That is, because cadets were selected precisely for their Whole Candidate Score, a group of people who are very alike on Whole Candidate Score measures were siphoned from the rest of humanity. When that happens, other variables that were not part of the selection process can suddenly look much more important in comparison. To use a sports analogy, it would be like conducting a study of success in basketball that included only NBA players as subjects; the study might show that height is not an important predictor of success, but determination is. Of course, the NBA had already selected tall men from the wider population, so the range of height in the study was restricted. Thus height appears not to matter as much as it truly does. Similarly, the relative predictiveness of grit and other traits in West Point cadets and spelling bee competitors may not look quite the same in less restricted populations. If a truly random sample of high school graduates was assessed for Whole Candidate Scores, not just those who were accepted to West Point, physical fitness, grades, and leadership experiences may well predict their Beast persistence, and perhaps more so than grit. Duckworth and her coauthors, to their credit, point out that by studying highly preselected groups, “we have necessarily limited the external validity of our investigation.”
             
The vast majority of plebes complete Beast, no matter their grit scores. In the first year Duckworth studied them, 71 out of 1,218 dropped out. In 2016, 32 of 1,308 plebes dropped out. The deeper question is whether dropping out might actually be a good decision.
             
Godin argued that “winners”—he generally meant individuals who reach the apex of their domain—quit fast and often when they detect that a plan is not the best fit, and do not feel bad about it. “We fail,” he wrote, when we stick with “tasks we don’t have the guts to quit.” Godin clearly did not advocate quitting simply because a pursuit is difficult. Persevering through difficulty is a competitive advantage for any traveler of a long road, but he suggested that knowing when to quit is such a big strategic advantage that every single person, before undertaking an endeavor, should enumerate conditions under which they should quit. The important trick, he said, is staying attuned to whether switching is simply a failure of perseverance, or astute recognition that better matches are available.

In return for a five-year active-duty service commitment, every West Point cadet gets a taxpayer-funded scholarship valued at around a half million dollars. That’s why it is particularly vexing to the Army that since the mid-1990s, about half of West Point graduates leave active military service after five years, which is as soon as they are allowed. It takes about five years just to offset the development costs for a trained officer. Three-quarters are gone before the twenty-year mark, which would bring them to their early forties having earned a lifetime pension.
             
The more likely the Army is to identify someone as a successful future officer and spend money on them, the more likely they are to leave as soon as possible. The Army’s goal is developing career senior officers, not simply Beast survivors. From the military’s perspective, this is all a major backfire.

Obviously, neither the academy nor ROTC are teaching cadets to leave. Did cadets suddenly lose the grit that had gotten them through Beast? It’s not that either. The authors of the monograph—a major, a retired lieutenant colonel, and a colonel, all current or former West Point professors—pinpointed the problem as a match quality conundrum. The more skilled the Army thought a prospective officer could become, the more likely it was to offer a scholarship. And as those hardworking and talented scholarship recipients blossomed into young professionals, they tended to realize that they had a lot of career options outside the military. Eventually, they decided to go try something else. In other words, they learned things about themselves in their twenties and responded by making match quality decisions.

The Army began offering retention bonuses—just cash payments to junior officers if they agreed to serve a few more years. It cost taxpayers $500 million, and was a massive waste. Officers who had planned to stay anyway took it, and those who already planned to leave did not. The Army learned a hard lesson: the problem was not a financial one; it was a matching one.
             
The Officer Career Satisfaction Program was designed so that scholarship-ROTC and West Point graduates can take more control of their own career progression. In return for three additional years of active service, the program increased the number of officers who can choose a branch (infantry, intelligence, engineering, dental, finance, veterinary, communication technology, and many more), or a geographic post. Where dangling money for junior officers failed miserably, facilitating match quality succeeded. In the first four years of the program, four thousand cadets agreed to extend their service commitments in exchange for choice.
             
A recent international Gallup survey of more than two hundred thousand workers in 150 countries reported that 85 percent were either “not engaged” with their work or “actively disengaged.” In that condition, according to Seth Godin, quitting takes a lot more guts than continuing to be carried along like debris on an ocean wave. The trouble, Godin noted, is that humans are bedeviled by the “sunk cost fallacy.”
             
Van Gogh was an example of match quality optimization, Robert Miller’s multi-armed bandit process come to life. He tested options with maniacal intensity and got the maximum information signal about his fit as quickly as possible, and then moved to something else and repeated, until he had zigzagged his way to a place no one else had ever been, and where he alone excelled. Van Gogh’s Grit Scale score, according to Naifeh’s assessment, was flush with hard work but low on sticking with every goal or project. He landed in the 40th percentile.

No one in their right mind would argue that passion and perseverance are unimportant, or that a bad day is a cue to quit. But the idea that a change of interest, or a recalibration of focus, is an imperfection and competitive disadvantage leads to a simple, one-size-fits-all Tiger story: pick and stick, as soon as possible. Responding to lived experience with a change of direction, like Van Gogh did habitually, like West Point graduates have been doing since the dawn of the knowledge economy, is less tidy but no less important. It involves a particular behavior that improves your chances of finding the best match, but that at first blush sounds like a terrible life strategy: short-term planning.
             

Lateral thinking with withered technology

They titled their study Superman or the Fantastic Four? “When seeking innovation in knowledge-based industries,” they wrote, “it is best to find one ‘super’ individual. If no individual with the necessary combination of diverse knowledge is available, one should form a ‘fantastic’ team.” Diverse experience was impactful when created by platoon in teams, and even more impactful when contained within an individual.
             
Novelist, screenwriter, and comics author Neil Gaiman has a similarly expansive range, from journalism and essays on art to a fiction oeuvre encompassing both stories that can be read to (or by) the youngest readers as well as psychologically complex examinations of identity that have enthralled mainstream adult audiences. Jordan Peele is not a comics creator, but the writer and first-time director of the extraordinarily unique surprise hit Get Out struck a similar note when he credited comedy writing for his skill at timing information reveals in a horror film. “In product development,” Taylor and Greve concluded, “specialization can be costly.”
             
Charles Darwin “could be considered a professional outsider,” according to creativity researcher Dean Keith Simonton. Darwin was not a university faculty member nor a professional scientist at any institution, but he was networked into the scientific community. Darwin only personally carried out experiments “opportune for experimental attack by a scientific generalist such as he was.” For everything else, he relied on correspondents, Jayshree Seth style. Darwin always juggled multiple projects, what Gruber called his “network of enterprise.” He had at least 231 scientific pen pals who can be grouped roughly into thirteen broad themes based on his interests, from worms to human sexual selection. He peppered them with questions. He cut up their letters to paste pieces of information in his own notebooks, in which “ideas tumble over each other in a seemingly chaotic fashion.” When his chaotic notebooks became too unwieldy, he tore pages out and filed them by themes of inquiry. Just for his own experiments with seeds, he corresponded with geologists, botanists, ornithologists, and conchologists in France, South Africa, the United States, the Azores, Jamaica, and Norway, not to mention a number of amateur naturalists and some gardeners he happened to know. As Gruber wrote, the activities of a creator “may appear, from the outside, as a bewildering miscellany,” but he or she can “map” each activity onto one of the ongoing enterprises. “In some respects,” Gruber concluded, “Charles Darwin’s greatest works represent interpretative compilations of facts first gathered by others.” He was a lateral-thinking integrator.
             

Conclusion: Expanding your range

When I began to write and speak about data indicating that athletes who go on to become elite are usually not early specializers, the reactions (particularly from parents) reliably fell into two categories: (1) Simple disbelief, can’t be true; and (2) “So, in one sentence, what is the advice?” What one sentence of advice can encapsulate the embrace of breadth and the journey of experimentation that is necessary if you want, like Van Gogh or Andre Geim or Frances Hesselbein, to arrive at a place optimized for you alone? Like the paths of those individuals, my exploration of breadth and specialization was inefficient, and what began as a search for one sentence of advice ended in this book.
             
That’s how it goes on the disorderly path of experimentation. Original creators tend to strike out a lot, but they also hit mega grand slams, and a baseball analogy doesn’t really do it justice. As business writer Michael Simmons put it, “Baseball has a truncated outcome distribution. When you swing, no matter how well you connect with the ball, the most runs you can get is four.” In the wider world, “every once in a while, when you step up to the plate, you can score 1,000 runs.” It doesn’t mean breakthrough creation is luck, although that helps, but rather that it is hard and inconsistent. Going where no one has is a wicked problem. There is no well-defined formula or perfect system of feedback to follow. It’s like the stock market that way; if you want the sky highs, you have to tolerate a lot of lows. As InnoCentive founder Alph Bingham told me, “breakthrough and fallacy look a lot alike initially.”
             
Finally, remember that there is nothing inherently wrong with specialization. We all specialize to one degree or another, at some point or other. My initial spark of interest in this topic came from reading viral articles and watching conference keynotes that offered early hyperspecialization as some sort of life hack, a prescription that will save you the wasted time of diverse experience and experimentation. I hope I have added ideas to that discussion, because research in myriad areas suggests that mental meandering and personal experimentation are sources of power, and head starts are overrated. As Supreme Court justice Oliver Wendell Holmes wrote a century ago, of the free exchange of ideas, “It is an experiment, as all life is an experiment.”

MAD questions

1. What is my take on this?

Without doubt, this was a very interesting read. There were many interesting anecdotes. But I can't just congratulate myself by having read a bunch of interesting things. What is the lesson I learned here? The book was too long and unfortunately there wasn't a resounding actionable lesson.

What the book communicates can be summed as "hyperspecialization can be dangerous and ineffective, and being an effective generalists is beneficial in many cases." But how can we become an effective generalist? Should we shun going deep and mastering a topic in favor of adding more breadth to our skillset? What is the balance there?

I think depth and mastery is important in any case. Without mastery in anything, it is hard to amount to something. You need to get acquainted with the process of mastery in some domain. And if you have mastery in one domain, it may be possible to apply and develop it in the context of another domain. So, maybe, the way to go about this is to master some tools in one domain, but then transfer it and apply to other domains as well. Don't just be a one-trick pony and don't be hyperspecialized. After you build mastery in some domain and tools, use your breadth/range to define the new problem/niche for you and dig your well there. When you go deep in new terrain, you can explore a new area, and differentiate and excel there.

I was looking forward to reading this book I think because I hoped it would validate and reaffirm my choices. I had hopped from topic to topic in my career: theory of distributed systems, self-stabilization, wireless sensor networks, crowdsource sensing and collaboration, cloud computing, distributed consensus and coordination. But of course, waiting for the book to reaffirm me was in vain. There is no overarching principle that covers every body and every case. It is important to keep questioning yourself and be deliberate about your choices. Life is about introspection and experimentation.

2. How much sharper can we make the book's thesis?

Heinlein famously said:
A human being should be able to change a diaper, plan an invasion, butcher a hog, conn a ship, design a building, write a sonnet, balance accounts, build a wall, set a bone, comfort the dying, take orders, give orders, cooperate, act alone, solve equations, analyse a new problem, pitch manure, program a computer, cook a tasty meal, fight efficiently, die gallantly. Specialization is for insects.
— Robert Heinlein, Time Enough for Love

This is a sharp hypothesis. Especially the "specialization is for insects" part. I wonder what would this book look like if it started with this more speculative thesis and try to prove this. Of course Epstein is a careful researcher, so he didn't want to be speculative. But I wonder if it is possible to make a case for this stronger thesis.

3. Should one do analogical thinking or not?

The book dedicates a whole chapter about how Kepler used analogical thinking, and promotes the importance of analogical thinking when working on a new domain.

I am a highly analogical/intuitive thinker. But I have always been very insecure about it. Dijkstra hated analogical thinking and wanted to shun it. He made a case against it in "The cruelty of teaching computer science." But, on the other hand, Feynman was a highly intuitive thinker and employed analogical thinking a lot. I think the jury is out on this one. I don't know if there has been rigorous research on the effectiveness and dangers of analogical thinking.

In any case, it is hard to fight your natural tendencies and peculiarities. So maybe instead of being insecure about this and fighting it, I should embrace my analogical thinking as a strategic advantage.

4. Omission errors are the hardest to catch. Did this book omit important stuff pertaining to this topic?

If you read something you don't agree with, you flag it immediately. But if it is not there and it is omitted, you may not catch it. Did this book omit any important stuff pertaining to the subject of being generalists versus specialists and achieving success one way or another?

I think community aspect is omitted. Without clusters, flowers don't spring. I think it is essential to be involved with a vibrant community to thrive and excel on a topic. There are many examples of this, the climbing community discussed in the "Valley Uprising" documentary, the hacker community discussed in Steven Levi's book.

Maybe, being involved with a vibrant community can give you both depth and width.
If you look back closely at history, many of the people who we think of as lone geniuses were actually part of “a whole scene of people who were supporting each other, looking at each other’s work, copying from each other, stealing ideas, and contributing ideas.” *Scenius* doesn’t take away from the achievements of those great individuals; it just acknowledges that good work isn’t created in a vacuum, and that creativity is always, in some sense, a collaboration, the result of a mind connected to other minds.

5. Why do I keep reading productivity/management books?

Recently I had read and discussed about "Loonshots", which had some parallel to this book. And before that I had discussed Creativity Inc., which is also very related.

I don't know why I keep reading these management(?) books. This is concerning... Help... I should be reading science fiction. Please suggest me good science fiction books. I think I should be checking out Neal Stephen's new book "Fall".

Monday, June 10, 2019

Is this consensus?

The specification for consensus is as follows. The first two are safety properties, the last one a liveness property.
  • Agreement: No two node can commit different decisions.
  • Validity (Non-triviality): If all initial values are same, nodes must commit that value.
  • Termination: Nodes commit eventually.
Below I talk about whether ABD or chain replication solve consensus, and whether it would be possible to implement state machine replication using them.

Does ABD solve consensus?



No, ABD does not solve consensus. I had written a summary of the ABD protocol in a 2012 post. And I had talked about why ABD is not consensus in a 2015 post. Below is a short recap of that followed by a discussion of whether ABD can still be employed to solve the state machine replication problem.

Consensus is prone to the FLP impossibility result, and it may lose progress under FLP conditions. In particular, for Paxos, if we can't determine whether the incumbent leader has failed in an asynchronous environment, then we may run into the dueling leader problem, which may continue until failure detection and consequently leader election stabilizes.

In contrast, ABD is not affected by the FLP result. This is because ABD is memoryless and hedonistic. ABD is happy with unresolved, partial acceptances in the past. Heck, it will completely overwrite a value that is accepted by all nodes if another write comes with a higher timestamp.

In comparison, Paxos is obsessed with the past. For each consensus instance, Paxos clings onto the value a node has seen (with the highest ballot). In the first and second phase of write in ABD there is no rejection/restart of the operation. In Paxos, both in the first phase and second phase, a leader/candidate may receive a rejection and goes back to retry phase 1.

Since ABD is memoryless and hedonistic, we can not implement replicated state machines (RSMs) with ABDs. But let's push on this a bit. So far, we were treating timestamps as ballots within the same instance. What if we treat the timestamps in ABD as slots in multiple instances of accepting values? By using "timestamp = counter + leaderID", we can implement total order on slots and have linearizability and strong consistent reads with multiple clients.

Can we then implement RSM over ABD participant nodes using these slot numbers? No! Because ABD skips past some slot numbers as unresolved since it is always eager to move ahead in a hedonistic manner. ABD goes with the highest timestamp of majority read, and it is not possible to go back to earlier slots and resolve them in case of ambiguity. In ABD, the nodes accept independently, and there is no commit/resolution phase, and the logs in the nodes diverge. We can't make a resolution about a slot's outcome even in God-view mode, where we can look at the values in a majority of the nodes (not all nodes, because up to a minority of nodes may be unavailable per fault-model). Let's say we see a value at node A, and no value at the other nodes constituting majority for this slot. The ambiguity that remains is as follows. Maybe node A was part of the majority that had this value and the other nodes are not reachable now. Or maybe A was the only node that had received this value. We cannot determine the difference. If we go with the first possibility, it is possible that, another God-view to a different majority may find that indeed the opposite was the case.

In contrast,  Paxos has a commit phase that marks that the value for that slot is resolved and finalized. Any commit (even read from one node's committed value) is a valid commit because the leader has observed that majority has accepted/stored it. So it is guaranteed that other nodes will also know (or learn) that commit. So Paxos relearns and does not leave any gap in the slot numbers while committing, because those slots numbers get executed as they are committed.

As the closing word on ABD, we should note that ABD is still useful for storage and linearizability, it solves the atomic storage problem. Here comes the difference between stateless operations (register operations put and get) versus stateful operations (commands in general that mutate state, which by definition depends on the state they are invoked/executed). For storage, we don't need stateful operations. Using ABD we achieve linearizability, and can serve strong-consistency reads via using ABD even with multiple clients.

Does chain replication solve consensus?



I had written up a description of the chain replication protocol in a 2011 post. Chain replication employs a Paxos-backed configuration box that maintains the configuration/topology of the chain nodes, and the chain nodes just replicate the values in a streamlined fashion. The beauty here is that Paxos is kept out of the data path, so it is not involved with any replication request. Paxos is employed in the control path, and is consulted only when a fault happens.

Does chain replication solve consensus? I haven't seen this question addressed in previous work neither in the original chain replication work, nor in any of the followup work. The answer is, no, chain replication does not solve the consensus problem! This is a trickier point to appreciate than the ABD case.

Chain replication does not violate agreement/safety property: for a given instance, no two nodes will have different commits because they copy the head of the chain. But chain replication will violate progress for the consensus instance in that slot if the chain topology changes. Let's say only the head and another node committed a value and they died or get disconnected, and as a result the chain topology is reconfigured by the config-box. No other node can commit another value for that instance because the epoch-number has changed with the configuration decision from the config-box. This is both good news and bad news. Safety is not violated but we lost progress/termination for that slot: the remaining nodes are not able to resurrect and resolve this particular consensus instance to termination. So although chain replication solves consensus in the absence of failures, in the presence of failures it deserts the consensus instance without culminating it to resolution and moves on. After the config-box appoints a new chain topology, the progress and safety are both satisfied for the next consensus instance (with the incremented epoch number).

To recap, chain replication gets things resolved/finalized and keeps the same log in the absence of faults, but in the presence of faults, the logs in participants may diverge. Consider a node that accepts a value, and then due to failure and chain reconfiguration it has been pushed out of the chain. How does that node learn whether what it has accepted before it crushed is skipped over or finalized? There is no commit in chain replication (of course the ack-backpropagation in the CRAQ optimization may work as commit)... Even with the plain chain replication, we can argue that, that node is now an incorrect node as marked by the config-box, so we don't care about its consistency. And if that node joins the chain again, it will join as tail, learn the same log as the other nodes. From that perspective, and by seeding off of the Paxos-backed config-box, we can argue that RSM can be implemented over chain replication.

Acknowledgment

The way to understand these things is by sparring with colleagues. I am grateful for Ailidani Ailijiang and Aleksey Charapko for the discussion. It is not easy to reason about distributed systems --but is certainly rewarding after the fact. It took us two or three animated discussion sessions over coffee to get to the bottom of this.

Tuesday, June 4, 2019

Book review. Loonshots: How to nurture the crazy ideas that win wars, cure diseases, and transform industries

This book, by Safi Bahcall, is about how to nurture radical breakthroughs in science and technology.

The book draws inspiration from the innovations Vannevar Bush made possible Office of Scientific Research and Development (OSRD), created in 1941, and the innovations Theodore N. Vail enabled at Bell.

OSRD's portfolio of accomplishments is impressive indeed. The war against Nazis is won through superiority in the field of science. The bombers' microwave radar cut through darkness and fog to detect German U-Boats, and rendered them ineffective in a matter of weeks.

The book compiles insights from the organizational principles Bush and Vail employed as Bush-Vail rules. The main concept here is of a dynamic equilibrium, where the organization maintains well-separated and equally strong loonshot and franchise groups (phase separation) continuously exchanging projects and ideas in both directions.

Summary of the The Bush-Vail rules

1. Separate the phases
  • separate your artists and soldiers
  • tailor the tools to the phase
  • watch your blind side: nurture both types of loonshots
2. Create dynamic equilibrium
  • love your artists and soldiers equally
  • manage the transfer, not the technology: be a gardener, not a Moses
  • appoint and train project champions to bridge the divide

3. Spread a system mindset
  • keep asking why the organization made the choices it did
  • keep asking how the decision-making process can be improved
  • identify teams with outcome mindset and help them adopt system mindset

4. Raise the magic number (Dunbar's number 150)
  • reduce return-on-politics
  • use soft equity (nonfinancial rewards)
  • increase project-skill fit
  • fix the middle (reduce perverse incentives for middle managers)
  • bring a gun to knife fight (engage a chief incentives officer)
  • fine-tune the spans (wide for loonshots groups; narrow for franchise groups)



Other examples in the book include: Peniciline citrium by Akira Endo, cancer drugs by Judah-Falkman, and Pan-Am's story. All of these were very engaging stories and I didn't know any of these before. One of my favorite quotes in the book is: "It is not a good drug unless it's been killed by three times."

Toward the end, the book talks about the Joseph Needham question: "Why didn't the Scientific Revolution take place in China (or India or Ottoman Empire), despite all its advantages?"

The book attributes the emergence of the scientific method in Europe to the ripe loonshot conditions in Europe.

  1. phase separation: separate loonshot and franchise groups
  2. dynamic equilibrium: seamless exchange between the two groups
  3. critical mass: a loonshot group large enough to ignite


MAD questions


1. What are the new things I learned from this book?
My 20 years in academic circles instilled in me the impression that you cannot manage innovation and research, instead you can only hope to cultivate it. My informal Twitter poll returned the following result. (I don't know of the ratio of the academic versus industrial people that voted on this.)
The book doesn't take an explicit position on my question above, but as the title "Bush-Vail rules" suggests, it tries to formulate rules for nurturing the loonshot/innovation process. But what good are these rules? I am certain that they are not sufficient for producing a successful loonshot. I am not sure if they are even necessary. But I agree that they would help increase your chances of success. And I also agree that they are more concrete than just suggesting "form strong teams and get out of their way." The question is how much more concrete advice is this from that bottomline?

In comparison, the book I read last month, "Creativity, Inc.: Overcoming the Unseen Forces That Stand in the Way of True Inspiration" focused on a much narrower domain, that of the loonshots accomplished within Pixar, but delivered more concrete advice for managing the creative process.

Lest you think I didn't like this book, I did enjoy the Loonshots book a lot and recommend it to anyone interested in building organizations that nurture creative work.

2. On a micro scale, does this explain the draft and revise principle in writing?
Drafting is the artist side. Revising is the soldier side. You can't have good writing unless you love both sides equally, and unless both sides interact with each other in a dynamic equilibrium. At some point, a phase transition occurs and you get to the correct narrative for your writing.

As Hemingway said: "The first draft of anything is shit."

Two-phase commit and beyond

In this post, we model and explore the two-phase commit protocol using TLA+. The two-phase commit protocol is practical and is used in man...