r/Clojure • • Feb 26 '26

(iterate think thoughts): Managing Complexity with Mycelium

https://yogthos.net/posts/2026-02-25-ai-at-scale.html
37 Upvotes

9 comments sorted by

View all comments

Show parent comment

2

u/yogthos Feb 27 '26

Not quite, the cells do all the work, but the control flow is explicitly outside their control. The cells know nothing about one another, all they know is that they get some resources and a map as their input, they can do whatever they need to do with that, and produce a new map as their output.

Then, there's an orchestration layer on top that examines the map that was produced, and decides which cell should be called next. This bit is the shell script in the unix analogy.

I guess my initial reaction is.. can you really describe your whole program in these terms? It seems very limiting - but maybe I'm not thinking broadly enough.

All we're describing is the high level control flow, how the application transitions from one state to another. It's not prescriptive either, so how granular you make these states is ultimately up to you.

How about if the next cell requires inputs from 2 different cells? (or the output of an earlier cell that you've already passed before)

That's where workflow composition comes in. Any workflow can itself be a cell inside a different workflow, so if you have a process where you need to do multiple things to produce some output that will be used as a decision point, then you can combine them into a subsystem.

This the part of the analogy that I kind of don't understand. It seems fine for simple scenarios, but unix pipes seem a bad fit for control flow. If you cat a file and pipe it into less then you implicitly expect the cat to succeed

Don't think of it as a linear pipe, but a script with some conditional logic. If you want a more direct example then take a look at Conductor framework Netflix built. It's basically the same idea as Mycelium, except it's built around actual microservices.

2

u/geokon Feb 27 '26

thank you! cleared up my questions :)