DEV Community

Cover image for Code vs Config? You're Already Orchestrating
The Unmeshed Team
The Unmeshed Team

Posted on Edited on

Code vs Config? You're Already Orchestrating

Most workflows don't start out as workflows.

They start as one function that calls two services. Then someone adds a retry. Then an undo step for when payment fails. A few months later, that function decides what runs, in what order, and what happens when something breaks.

That's orchestration. It just doesn't look like it, because it's sitting inside your code.

The debate misses the point

Teams love to argue about whether workflows belong in code or in config. But once your code calls other services and has to manage the order and the failures, you're already orchestrating. So the real question isn't code or config. It's where the plan lives.

Keep the blocks small

Let each function do one thing: reserve stock, charge a card, create a label. Wire them together somewhere else. The code stays cleaner, easier to test and easier to maintain.

What about choreography?

Services reacting to each other's events is nicely decoupled. The catch is visibility. When nobody holds the whole plan, a failure means chasing events across services to find out what happened.

So, code or config?

Neither wins. It's your code that gets orchestrated either way. Keep that code simple, and keep the plan in one place you can see.

Where does the plan live in your system? Tell us in the comments.

Top comments (0)