Merge Bourreau and BrainPortal branches (Redmine 1105)
(Created August 2010)
Instead of having two RAILS applications, we could merge them into a single one; the rails app started would act as one or the other depending on how it was configured at startup.
There are several complications associated with this, but none of them major. The class hierarchy for subclasses of CbrainTask need to be updated (it currently differs depending on whether you're on portal or Bourreau). The routes.rb file need to adjust appropriately. The validation mechanism need to know what to check for.
A big advantage is the overall simplicity it leads to.
Comment by Pierre, March 2012
No, there has been no progress on this issue. It's not really complicated to do, it just takes a full day of work, but in order to finish there is a design decision that needs to be made:
- When a Rails app is booting, how will it know whether it's supposed to act as a bourreau or whether it's supposed to act as a portal? Command-line arg? Env variable?
Modern RAILS app can be started without a database.yml file, using a URL. Maybe we can encode the remote resource name within it. Otherwise, a new mandatory environment variable can work.
I worked on a experimental version of that last summer (November 2019) and it seems it's possible, but it's a lot of changes that need to be each evaluated carefully.