News for hackers. Stuff that matters.
Re:The Costs of Microservices by js8 on Monday October 30, 2023 @11:51AM (#38071070)
I think people get the modularity wrong. Modularity is important, but I came to conclusion there is another important architectural principle, which I call "single vortex principle".

First, a vortex in a software system is any loop in a data flow. For example, if we send data somewhere, and then we get them back processed, or are in any way influenced by them, we have a vortex. A mutable variable is an example of a really small vortex.

Now, the single vortex principle states that there ideally should be only one vortex in the software system, or, restated, every component should know which way its vortex is going.

The rationale is when we have two vortices, and we want to compose the modules that form them into a single whole. If the vortices are correctly oriented, composition is easy. If they have opposite orientation, the composition is tricky and requires decision on how the new vortex is oriented. Therefore, it is best if all the vortices in all the modules have the same orientation, and thus form a single vortex.

This principle is a generalization of ideas such as Flux pattern, CQRS, event sourcing, and immutability.

Re:The Costs of Microservices by salvadormon on Monday October 30, 2023 @12:42PM (#38071908)
I find this vortex concept interesting. Do you have any books or online sources that I could use to study this?
Re:The Costs of Microservices by js8 on Monday October 30, 2023 @12:45PM (#38071963)
No, I made it all up. I wish I had time and interest to formalize it.
Re:The Costs of Microservices by ahoka on Monday October 30, 2023 @02:09PM (#38073315)
It’s called engineering. /s
Re:The Costs of Microservices by Freebytes on Monday October 30, 2023 @02:04PM (#38073247)
This is a very good point, and you could probably write quite a few articles about this particular subject. You may even have a service A that calls service B that calls service C that calls service A. Then you have a problem. Or, you have C get blocked by something happening in A that was unexpected. Ideally, you only have parents calling children without relying on the parents whatsoever, and if you fail in this, you have failed in your architecture.
Re:The Costs of Microservices by andreygrehov on Tuesday October 31, 2023 @01:21AM (#38080645)
I think Robert C. Martin has already described that fairly well [1] [2].

[1] https://www.youtube.com/watch?v=N7agCpAYp1Q

[2] https://en.wikipedia.org/wiki/Acyclic_dependencies_principle

Re:The Costs of Microservices by porridgeraisin on Tuesday October 31, 2023 @12:48AM (#38080462)
I didn't quite understand your second-to-last paragraph(the rationale behind...), can you (or someone else) explain it further?
Re:The Costs of Microservices by samsquire on Tuesday October 31, 2023 @05:38AM (#38082244)
I like this.

When I look at an architecture diagram, half the battle is trying to work out what is async/sync, push/pull and the direction of travel and ordering.

Enterprise service buses and message queues are kind of solutions to the creating vortexes where there is not a matching direction on each side.