logoalt Hacker News

anomaloustholast Friday at 5:54 PM1 replyview on HN

Why do we use polytree in this context instead of DAG? Because nodes can’t ever come back together?


Replies

dupedlast Friday at 6:28 PM

The author is not saying you should use a polytree but rather that the ideal graph of microservices should also be a polytree.

A polytree has the property that there is exactly one path that each node can be reached. If you think of this as a dependency graph, for each node in the graph you know that none of its dependencies have shared transitive dependencies.

I'll give it one though: if there are no shared transitive dependencies then there cannot be version conflicts between services, where two otherwise functioning services need disparate versions of the same transitive dependency.