I have a Rails app whose major part is to query another web-service using ActiveResource and show the results to the users. But it uses the database for other features like user-login , reviews comments etc. When the mysql database goes down , the whole app goes down. In such cases i want have atleast the part which doesnt require the database. (the one which uses ActiveResource and get the results from the webservice) be functional. as it is the major thing for my Rails app.
What are the ways i can accomplish this. ? To start the app without db i googled , where i got to know i should exclude ActiveRecod from the list of frameworks in the environment.rb file. But it wouldnt start cos there were so many reference the database all through my app.
so could i make a version of the app which doesnt require db and route the request to this version when ever the db goes down?
or
Is there anyway to just disable the database accessing part and make the webservice part running. when the database goes down?
Thanks