2020-10-09

Data Consistency and the "Theory of relativity"

"If a tree falls in a forest and no one is around to hear it, does it make a sound?"
If a system has an inconsistency and there is no one to observe it, is it still an inconsistency?



Introduction

We need to scale data processing systems geographically to achieve lower Latency and (at least partial) Availability in case of network Partitioning. But CAP/PACELC tells us that we cannot achieve strong Consistency in this case. When we increase the Consistency requirements, we have to accept lower Availability and higher Latency.



What is the minimum consistency level that we need?

If eventual consistency is enough for your system, things are pretty clear and relatively simple. Most probably you want to achieve Strong Eventual Consistency that is relatively cheap and provides nice guaranties. For this you will have to you something like CRDT. Some theoretical results assure us that you cannot find something way cleverer than CRDT that achieves Strong Eventual Consistency.

Often, you have business flows where eventual consistency is just not enough. For example, after you update a data in one region, you expect a following read in another geographical node to return the updated value, like in "Read-Your-Writes Consistency". This sounds like a pretty simple requirement, but it is really hard to implement correctly and it will increase the Latency of the system and/or decrease Availability - compared with eventual consistency.

2020-09-25

Religions are (Software) Operating Systems

It is hard to live without a religion. Each religion comes with its set of APIs, for blessing and cursing, for forking a process child and for being sure a dying process doesn't become a zombie. Religions come with their set of protection mechanisms and their corresponding violation errors and punishments.

2020-08-26

Flow consistency - read-your-writes consistency

 

Consistency, Availability and low Latency in Distributed systems - part 2

(workarounding the CAP/PACELC theorems)

 

See also: "Cache and Data Consistency in Distributed systems (CAP/PACELC/CRDT) - part 1"

 
TL;DR
Full strong Consistency in geographically Distributed systems can only be achieved by sacrificing Availability (per CAP theorem) and with prohibitive Latency costs (per PACELC theorem).
However, we can still design consistent enough systems that continue to function when one geographical region is down and without paying the inter-region latency most of the time.

While eventual Consistency is OK many times, there are still cases when we want a strong read-after-write consistency for certain read-after-write flows. There is an optimum design that assures strong Consistency inside read-after-writes flows. Arguably, this is the highest Consistency level that can be assured without a prohibitive impact on Availability and Latency.

2020-08-15

Devil's offer

Imagine that humanity is offered the following deal:

  • All living humans will enjoy 100 more years of healthy and happy life, finished by a peaceful death in sleep. Immediately after signing the deal, humans will forget the deal and will not worry about this "deadline".
  • If you sign the deal, no human will even experience any suffering. As life will be extended to 100 years from now regardless of the starting age, no human will even witness the death of another human. Even old people would enjoy a healthy and happy life, becoming physically young again and regaining their mental capacity - without losing their experience.
  • Each life will be full of accomplishments, not only by material welfare, but also with most spiritual accomplishments that a human can reasonably expect. Children will still be born, parents will still be happy about them - even more so, because all would go smooth with no worries and no accidents.
  • People would live happily and without any worry until the "deadline", that will be a peaceful end of the whole humanity.

 

Would you take the above deal?

2020-08-09

Morality and killing

Killing is morally wrong universally, for most people adhering to a moral system, right? 

What about killing an aggressor that tries to kills hundreds of people in your community?

Suddenly that killing to save the life of many innocents does not seem so repellent for most people, don't you agree? What if the killing of an aggressor is the only solution to save the life of a member of your family? Even many religious people would consider such defensive killing the right thing to do if there is no other solution.

2020-07-05

The Capitalism theory

We have many anecdotal evidences that economical capitalism creates more welfare than economical communism. However, we lack a clear model to explain what is necessary for the capitalism to work and what is only contingent - not contributing or even affecting the welfare creation.

Without such model, we are left debating with ideological arguments like "private property is a natural right" or the anecdotal argument that "communism never worked well enough". The opposing side would naturally reply with some other anecdotal evidence about the shortcomings of capitalism and the possibility that "communism failed because it was not correctly implemented".

I will argue here that we can actually model the way private property positively impact the creation of overall welfare. On the other hand, we can also identify cases when private property can negatively impact the overall welfare.

I use "common welfare" in the common, intuitive sense: the subjective appreciation of a country's welfare. While most formal definitions (like GDP/capita) will work the same for this argument, you can find my definition at the end.


2020-05-15

Evil as striving for a local maximum

Let's observe first that we tend to attribute evil when there is a sufficient capacity of understanding the consequences of one's actions. A small child that produces a tragical accident is not considered evil usually, because there was no intent in doing that harm.

We then observe that we judge evil in the contrast to another, better, possible action: "he could have decided to not kill him". We don't attribute evil when someone produces harm without having the possibility of doing something better.

Moral judgement on evil is therefore a judgement of one's actions and decisions, in relation to some other actions or non-actions that would have resulted in a better world. That better is a highest "local maximum" that we can envision. The misdirected action is usually dictated by another, more narrow,  goal that is aiming at a smaller local maximum. For example, one can aim his narrow, selfish, good (local maximum) at the expense of others.

This maximum is often on a single dimension: feel good physically, or have a lot of money, or be revenged, or make out nation/race great (think Hitler). There objectives are often not bad in themselves. However, chasing them might affect other life dimensions - like having a better win-win relationship, or at least avoid the damaging effects of a personal or international war.

There are three dimensions of evil, closely related: at personal level, social level and at the level of Humanity.

Subscribe by Email - average is less than 1 article/week