Rainbows! Rack HTTP server user/dev discussion
 help / color / mirror / code / Atom feed
* rainbows for 3rd party api
@ 2009-11-04 18:49 Giovanni Lion
       [not found] ` <2007122a0911041049u2b4376dbpd3b1f727e315ea88-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
  0 siblings, 1 reply; 6+ messages in thread
From: Giovanni Lion @ 2009-11-04 18:49 UTC (permalink / raw)
  To: rainbows-talk-GrnCvJ7WPxnNLxjTenLetw

Hi all,

I came across rainbows while I was looking for a smart solution for
handling 3rd party api calls for my rails app. I would like to know a
little more about how to achieve efficency in the following context:

1 user requests a page
2 page content requires xml to be retrieved from 3rd party server
through http call
3 page is rendered, without the 3rd party data but with an onload ajax
request back to the app to retrieve 3rd party data
4 app generates an http call to 3rd party api
5 app waits for 3rd party response
6 app responds to ajax call rendering html out of the xml response
from 3rd party api

Right now my current setup is apache + passenger, no constraints on
switching to anything else. This setup is not optimal of course
because if i receive many concurrent requests that need 3rd party
response passenger app pool is full and sleepy. From what i read in
the documentation rainbows should come handy in this situation. I had
a look at unicorn and i think i got more or less how it works. Can
anyone suggest me how to set up the app deployment in order to reduce
waste on step 5? My guessing is should create a rack app to handle
these calls using DevFdResponse and run it with rainbows. Only problem
is can i have the rails environment in there?

Thanks in advance,

Giovanni

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2009-11-06 19:26 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-11-04 18:49 rainbows for 3rd party api Giovanni Lion
     [not found] ` <2007122a0911041049u2b4376dbpd3b1f727e315ea88-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-11-04 21:40   ` Eric Wong
     [not found]     ` <20091104214018.GA25942-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2009-11-05 13:03       ` Giovanni Lion
     [not found]         ` <2007122a0911050503x5740cf3ei4f1185b4cb895298-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-11-05 23:06           ` Eric Wong
     [not found]             ` <20091105230638.GA7131-yBiyF41qdooeIZ0/mPfg9Q@public.gmane.org>
2009-11-06 10:40               ` Giovanni Lion
     [not found]                 ` <2007122a0911060240j105c1fcfgfebb2c5757cf7fd1-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2009-11-06 19:20                   ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://yhbt.net/rainbows.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).