Photo by CDC on Unsplash

Tweaking CAP theorem for the family

CAP Theorem for data stores has been studied pretty well. The essential idea being, out of Consistency, Availability and Partition-Tolerance, a data store technology can choose either of two at any point in time. Example Cassandra chose A & P while Redis chose C & P, SQL Server went with C & A.

This perfectly fits well for data store technologies. You could decide which one technology to use based on service/application need.

For the family person (all roles — Dad/Mom/Husband/Wife) like me, you realize you could directly relate with your routines. Redefining CAP slightly,

C — Consistency/Quality in tasks.

A — Availability for tasks.

P — Partition-Tolerance : Partitions would be Home, Office , School, etc based on the role you select at a point in time. At Home you are a Dad/Mom/Husband/Wife. At Office you are a colleague/employee while at School you are a parent.

At a point in time , it’s quite impossible to satisfy all three.

If you selected CA, you cannot satisfy all the partition duties. Perhaps some of the partitions, but no clues to which.

If you selected CP — you are generally not available most of the time. Think of running around between school, work and office duties — timeouts in terms of extremely late to everything.

If you selected AP — you are available for all duties somehow, but your task quality is not consistent. Basically this means you are not able to complete anything in quality at any time.

The only solution is to continuously select CA together with one partition on a periodic daily/hourly basis. Morning you could be satisfied with CA+Home-Partition (Routine=Cooking), while in afternoon you have CA+Office-Partition(Routine = Meeting).

Basically, as we cannot reduce consistency in quality but be available too, the deciding factor boils down to partition and the related routine that needs the next immediate priority.

Lets call this the CA+P(r) theorem for the family person, where P(r) refers to selected Routine r under Partition P.

Note that the onus on updating other affected partitions on the results of your effort at this partition(routine) is unto you. Think of communicating to your spouse on how the appraisal meeting went in the afternoon. Eventual Consistency is applied for selected partitions only.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store


Software engineer at heart, with varied interests.