Eventual Consistency


A database in its most abstract form is a list of records—a ledger—and from the perspective of the client, it does not matter if the ledger is a paper book or an array of servers in a warehouse, though the latter is more usual. However, from the perspective of the database, each server must be viewed as an individual entity. To write an entry into the ledger is not so simple, because a hard disk may fail at any time. To guard against this possibility, the database makes use of redundancy. Writing one record to the database could mean transmitting a single new entry across the network many times, creating multiple copies, one on each server. Transmissions are, regrettably, unreliable, and to guarantee data parity between all servers, it may be necessary to send the same message over and over, waiting after each transmission for a confirmation that may not arrive.

This type of “Byzantine” coordination can be very slow, and a common strategy for mitigating this is called a “gossip protocol,” in which each server in the array periodically shares its most up to date records with a subset of its peers. Under this system, one server may fall out of sync with the pack, but in time, all nodes will achieve a consensus. When a distributed ledger is guaranteed to converge into singularity over time, we call it eventual consistency. My motivation for explaining this kind of technical design will soon become apparent.

As I look for a way to interpret the things I have seen, I try to find some kind of narrative, some taboo that my friend must have transgressed, which would make his fate a deserved punishment, but real life rarely has such concinnity. It would be comforting to think it was because of a devil’s deal that he made with some crone of a fortune teller in his remote and rural hometown in Bulgaria, or that he may have acquired a token of some ancient cursed man who came to a similar end, a slender leatherbound diary perhaps, or more romantically, a dagger that had been used in an act of betrayal in some unsavory dispute, now lost to the centuries.

But as I have tried to uncover some trace of Aleksei’s past that could justify his ultimate fortunes, I find nothing; nothing at all to make sense of his final days, from the last time we spoke in a coffee bar in Palo Alto in the warmth of a balmy silicon morning, to his graphomaniacal scribblings on every whiteboard in our office space three days later, to his sudden disappearance from a crowded cafeteria, in the mercurial glow of phosphorescent office tube lights.

We may start from his drawings, which I was able to photograph, I believe in their entirety, the day of his disappearance. At first it seemed to me that he had only repeated the same pattern over and over, but closer inspection revealed subtle variations: there are four distinct configurations, which I will call by the the different colors in which they were consistently rendered: blue, green, red, and black. Although the exact contours of each maze differed, the attribute that varied from color to color was the number of exits; the blue mazes were porous, having a multiplicity of openings along their exterior walls. The green ones had two openings, suggesting a definite direction, an entrance and an exit. The red ones had a single opening, a way in but no way out, a dead end. Worst of all were the black labyrinthes, which were perfect closures, impermeable to the outside, inescapable from within.

What impetus or derangement could drive a man to undertake such a pointless task? A Fermi estimation of our whiteboard area yields an approximate square area of 3ft x 2ft x 100 half-height cubicles + 6ft x 4ft x 2 walls x 12 offices + 10ft x 4ft x 2 walls x 5 conference rooms, plus a few odd partitions, totaling over 1600 square feet of whiteboards, all of which were saturated with drawings of labyrinthes, in a twisted parody of the flowcharts and UML diagrams that ordinarily cover our walls. 

These things are not so different, in fact: a labyrinthe resembles a software architectural diagram. Perhaps every program, like every mathematical relation, like every number and ratio and equation, is a platonic form that transcends matter and time, and our code is only ever an imperfect reflection, a perversion of a noble ideal. The inscrutable passages of the labyrinthe have always been regarded as pathways to the sacred or the divine. The gothic cathedrals in Chartres, Reims, and Amiens all contained symbolic labyrinthes rendered in the pavement of their floors, and these labyrinthes were intended as an allusion to the Holy City; pilgrims to these cathedrals would kneel on the ground and trace the path of the labyrinthe while praying. This devotional was known as the path to Jerusalem.

In book II of Histories, Herodotus describes the Egyptian labyrinthe in the sacred City of Crocodiles, finding it inconceivable that such an intricate and spectacular structure could have been built by mortal hands. I am struck by a similar sense of holy terror when I look at Aleksei’s labyrinthes, especially the black ones, and I cannot help but reflect on what sacred mazes and holy books both have in common: that they are composed of passages; that they are designed to capture us; and that we become lost in a labyrinthe almost as readily as we are lost in a book.

I was Aleksei’s work mentor, and he had many youthful stories to tell; in his previous job he had worked remotely, and on the weekends he had traveled the world, making his way through Latin America, from Paraguay, to Peru, to Colombia, Argentina, and Brazil. He traveled as far as the Falkland islands, but he never told his team, letting them believe he was only in a satellite office in Southern California. I can’t imagine they didn’t know, but some things are probably better left unsaid, for everyone.

On Aleksei’s first day at the company, he was issued a corporate email and temporary password, as is standard in any tech startup onboarding process. But the first time he tried to authenticate with our network, the system recognized him as another employee who had been with us for years. And although this issue was easily remedied, it presented a security risk that compelled us to do a deep dive to find the root cause of the issue. This responsibility fell to me, and impossibly, I found the cause to be a duplicate UUID in our user database. To the layman, this may not seem shocking.

The version four UUID (Universal Unique Identifier) contains 122 randomly generated bits, and if they are supplied by a cryptographically strong source of randomness, the odds of a duplicate are 1 in 5.3 * 10^36, an unfathomably large number, effectively infinite to anyone bound to the earth. One is tempted to blame the random number generator in this case, or some kind of faulty cache, or an initialization error; but these IDs were generated years apart, on different hardware, by different libraries—no, such a thing cannot be explained merely as a software defect.

I am not a superstitious man, and it may be hard to attribute any significance to what is literally an artifact of a random number generator, but in the face of such an astronomically improbable event, one cannot help but wonder what machinations lie behind that face.

In retrospect I have come to think of this incident as a portent, as if Aleksei himself were some kind of glitch. It is too fanciful to suggest that his disappearance was merely an occasion of onotological convergence, erroneous data correcting itself, as in a gossip protocol. But despite his colorful history, this is too far, no matter how one wishes to locate some trigger that could explain this mystery. Unexplained disappearances are more common than you might think, and if we exclude those cases where the missing person obviously did not wish to be found, we still find hundreds of cases each year, in the US alone. 

A common scenario is the disappearance of a hiker or outdoorsman as he travels through some forest or national park. The obvious explanation in these cases is a simple accident, such as, for example, a tumble down a steep hill. More exotic theories may cleave towards networks of unmapped underground caves, or even faeries or alien abductions, which in some cosmologies are thought to be one and the same. I am not in such a hurry to rule out supernatural explanations, because I think that folk theories often capture some correct observation of the world, and they merely lack the rigor, or the will, to align those findings with genuine knowledge.

In this case we have an impossible observation, so we must consider, at least, improbable explanations. In addition to the fact of Aleksei’s disappearance, a parsimonious theory should be able to account for his drawing. Hypergraphia is a kind of mania, often seen in cases of schizophrenia, and it may manifest as a compulsion to write the same words over and over again. Some of the afflicted may write incoherent nonsense, starting along the outermost perimeter of a page, and working their way to the interior in a spiral pattern. Still others may feel a desire to record every minute detail of their lives, from moment to moment, as if they were afraid of leaving a single breath unaccounted for. 

It is more common to write words, but maniacal drawing is also an indication, and in truth there were some written annotations to Aleksei’s drawings, in a language that resembled Arabic, and which neither I, nor my phone, nor my colleague Jahan, could decipher. 

Regardless, pivoting off the notion that a labyrinthe is—at least allegorically—a kind of a book, we can proceed by interrogating some famous instances of spontaneous bibliogenesis. If we consider the paradigm case of holy writ, letters and books which are considered to be one and the same substance of God, as the author of the Gospel of John maintains, we might consider the oddity of Hayy ibn Yaqzan, whose name meant  “Alive, son of Aware” and whose true story is recounted in the 12th century historian Abujaafar Ibn Tufayl’s Philosophus Autodidactus. As all Muslims know, the Koran was revealed to the prophet Muhammad in the 7th century by the angel Gabriel, but this case is less remarkable than the story of Hayy, who was himself born “spontaneously” into the uninhabited wilderness. (And this is also relevant to us, for here we have a case of a mysterious appearance, a natural complement to a mysterious vanishment).

Hayy grew up amid the animals and the merciless desert, where he observed nature closely, and of his own accord he came to have faith in the unmoved mover. Later in life he traveled as far as Nishapur, and upon meeting some Muslims he realized that he had discovered Islam all on his own, and that the hadiths and the verses of the Koran were already on his lips and in his heart. Even if we put aside the specific theological claims of Islam, what is salient in this story for our purposes is that we have a book which came into being in different times and in different places, through the minds of different men, neither of whom could have had prior knowledge of its words.


Stranger and more intriguing still is the story of Coleridge, who claimed to have written his poem Kublai Khan after hearing it in a dream. At the time, he reported that he was reading a book by Purchas, a writer in the seventeen century, which contains a short passage about the Emperor named Kublai Khan. The passage has been found and is quite short; it says that the emperor ordered trees to be cut down in a forested area through which a river ran, and there he constructed a palace or a hunting pavilion, and he built a high wall around it.

This is what Coleridge read. Thereafter he had a dream; in which he saw the construction of the Chinese emperor’s palace, and he heard music, and he knew—the way we know things in dreams, intuitively, inexplicably—that the music was building the palace. More specifically, the music was the architect of the palace—one recalls a tradition that the city of Thebes was built by a song—and as Coleridge watched the construction of the palace and listened to the music, he also heard a voice that recited the poem. When he awoke, he still remembered the poem, and he wrote it down just as he had heard it. But before he could complete his work, he was interrupted by a visitor, and when he was finally able to return to writing, the words had left him.

Coleridge died in 1834, and twenty years after his death, the works of the Persian historian Rashid-al-Din Hamadani were translated into English, which said that Kublai Khan built a palace that the centuries would destroy, and that the plans for it were revealed to him in a dream. Coleridge, of course, could not possibly have read this book. 

Alfred Whitehead wrote that time continually brings lucre to eternal things, and here we have a story of a palace that wants to exist not only in eternity but also in time. Through dreams, it reveals itself to a Chinese medieval emperor and then, centuries later, to an English poet at the end of the eighteenth century, but notice that it takes different forms: a song, a poem, and most relevant to us: an architecture. In Coleridge’s poem he even describes a second dream, which might have been emperor Kublai Khan’s dream, in which he hears an Abyssinian maiden singing, and he knows that if he could remember her song, he could also rebuild his palace. 

I have related these stories because they illustrate the case of an artifact that enters into the world from the outside, taking different forms at different times, infiltrating the minds of men as by subterfuge. I will now expound a third and more chilling example, which I believe may be most relevant to the incident that concerns us here. 

A man whose real name has been lost to us, but it may have been Abdullah Zahr-ad-Dihn, was born in Sana’a in Yemen in the eighth century of the Christian era (that century was, for him, the second of the Hegira). In a dispute over a woman, he murdered his best friend, and fearing retribution, fled to the coast and booked passage on a ship bound for Persia. The ship was commissioned by a wealthy businessman of Isfahan, and according to ‘Deaths of Eminent Men and the Sons of the Epoch.’ by Ibn Khallikan, he sailed with the men of that ship for six years, at times traveling overland, and pursuing trade in such diverse locations as Shiraz, Surat, Agra, Patna, in the depths of Nepal, in Katmandu, and in Lhasa.

At some point on his journey, he encountered something horrifying on the open ocean, which ibn Khallikan does not specify, and he disembarked for good, having become irrecoverably fearful of the sea. He made his way to the desert of inner Arabia where he lived for ten years in solitude, and became indifferent to the practices of Islam. Thereafter his story is more well-known; when he emerged from the desert, he called himself by a new name, which has been misrendered as Abdul Alhazred. This is believed to be a perversion by European scholars in the thirteenth or fourteenth century. “Abdul Alhazred” is not a grammatically or theophorically correct Islamic name; the “al” in Alhazred is redundant to the name Abdul, and Hazred or Hazrad is not among the 99 names of God. A passage in Alfarabi explains the etymology of his true name; Abul Hazrad is derived from zarada, to devour.

What possessed Abdullah Zahr-ad-Dihn to become “the servant of the devourer?” We may consider that the Rûb-al-Khâlie or “empty space” of the Arabian desert is held to be inhabited by the Jnun, the female Djinn, who are spirits of madness and death. In Farsi, the word Jnun also means delirium, maddening love, or especially: terminal madness resulting from the love of a woman. Despite this, Jnun is not compatible with the western definition of madness. A perfect translation eludes us, but its hallmarks are possession, love, and limitless openness to the outside.

When he emerged from the desert, he transcribed the cacophonous droning of the sands into a blasphemous and impious text he called Kitab Al Azif, a term that refers to the nocturnal sounds of insects, and which connotes the screeching and howling of demons. Later, Theodorus Philetas of Constantinople would secretly translate the Azif into Greek under the title Necronomicon, that infamous collection of forbidden histories, dark signs, and unspeakable rituals. 

Like Zarathustra climbing down the mountain, Abdul Hazrad took his message to the people of Damascus. He told them he had seen forbidden Irem, the City of Pillars, and that he had found, under the ruins of some forgotten, nameless city, a history and a record of a great ancient race that came to earth from beyond the stars in the aeons when earth was only a lifeless rock. One can easily imagine this crazed man of the desert, howling in the marketplace, resembling nothing so much as the demons he claimed to have seen. But then, in a crowded bazaar, in the unrelenting light of the Arabian sun, he was devoured by invisible monsters amidst a crowd of fright-frozen witnesses.


The similarities between Aleksei and Abdul Hazrad—their early travels, their sudden prodigious written output, and their strange disappearances—are purely coincidental and circumstantial; nevertheless we cannot resist speculations of a metaphysical nature. In the Necronomicon, Abdul professed the Platonic and Pythagorean doctrine of the soul’s passage through many bodies; centuries later, his own soul could have been reincarnated to trace once again his grim trajectory. Nietzsche famously believed in eternal recurrence, the idea that the universe repeats the same patterns and structures endlessly, and that we should strive to live each moment in a way that is worthy of such a repetition. A more mundane, and more unsettling possibility, is that we are the chance recipients of messages intended for other audiences entirely, messages that echo through space to ensure consistency across incomprehensible distances.

And perhaps all great works enter into the world from the vast outside. Sometimes, they are whispered to us by voices that are benevolent, or merely alien. But when I look back at the photos of Aleksei’s labyrinthes from that day, I shudder to think of what hideous minds dwell just beyond the boundaries of rationality and perception, and what horrible things they would tell us, if we had the misfortune to hear them.

Copyright 2019 Zero HP Lovecraft

Permission is hereby granted, free of charge, to any person obtaining a copy of this text (the “Work”), to deal in the Work without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Work, and to permit persons to whom the Work is furnished to do so.

Find me on Twitter, @0x49fa98

7 Replies to “Eventual Consistency”

  1. I liked this reading. Quite short compared to GE or GSH, but still very interesting.
    The paragraph about Kubla Khan is from Borges, right?
    As writer I really envy your capacity of “connecting the dots” of various pieces of science/culture/literature.
    For example I read Abujaafar Ibn Tufayl text (at least, some chapters) but I didn’t ever have the same idea of connecting it with other cases of “structures” coming from dream/mind. Good catch.
    How do you do? How are you so good?


    1. The bit about Kublai Khan is indeed an adaptation of a bit from Borges.

      In the original story of Ibn Tufayl, he does not actually know the Koran, and he actually is disgusted by Muslims, because he believes that they worship the word of God more than God himself, so I took some creative license here.

      I was mostly inspired for this one by another story from Borges, The Enigma of Edward Fitzgerald.


  2. This was a lovely discovery. I particularly enjoy the mixture of programming “trivia” to give the cosmic nature of the story more weight. Fine work, sir. Also, your twitter is money.

    Liked by 1 person

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: