How to decompose a Rails application into various ecosystems of small applications

My team is developing a bunch of modules in a monolithic Rails application for internal use. The modules are, for example, a vacation request, personnel information, tasks / tasks, etc. Each module has its own purpose, but is somehow related to general information, such as personnel profile and user authentication. Each module has a designated developer and passes the code to the same Rails application. It is currently very difficult to maintain code and scale. Now I'm doing my research to decompose the application into small distributed applications and make them an ecosystem. Here is the concept I'm looking for:

  • There must be a main application that supports the presentation of other client applications. Even better, it acts as a platform for other client applications to connect to it. Personnel are registered in this main application to access the client application.
  • The master application should display the types of client applications using AJAX or in other ways (not solved).
  • Although, I want to decompose the applications, but each application should still be able to request resources / data, such as a staff profile, from another client application in the ecosystem.
  • Actually, I did not decide on the interaction of each application. Thinking us RESTful (not decided).
  • It should support a development environment where each developer can independently develop each application. Therefore, saving your own code in your own git repository. This is probably the main purpose of decomposing the application in the first place.

I am reading a service-oriented design with a Ruby on Rails book, but it looks like they are focused on decomposing the application into small different services, whereas I want to have small applications. Just wondering if there are other ways to do it.

Sorry for the long question and too much. I just want to know if you were in the same situation and can lead me to some articles, communities, books, so that I can continue more research.

+8
ruby-on-rails soa
source share
1 answer

And the joys of refactoring. It can be a complex dance that tries to structure the application into logical groups so that the parts can be separated.

I would strongly suggest looking into Engines , with engines versus being mounted being very informative. This allows you to create a mini Rails application (aka β€œEngine”) that can be packaged like a gem. Custom Aircraft are embedded in the Rails application, providing a complete set of customizable features (models, controllers, views, etc.).

The usefulness of a service-oriented architecture depends on what kind of data you push and pull. At the same time, Rails is really connected to RESTful, so you get a lot of noise for the dollar with this route.

+4
source share

All Articles