Sex, love and relationships through the prism of microservice architecture

“When I shared sex, love and relationships, everything became much easier ...” quote from a wise girl

We are programmers and deal with machines, but nothing human is alien to us. We fall in love, get married, have children and... die. Like mere mortals, we constantly have emotional problems when we “didn’t get along”, “we don’t fit together”, etc. We have love triangles, breakups, betrayals and other emotionally charged events.

On the other hand, due to the nature of the profession, we like everything to be logical and one thing follows from the other. If I don't like it, what exactly? If they did not agree on the characters, then in what particular part. Explanations in the style of “you don’t pity me and don’t love me” seem to us like some kind of set of obscure abstractions that need to be measured (in what units is pity measured) and given clear boundary conditions (what events should trigger this pity).

In modern psychology, a huge layer of abstractions and terminologies has been accumulated to denote the emotional side of human relationships. When you come to a psychologist and say that you don’t have a relationship with a partner, you will be given a bunch of advice in the spirit of “be more tolerant of each other”, “you must first understand yourself and understand what is really important to you.” You will sit for hours and listen to how the psychologist will tell you pretty obvious things. Or you will read popular psychological literature, the main essence of which will be reduced to a simple formulation “do what you like and don’t do what you don’t like”. Everything else is a nice garnish to a little seed of this banal truth.

But wait, programming is a very unpredictable process. In the process of programming, figuratively speaking, we try to simplify the world around us to the level of abstractions. We are trying to reduce the entropy of the world around us by squeezing it into the logic of algorithms that we understand. We have accumulated enormous experience in such transformations. We came up with a bunch of principles, manifestos and algorithms.

And in this regard, the question arises - is it possible to apply all these developments to human relations. Let's take a look... at the mycoservice architecture.

From this perspective, marriage is a huge monolithic application that becomes increasingly difficult to maintain. There is already a lot of non-functional functionality (where is the freshness of the relationship), technical debt (when was the last time you gave your wife flowers), violations in terms of the interaction of protocols between parts of the system (I tell you about a new car, and you again “take out the bucket”), the system devours resources (both financial and moral).

Let's apply the approach of microservice architecture and, to begin with, we will break the system into its component parts. Of course, the breakdown can be anything, but here everyone is his own software architect.

Marriage is functionally

  • Financial subsystem
  • Emotional subsystem (sex, love, feelings, everything intangible and difficult to evaluate)
  • Communication subsystem (responsible for communication and interaction within the family)
  • Parenting subsystems (optional, as available)

Ideally, each of these subsystems should be autonomous. Style patterns are not allowed:

  • you don't earn much, so my feelings for you fade away
  • if you love me, buy me a fur coat
  • I will not communicate with you, because you do not satisfy me in bed

In a good microservice architecture, any part of it can be replaced without affecting the operation of the entire system as a whole.

From this point of view, a partner's affair is nothing more than a replacement for a subsystem of sensual relationships.

A married woman, in turn, can find a rich lover, thereby replacing the financial subsystem.

Emotional communication within the family is being replaced by external services in the form of social networks and instant messengers. The interaction API remains seemingly unchanged, as does the person on the other side of the screen, but no technology can give a sense of closeness.

The illusion of abundance and accessibility on dating sites makes its contribution - you do not need to make any efforts to establish communication. Swipe left on Tinder and you're ready for a new relationship with a clean slate. It's kind of like an improved version of old-fashioned networking protocols - going to the movies or cafes, but with the ability to press the Reset button and start the game over.

Whether such replacements are beneficial to the system as a whole is a debatable question and everyone can give their own answer. Whether it is necessary to separate a working monolithic application of relations, with its internal troubles and periodic failures, and whether it will fall apart when everything is sorted out, is an open question.

Source: habr.com

Add a comment