title: overhead of using local http calls
body: <p>I'm developing a <a href="http://en.wikipedia.org/wiki/Wrapper_pattern" rel="noreferrer">wrapper</a> around an existent RESTful API. I basically have to do some preprocessing, calling the underlying API, and some preprocessing, with a little bit of cache in the middle. The API is specially designed for RESTful access via http.</p>
  
  <p>My question is, should I refactor the API so I can invoke it via code, or should I make local http calls to it. This second option seems nice since it increases decoupling, but I'm afraid that creating the http requests / responses can seriously affect performance. I've heard though that <a href="http://couchdb.apache.org/" rel="noreferrer">couchDB</a> does something like that (its api is RESTful and accessed via http).</p>