--000e0cd17e36a74d120482d6dcc9 Content-Type: text/plain; charset=ISO-8859-1 On Sat, Mar 27, 2010 at 11:29 PM, David Collier <lister / pikkle.com> wrote: > hi - > > sure this is becoming a more common issue for many people - from within > a web-app how to interact with other systems in a non-blocking way. ie i > dont need to wait for a response from the other system in the cycle of > the same user request/response. > > i need to send some logging information off to another system, via > rest/http. > in a rails app we're currently using delayedJob, which stores the events > to the DB, and another process sends them. this is a pretty heavy > process. > > a simplistic way would be just using system "curl &" but that will > spawn a system process. not sure about the risks involved with that - > this means one NgInx/rails instance will have to wait for that to > complete, and maybe run into memory issues. > > Are there any ways to use the net/http library to "fire and forget" a > call? > or perhaps a simple implementation using threads, that will be less > resource intensive than "curl &" > > thanks... > > /dc > -- > Posted via http://www.ruby-forum.com/. > > Event Machine sounds like it fits your needs. This presentation says it can handle 5-10k concurrent connections in a single ruby process http://timetobleed.com/eventmachine-scalable-non-blocking-io-in-ruby/ Here is the rubygems page http://rubygems.org/gems/eventmachine --000e0cd17e36a74d120482d6dcc9--