Managing Complexity with Mycelium
3 points by Yogthos
3 points by Yogthos
I'd love to hear the reasoning from the person who downvoted my article as spam.
How is the approach to the individual nodes different from just using a strong statically type language to define the inputs and outputs of functions?
The key of the approach lies in the inversion of control as opposed to types. The core problem I'm identifying is that we implicitly bury routing logic in form of conditional buried inside implementation details. I'm saying that if we explicitly decouple these two types of logic then we can express a program as a state graph where each node does some work and produces a result. Then the state machine examines the result and decides where to route it next.
The two main benefits here are that nodes are effectively independent programs that know nothing about each other, and the workflow logic is declarative. There's no coupling via code from one node directly calling code in another. They're context free building blocks that you can arrange any way you like. And transitions from state to state become declarative here, you can examine the graph spec and see what the program is doing semantically.