SOA in Factorio: Service-Oriented Architecture vs. Monolith Benchmarks
Service-oriented architecture (SOA) breaks down a monolith into independent services connected via an Enterprise Service Bus (ESB). In Factorio, this is modeled with a central bidirectional conveyor bus that distributes resources to specialized production branches. Compared to a monolith, it ramps up complexity early on but unlocks massive scaling potential.
The bus handles all routing: it receives requests from services, redirects resources, and delivers results. Services never talk directly—only through the bus, mimicking standardized protocols. The power plant hooks in at the bus's start, pulling fuel straight from it. Liquids flow through pipes, raw materials via conveyors in both directions.
Implementation Plan and Early Challenges
Initial layout: bus expands right and up, production branches drop down. Vertical scaling is a breeze—duplicate zones without mixing logic.
Key game adaptations:
- Conveyors act as sockets for local nodes.
- Trains only for inbound users (networks).
- Dedicated branches per product (green circuits, gears).
- Bidirectional bus for reverse flows (nuclear fuel back to power).
Challenges:
- Maintaining the bus eats up serious man-hours.
- Spatial limits from the bus's width.
- Vertical growth is easy if you reserve space upfront.
Kick off with a mini-monolith at the mines for building materials—MVP style, unavoidable no matter the approach.
Pilot Run: Construction and Scaling
After basic setup (conveyors, assemblers, inserters), we hooked up smelting and power. Gear and red circuit zones expand downward, bus stretches right. Yellow belts meet demand without shortages, unlike the monolith.
Early hurdles:
- Starter mines deplete before trains—temporary belt paths as alpha testing with light loads.
- Bug defense takes priority (walls, turrets, black grenades), eating into product deadlines.
- Bus sprawl off-screen—radars for overview.
- Underloaded channels: wide streams with thin item trickles.
- Lakes in the way—landfill them.
The bus demands tons of time for laying and upkeep, highlighting real-world SOA downsides: ESB complexity as things grow. Service-to-bus comms (branch-to-bus) mirrors team coordination meetings.
Mid-Game Metrics: SOA vs. Monolith
SOA shines in throughput: yellow production feeds the bus and factory. Monolith hit shortages. Scaling is simpler—add zones off the bus, no rebuilds.
But startup is slower: in-game days for the pilot without full user onboarding. Bugs and resources pull focus from core logic, echoing budget pressures.
Vertical branch duplication (service scaling) works great—spacing between offshoots is key.
Key Takeaways
- Bus is the bottleneck: routing logic balloons with services, risking breakdowns.
- Independent services ease updates but demand strict standards.
- In Factorio, SOA wins on throughput, loses on space and build time.
- Mini-monolith start is MVP for any architecture.
- Bidirectional flows are essential for realism (fuel loops).
— Editorial Team
No comments yet.