← Graph

Engines vs namespaces for splitting a growing monolith

question 2 connections

Audience question: when building another application inside an existing Rails monolith that may grow and need to be extracted later, should it be a Rails engine or just a namespace inside the app? Adrian's answer: it depends, but build everything so it can be extracted if needed. For clearly first-class domains (e.g. buyers and sellers in a marketplace) engines make perfect sense from day one. For less distinct features, namespaces are fine — and you can extract engines later, as Adrian did in a past e-commerce gateway that started as namespaces and grew into separate engines per marketplace (Shopify, Amazon, etc.).

answer_summary
It depends. Use engines for clearly first-class domains; start with namespaces otherwise, but architect so extraction later is cheap. Adrian did exactly this on an e-commerce gateway, growing namespaces into separate engines per marketplace.
question Engines vs namespaces for splitting a growing monolith
about
Rails Engine concept
Question compares engines to simple namespaces.
question Engines vs namespaces for splitting a growing monolith
asked_at
Asked during the Q&A of this talk.

Provenance

Read by
2 extractions