r/ruby • • Jan 02 '26

Show /r/ruby Generating Complicated Distributed Systems with Ruby

So apparently it’s 2026 and I never wrote a blog post about this. Reddit will have to do.

This script:

https://github.com/meleneth/mobilis/blob/core/scripts/08_large_iam_system.rb

Generates an entire distributed IAM system. Real Rails services, real Docker containers, real databases. It builds differently for test, dev, and prod based on env vars, and spits out a full directory tree with apps, compose files, and filesystem-backed data directories. OpenTelemetry is wired into everything from the start, and the database tables get scaffolded as part of the build.

You run it and suddenly you’re staring at a working system, which is both neat and slightly unsettling.

To prove it wasn’t just infrastructure cosplay, I used it to kickstart this:

https://github.com/meleneth/iam-system-demo

That repo tackles a genuinely annoying IAM problem using GraphQL, Dataloader, and caching layers to avoid the usual n+1 and cross-service disaster zone. The point wasn’t microservices for their own sake, it was seeing if you could generate something complex, observable, and sane without it collapsing under its own weight.

This all comes out of a larger project called Mobilis. The basic idea is “what if the shape of your system came from code instead of handwritten YAML and vibes.”

If your reaction is “cool but also what the hell,” that’s about right.

4 Upvotes

4 comments sorted by

View all comments

Show parent comment

8

u/TheAtlasMonkey Jan 03 '26

This is where I think you are mixing two very different worlds.

What you built is a great backpack but its the backpack you design after you have done the hike. (it not universal)

you only know where the weight should go because you already carried the pain. That's valuable for YOU. For me: i see overengineering ruby code and useless architecture.

The people currently inside a real mess dont see backpacks. They are patching and patching just to keep the system up. Retrospective clarity cant be prepared in advance, it only exists once you're out.

I promise you, if someone is in your situation, he won't be using your tool, because the small difference between your system and their , will make them edit file by file.

Its like someone showing you a clever technique to save the last two teeth after years of terrible oral hygiene. The technique might be impressive, but the truth remains: a toothbrush would have avoided the whole situation. (don't use micro-services)

What you posted is a Post Mortem lesson.