4 ms·
The author linked to this article to explain it: https://medium.com/@dan_manges/the-modular-monolith-rails-architecture-fb1023826fc4 https://medium.com/@dan_man
by hbien 4y ago
The author linked to this article to explain it: https://medium.com/@dan_manges/the-modular-monolith-rails-architecture-fb1023826fc4 https://medium.com/@dan_manges/the-modular-monolith-rails-ar...
----
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.
- andrew_ 4y agoTrading one form of complexity for another.
- rgbrgb 4y agoIs 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. Which do you think is more complex?
- vlunkr 4y agoRight, 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.