We don’t have an app/ directory in our Rails project. All of our code is either in gems/ or engines/.
Gems contain Ruby code that does not depend on Rails. We use ActiveSupport, but we do not use ActiveRecord or ActionPack. The gems are all stateless.
Engines contain Ruby code that does depend on Rails. Persistence happens at this layer through ActiveRecord. API and Web interfaces are exposed at this layer through ActionPack.
Is it a good trade? To me it seems like maintaining a gem/library is less complex than maintaining a service that exposes the functionality of said gem. No networking, deployment configuration, request handling, parsing, host monitoring, logging, access control, etc to deal with.
Right, but then they say "Although structuring GitLab as a monolith has been extremely beneficial for us, we are not dogmatic about that structure." And looking at their source code, they aren't following that very strictly.
----
From the article:
We don’t have an app/ directory in our Rails project. All of our code is either in gems/ or engines/.
Gems contain Ruby code that does not depend on Rails. We use ActiveSupport, but we do not use ActiveRecord or ActionPack. The gems are all stateless.
Engines contain Ruby code that does depend on Rails. Persistence happens at this layer through ActiveRecord. API and Web interfaces are exposed at this layer through ActionPack.