Posts

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.

2. Flow consistency - read-your-writes consistency

 moved to  https://software.mihvoi.ro/2026/04/2-flow-consistency-read-your-writes.html 2. Consistency, Availability and low Latency in Distributed system (workarounding the CAP/PACELC theorems)   Introduction: " 1. Cache and Data Consistency in Distributed systems (CAP/PACELC/CRDT) "   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 assure...

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 ...

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.

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: th...

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. T...

1. Cache and Data Consistency in Distributed systems (CAP/PACELC/CRDT)

moved to:  https://software.mihvoi.ro/2026/04/1-cache-and-data-consistency-in.html Abstract There is always a tension between data  C onsistency and system  A vailability when  P artitioning a system across datacenters (think  CAP ). Especially data cache-ing poses interesting challenges. This tension becomes way more acute as soon you have 2 data centers separated by more than 10ms latency. I present below some of the problems along with possible solutions. In the end I will present an elegant solution that maximizes  A vailability while providing the needed C onsistency level for read-after-writes flows. The solution requires the client to carry a monotonic  id  along the flow. I would postulate that any solution where the client don't carry some consistency info will provide a higher latency that the presented solution (see chapter "Flow consistency" ) . The examples below are simplified to be intuitive and easy to understand, however the...