I would like to have two different applications:
- Rails application
- Process that imports lots of data into the database (same db as used by rails)
The two components are completely independent apart from using the same database and active record models. They would probably be running on different machines.
It doesn't make sense to load the whole rails application every time I want to import data and vice versa.
How do I have two separate applications using the same set of models?
Do I need to have my models separated as an external dependency from both the rails app and the imports process? If so, what's the best way to do that?
I'm aware of delayed_job and the like. However, they seem to be more for executing web application related jobs like batch uploads or emails.
EDIT: More details about the apps: the import process parses statistical data such as series, observations etc. and saves respective models into the database. The web app is dealing with displaying that data and other web stuff like user management, emails etc. I would like to be able to kick off the import process from terminal.