Friday, November 27, 2020

The devil inside (October 2018)

He hides in plain sight

Always around, always to fight

Only in sleep we get respite

The devil inside


Day or night he tries

Always around, always inspite

Of good intentions and mind

The devil inside


A long feared call despite

Always caring, always tried

If only we could keep

The devil inside


Innocent child of mine

Always daring, always bright

Angry and frustrated, we fight

The devil inside

Wednesday, October 28, 2020

Freedom to love

In my darkest hour

Can't stop hurting, sour

Vicious thoughts in mind - she's there


Been here once before

Hold off while I'm sore

As I close my door - she's there


She - rock in my stream

She - fury unseen

She - I am left without excuses

Must be love


Somehow I can't fight

How she's always right

Hate how this turns out - she's there


What if I could flee

Make a bargain plea

End up in between - she's there


She - mate of my soul

She - out of control

She - I am left without excuses

Crazy love


Empty room without her

No point going on

Am about to quit - she's there


Guess I have no choice

Give in to the voice

Look inside my heart - she's there


She - beauty with smarts

She - guilty as charged

She - I am left without excuses

Free to love


=========
Freedom to Love is about the transformation from a free soul to a married man. A (hard) rock song taking us through the roller-coaster of emotions from anger/rage to denial and despair, through a deep ravine of depression and existential doubt, finally coming home to acceptance, embracing a state of contentment and openness, peaceful and relaxed: free to love. Inspired by a podcast from Brene Brown about a book on Burnout

Saturday, October 24, 2020

Eco-system-as-a-company: Tesla earnings call

Elon Musk and his team of experts (CFO Zachary Kirkhorn and Martin Viecha, director of investor relations among others) shared some comments during Tesla's latest earnings call.

Notice how he makes sure that various global powers - his stakeholders - all have big cities (skin) in the game: Berlin (EU), Shanghai (China), Austin (US). Factories compete for producing a given model or product, just like nations competed to be the site for Tesla's factory - in a recursive survival-of-the-fittest play of global proportions.

A company - an organization of people - is like a factory. Each person is like one of those 10.000 parts or processes mentioned, with an S-curve describing their individual mental transition from the "old" way of working to the "new" way. Elon implicitly makes this link when he goes from "10.000 parts" to "tens of thousands of Tesla employees"

Elon proactively manages investor expectations regarding timelines ("12-24 months"), buying his teams time to deliver with quality. "We continue to grow as fast as we can while focusing on cost control and improving quality" - of the products and processes, but also of the people working for Tesla.

When Elon is done, he suggests to "move on to questions". His teammate gently reminds him that the CFO would also like to say a few words. This little exchange illustrates why running an eco-system or a company is teamwork - one person simply cannot have all the skills and insights required to manage/balance everything.

The CFO reinforces the locality messaging, tying investments to cities. Tesla is in-sourcing battery cell production in select factories.



Wednesday, October 21, 2020

More or less stateful-less consistent hashing

I have always been intrigued by the concept of hashing, and I spent quite some time and effort researching it:

Consistent hashing is a known technique for implementing distributed storage systems, in a way that avoids redistribution of stored items in case of changes. Companies like Akamai have deployed these ideas with great success.

Contemporary open source implementations like HAProxy use consistent hashing as a core feature. However, these implementations tend to be stateful: The application maintains an in-memory mapping of hash keys to buckets (representing servers, etc.). Even minimal implementations as suggested here still maintain some form of state.

The problem with maintaining state, is that it has a tendency to become stale. In a distributed system, when multiple nodes maintain state, there is a non-zero probability that the value maintained by one node does not match one or more others, for a given period of time. A second problem with in-memory state, is that it gets lost upon reboot (or restart of a Docker container).

To implement a more stateless consistent hashing scheme, consider the following:

  • A set of service endpoints is represented as a bit mask - say 64 bits on modern x86 CPUs
  • Endpoints that are online are '1', offline are '0'
  • An incoming IP packet is hashed to a 64-bit key using a hash function h(ip_hdr)
  • One of the online endpoints is selected based on a series of pairwise comparisons between endpoints, with ties (both online) resolved using a bit from the hash value
In logic terms, the outputs of the first circuit can be defined as follows:
s1' = s1 and (not s2 or hash[0])
s2' = s2 and (not s1 or not hash[0])

In a programming language, this function could start something like this:

function select_server( ulong64 hash, ulong64 active ) {
   const unsigned long m0x55 = 0x5555555555555555UL;
   const unsigned long m0xaa = 0xaaaaaaaaaaaaaaaaUL;

   // For 64 bits: Do 6 rounds (2^6=64), using the hash input to     
   // resolve ties
   // A->B B->A
   unsigned long others = ((active&m0x55)<<1) | ((active&m0xaa)>>1);
   unsigned long h = (hash&m0xaa); // ....3-1-
   h |= h>>1; // ....3311
   h ^= m0x55; // ....3^1^
   active &= ~others | h;

   ... more rounds ...
}

Sunday, October 18, 2020

Value network modeling

 

The concepts illustrated above can be used to model a wide variety of things in life, both physical and digital. Examples include:

  • A CPU processing instructions and moving data from/to registers
  • A network forwarding packets between compute nodes from/to memory or disk
  • An energy grid transporting power from producers to consumers, transforming between energy forms along the way
  • A team of people producing a deliverable
  • An eco-system of companies exchanging value and tangible products
  • A blogger writing an article and posting it on the Internet for others to read
  • A human being eating a burger, processing the food and producing output

    A process is a repetitive, predictable sequence of events (cycle) that takes certain inputs and produces certain outputs. Transport takes these inputs/outputs to another physical location (space), and storage exists to bridge the difference between the moment items are produced, and the moment (time) they are consumed. Abstraction adds a 3rd structural dimension, to summarize a set of underlying processes, transport and storage elements as a higher level process with inputs and outputs.

    These mental constructs can help us to understand and communicate about what we perceive, and how things are related. It can model a desired goal or outcome, and specifies the constraints and parameters that can be changed/influenced or optimized to achieve a more harmonious system.

    Constraint model

    The model is constrained by the cycle time of input processes, and the limited capacity of transport connections and storage facilities. In some cases, this cycle time can be regulated ( e.g. reduce a temperature to slow down a chemical reaction, close a valve to reduce the flow of oil ). In other cases, the cycle time is given (e.g. earth revolves around the sun in a year) and items (sunlight) produced are "lost" (from the perspective of the model) in case of insufficient transport or storage capacity.

    Lean six sigma and over-production

    Lean six sigma is a process optimization methodology which focuses on just-in-time manufacturing and avoidance of waste. In some cases, the storage of items produced implies waste - and there is risk and cost associated with that. For example, if energy demand is low and oil needs to be stored in tanks before being converted into electricity.

    Concerns are different for physical flows like oil, electricity or money, versus digital/virtual items like data - the latter can be copied electronically.

    Digital circuits and organizational designs

    Most digital circuits are synchronous, meaning there is a central clock signal that is transported as an input to various sub-circuits. The logic path with the longest propagation delay - the critical path - determines the maximum achievable clock frequency. Compared to asynchronous circuits, synchronous circuits are considered easier to design. Asynchronous circuits are more energy efficient and faster, as no time is wasted waiting idly for the end of the current cycle. They are also less predictable - differences in processing time for different inputs are visible in the timing of the outputs, unlike synchronous circuits where the clock "hides" such differences.

    In organizational designs, synchronous circuits correspond to a top-down hierarchical structure in which instructions are given by senior management or a central team; employees then execute these instructions. In contrast, flat organizations with autonomous teams operate more like asynchronous circuits: faster and more efficient, but less predictable/stable and more difficult to implement correctly.

    Human synchronous circuits

    In a way, humans working in a particular time zone are synchronized by the sun and their daily circadian rhythm. At a global level, similar patterns can be observed.


    Wednesday, October 14, 2020

    R for Raccoon - wildlife lessons

    Some months ago we had a problem with local wildlife: A raccoon came into our attic and destroyed the ducts from our air conditioning system. Together with an opossum - which we suspect to have taken our one and only tomato this year - this triggered us to install a Blink indoor/outdoor camera system.

    To our surprise, the first animal we caught was a skunk. It was looking fluffy and quite cute, but we didn't want to risk any pets bringing bad smells into our house so we arranged for safe transport to an alternative location. Then a couple of nights later we caught an opossum, and a young raccoon, and another skunk, and another opossum...and then this:


    By this time, we had to start naming them in order to keep track of things. The most recent ones were called R[redacted] and S[redacted], after some people we know.

    The trap you see in the video works fine for smaller animals, but adult raccoons are too strong and too smart for it - we learned this the hard way, as evidenced by a wrecked cage. After a motion alert from the camera we'd only have about 5 minutes until the raccoon would break free. Finally, we decided to stop baiting the trap, and now we have Thomas the raccoon and Umberto the opossum visiting us every so often.

    At the end of the day, we did not really change the situation. We still have raccoons and opossums around our house, and one day they may still get into the attic and wreak havoc, or eat our veggies. But now that we know who'd do it, we see that as a small price to pay for the family entertainment and joy Thomas and Umberto bring us every day.

    Some problems and opportunities are a matter of perspective - you may not be able to change them, but you can change how you think about them

    [ Disclaimer: Any semblance between animals and colleagues or other people in my life is purely coincidental. No wildlife was harmed in this process, to date ]

    Serendipitous entanglement


    Connections in time

    Our world is made of connections - intricate and subtle relations between things, organisms, even ideas. As time progresses, these constellations evolve - new connections are made, old ones are lost or forgotten. At times these relationships and events may seem random or arbitrary, at least from the perspective of an individual human being caught up in the maelstrom. But are they?

    Time is "universal" in the sense that our notion of time is based on the recurring movements of various objects in our universe: The earth revolves around its axis in a day, the moon goes through its phases every month, and the two of them circle the sun in a year. On our planet, these cycles give rise to phenomena like tides in the ocean (high/low tide every 6.2 hours) and seasons (every 3 months, more or less articulated depending on where you live).


    Trading time

    In his TED talk from 2010 Matt Ridley gives an example of early human trade based on work by David Ricardo: Adam takes 4 hours to make a spear, and 3 hours to make an axe. Oz only takes 1 hour to make a spear, and 2 hours to make an axe. So Oz is better at both tasks - but if Oz concentrates on making 2 spears (2 hours) and Adam makes 2 axes (6 hours), and then they trade - they will each have saved a precious hour of time. And the more they do this, the more they specialize, the better each becomes at their respective tasks; their products become more sophisticated, and their mutual time savings multiply.

    Atomic connections

    covalent bond, also called a molecular bond, is a chemical bond that involves the sharing of electron pairs between atoms. These electron pairs are known as shared pairs or bonding pairs, and the stable balance of attractive and repulsive forces between atoms, when they share electrons, is known as covalent bonding.

    While depicted here as a static connection with 2 dots, each covalent bond is actually a pair of electrons in a molecular orbital, each with anti-parallel spins. In its most stable configuration with the lowest energy, the electron density (probability) is highest between the two nuclei.

    When a hydrogen ("water-former" in Greek) molecule is illuminated by ultra-violet light, there is a chance that one of its electrons gets knocked into a higher energy anti-bonding orbit - and the atoms part ways.

    Photosynthesis: When light, water and energy connect


    Plants use the energy from sunlight to convert water and carbon dioxide into oxygen and carbohydrates. This photosynthesis cycle is fundamental to sustaining life on our planet. Depending on the season ( temperature, amount/angle of sunlight ) and the availability of resources (concentration of CO2, hydration), this intricate chemical process uses catalysts to produce outputs that form resources for humans and other animals.



    The spectrum of light that biological organisms can see/adsorb overlaps with the visible range for humans. High energy, short UV wavelengths tend to destroy or damage the cells that adsorb them - so most instances of plants that were unfortunate enough to do so, have been eliminated through natural selection. Similarly, low energy infra-red waves are too long to be efficiently adsorbed.

    To explain why we perceive most plants and grasses as "green", consider the absorption peaks around blue (left) and red (right) - this leaves the more green/yellow spectrum of visible sunlight (400-700nm) to be reflected.





    Cycles of life: Breathing, hydration, eating and our metabolism

    The process of breathing (respiration) is divided into two distinct phases, inspiration (inhalation) and expiration (exhalation). In each cycle, oxygen and other gasses are taken from the environment to fuel our metabolism process, and the output (burnt carbon) is produced in the form of CO2.

    A second fundamental process of life is our hydration cycle. Like breathing, we take in water through our mouth, either in its pure form or indirectly as part of a mixture. Unlike breathing, hydration does not happen automatically - we need to make an active choice to drink, and locate a suitable (drinkable) source. The Food and Nutrition Board generally recommends a daily intake of 91 ounces (2.7 liters) of water for women, and 125 ounces (3.7 liters) for men. 

    Oxygen, water and food are our main resources, as inputs to our metabolism. We get hydrocarbons - directly, or indirectly through meat - and oxygen from plants, and produce CO2 in return. Various cycles inside our body convert these inputs to biological energy. Where plants consume water by converting it into oxygen and hydrocarbons, we humans merely use water in our internal processes, and then dispose of it along with our organic waste.

    Eating is the action of taking solid foods in the mouth in order to nourish oneself: this action is carried out by insertion [of the foodstuff] in the mouth, followed by mastication, swallowing, and digestion. This is followed by absorption, the process through which nutrients are passed through into the blood stream; and by excretion, through which indigestible and unabsorbable products from food are eliminated. Plants and other organisms then use some of this produce as nutrients, and the cycle continues.

    Our body cycles through a daily circadian rhythm; the moment of eating or drinking relative to this cycle affects how much energy is extracted from our food intake (part of which is stored for later use).


    All else being equal, we can expect to play our best computer or tennis games around 2pm-5pm in the afternoon. In conjunction with this daily cycle, our heart beats 60-180 times a second to pump blood around, carrying the oxygen from the lungs to the cells that need it.

    Human explanations of recurring natural cycles

    Like all species, Cicadas are born in cycles. Some "periodic" species emerge as nymphs every <prime> number of years, at the beginning of summer to play out their short but noisy lives. One theory explains this pattern in terms of competing for resources: By hatching in different prime number intervals, different Cicada groups would only compete for resources very rarely. More recently, the coincidental cycles of potential predators were considered: If the predators (birds, Cicada wasps, praying mantis, etc.) in the neighborhood have a reproductive cycle of every 2 or 4 years, they cannot reliably prey on periodic Cicadas. Moreover, by hatching altogether in large numbers, the survival chances of individual creatures increase - an example of a cooperative defense mechanism as described by the Allee effect. Other theories are related to surviving cold spells during the Ice age period. The Cicada life cycle affects other organisms; for example, tree growth and mole populations in adjacent years of emerging are affected.

    Some plants have a particular branching structure and a fixed number of petals for their flowers. This structure can be explained in terms of Fibonacci sequences, for example Sneezewort (Achillea ptarmica, named after the Greek hero Achilles; its sharply aromatic leaves may induce sneezing in people susceptible to such stimulus).

    As short-lived, limited human observers we may never truly know what processes or forces contributed to the way things are today, and there can be multiple valid theories - as those mechanisms may have changed along the way. However, we clearly have empiric evidence that illustrates how cycles of seemingly independent processes combine to produce change, driving evolution.

    Serendipitous entanglement

    We are shaped and affected by the forces and mechanisms that exist in our world today. From man-made constructs like market economies and social media to universal objects like stars and planets, all influence our daily lives in more or less subtle ways, many of which we are not even aware of.

    Evolution and growth happens through many seemingly unrelated events and connections, at various levels and time scales. We may not always know how or why, but we are fundamentally connected - and a chance meeting at the right time and place could change the world. So let us connect, to share and exchange ideas, to explore how we could all grow, learn and prosper - as humble humans spending time together.

    Friday, October 2, 2020

    Closer to open: The evolution to 5G

     5G - a number and a letter that represent the next stopover on our collective journey into the future of telecommunications and networking. One way or another, we will all get there, one day. But what can we do differently in the mean time, starting today, in order to position ourselves and enable our customers to take full advantage of everything that 5G has to offer?

    The 5G specifications define a new concept called "network slicing" - the ability to divide the network and its associated resources into virtual chunks ("slices") with distinct characteristics like latency and jitter performance, service availability and path diversity, network processing capabilities being applied, etc. In a sense, each user or group of users can be connected to their own private cloud that is tailored to meet their needs and objectives.

    Network slicing can be viewed as a higher level QoS mechanism for users and enterprises. It operates on a per-connection level rather than a per-packet or per-application basis, which avoids net neutrality concerns commonly associated with traditional (paid) QoS mechanisms like DiffServ. When implemented correctly, slicing offers customers an explicit choice: Given their objectives and budget, what type of slice can they get, and how big and fast is it?

    As a service provider, you also have a choice: You could create lifestyle packages that let customers choose between various connection settings. For example, there could be a premium "Gaming package" with low latency so they have an advantage in their Fortnite battles. And you could allow them to switch between packages on a weekly or monthly basis, driven by budget constraints - like bi-weekly paychecks - for example.

    Or, you could offer the equivalent of a gearshift: Allow subscribers to choose the experience they want, when they need it. Have a critical remote surgery to perform? Switch to the "reliable, low latency" gear. Ready for a Netflix movie? Switch to "economic, high bandwidth" mode. More dynamic, more fine grained - more complex to implement and market as an organization, but also providing more data points to get better insight into the requirements of your subscriber base: What do they need from the mobile network, and where and when do they need it?

    Today is Friday, and I'm feeling good. I would like to treat myself to a nice slice of 5G network for my communication needs. If you are a mobile service provider who is able to offer me what I need, come talk to me. If you feel that you are not in a position to provide that today - also come talk to me. Perhaps we can help each other, by having an open discussion about the evolution of networking today - so we can all benefit from having more and better informed choices, tomorrow. 



    Saturday, September 26, 2020

    Thoughts on "Navigating the Road to Cloud-Native Network Functions" by Tom Nolle

    Tom Nolle, a well respected consultant in the world of telecom and one of my favorite bloggers, recently posted an article about "Navigating the Road to Cloud-Native Network Functions"

    This is my first attempt to paraphrase his words, trying to 'tease out' additional understanding by introducing a slightly different perspective.

    ===

    The NFV community is a loose consortium of vendors and individuals with an established interest in the form of deployed network software products. The continuous evolution in thinking around software architectural engineering principles, the emergence of new software solutions, and changing requirements in both the way these systems get used and in the objectives against which their success is measured, are all forces that drive change.

    As humans, we have a tendency to resist change. If it gets colder, we temporarily put on a coat to get warm. If it rains, we may choose a water resistant one to avoid getting wet. Some rare individuals might decide to move to a different country with better weather conditions (on average). And it would take a special kind of - what most other humans would call - "insanity" to even consider more extreme solutions, like inventing a machine or process to eliminate the rain clouds altogether - i.e. bringing about selective, localized climate change.

    Back to our Cloud-Native Network Functions - a.k.a. moving to a different planet, from the perspective of the NFV community. A big, unlikely change. Much more difficult than - say - changing terminology, and redefining some of the concepts used when talking about network software. 

    Take "Virtual Machines" (VMs) for example. They represent a software version of a traditional hardware system, preserving the structure of its components and their suppliers - the eco-system. VMs increase the addressable market for the eco-system partners, as their carefully engineered solution can now easily be replicated and sold to an infinite number of customers, with minimal incremental cost or time. The physical constraints of hardware components are eliminated - or rather, someone else's problem, to be provided as generic resources sometimes called "cloud infrastructure".

    The OS and other software components contained within the VM are "overhead", from the perspective of someone with the capability to take individual application processes out of those VMs, and host them directly on the underlying infrastructure. This is an eco-system layer that can be eliminated, to reduce cost (objective) and to achieve more efficient resource utilization (objective) - decomposing the VM into the sub-components that deliver its actual value ("microservices") provides increased flexibility and choice, allowing for more fine-grained optimizations.

    The same OS and other software components contained within that VM form a familiar operating environment, for the organization running and maintaining those applications. There are well defined processes for upgrading to newer versions, adding more instances ("scaling out"), etc. When there are problems, a ticket is opened with the support organization of the VM vendor, who might pass it on to the OS vendor, etc. In summary, the operational processes for VMs are well understood and - considered - effective (objective). There are people assigned to these tasks, as part of a job that allows  them to make money and provide for their families (objective).

    Now consider the transition from VMs to CNNFs. What would drive this transformation, which eco-system actors would benefit/be in favor, and who would be opposed?

    Decomposing a VM into CNNFs is like taking a hammer to a mirror on a wall, disposing the frame and then scattering the pieces in various rooms around the house. The pieces are still physically there, but they no longer perform the function they were originally designed to perform, at least not in an effective and aesthetically pleasing way. And you might get hurt in the process - so why would you do this?

    Vendor selection and component selection are both eco-system design decisions. The 'optimal' choice depends on many factors, things are inter-dependent and circumstances evolve over time. Each actor has their own definition of "optimal", relative to their own objectives. For a given organization and a given platform solution with hardware and software components, it may very well be the right time to move towards a more cloud-native universe. But it depends - what are the objectives, and how do they align with yours?