What is the most performant way to get data of one rails application by another rails application?
I have two rails applications (both now on Rails 3.1.1), and they work nicely. However, I have a dependence between the two. Application `A` uses data of application `B` by linking to it. These links are created automatically, but they have to be computed by doing a lookup to the data of application `B`. I'm working on Windows 7 with Ruby 1.9.2, and this will not be changed :-(

I have tried the following:

 * Use just a RESTful resource, so defined a controller, called its action (`get_xml_obj` with some params in it), read the needed values from the XML. Worked, but needs around 0.5s to 1s per call.
 * Replaced it by [ActiveResource#find][1] which worked as well, but with the same performance as the solution before.

So is there something I can do to tune the retrieval (without accessing the database directly)? I use a cache for the retrieved information, so it gets better over time, but 1 second is too much to wait for. And there may be more than 1 or 2 links in a page I want to render.


  [1]: http://api.rubyonrails.org/classes/ActiveResource/Base.html#method-c-find
What is the most performant way to get data of one rails application by another rails application?
===

I have two rails applications (both now on Rails 3.1.1), and they work nicely. However, I have a dependence between the two. Application `A` uses data of application `B` by linking to it. These links are created automatically, but they have to be computed by doing a lookup to the data of application `B`. I'm working on Windows 7 with Ruby 1.9.2, and this will not be changed :-(

I have tried the following:

 * Use just a RESTful resource, so defined a controller, called its action (`get_xml_obj` with some params in it), read the needed values from the XML. Worked, but needs around 0.5s to 1s per call.
 * Replaced it by [ActiveResource#find][1] which worked as well, but with the same performance as the solution before.

So is there something I can do to tune the retrieval (without accessing the database directly)? I use a cache for the retrieved information, so it gets better over time, but 1 second is too much to wait for. And there may be more than 1 or 2 links in a page I want to render.


  [1]: http://api.rubyonrails.org/classes/ActiveResource/Base.html#method-c-find