async http request

B

Bob Aman

I'm currently working on a ruby on rails page that needs to query a
web service, retrieve a few rss feeds and do a whole bunch of SQL
queries. Right now, my code is doing all of this somewhat
inefficiently. Ideally, I'd like to be able to do the http requests
on the page asynchronously if possible. However, I have yet to find
any example code or documentation that shows how to do this. I saw
the http-access2 library, though that seemed quite complicated
compared to the open-uri method I'm using now. Any suggestions about
how best to go about this? In the end, I really just need to have it
work, and have it be fast.
 
J

James Britt

Bob said:
I'm currently working on a ruby on rails page that needs to query a
web service, retrieve a few rss feeds and do a whole bunch of SQL
queries. Right now, my code is doing all of this somewhat
inefficiently. Ideally, I'd like to be able to do the http requests
on the page asynchronously if possible. However, I have yet to find
any example code or documentation that shows how to do this. I saw
the http-access2 library, though that seemed quite complicated
compared to the open-uri method I'm using now. Any suggestions about
how best to go about this?

This is on the server, correct?

Can you use Ruby threads for each of the various requests?


James Britt


http://www.ruby-doc.org
http://www.rubyxml.com
http://catapult.rubyforge.com
http://orbjson.rubyforge.com
http://www.jamesbritt.com
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,009
Latest member
GidgetGamb

Latest Threads

Top