Hi all,

I'm using soap4r to interface with a bibliographic web service, and a custom
parser (xml->hash->object) to parse responses.

But I'm concerned about the possibility of timeouts blocking merb/mongrel
instances. As explained in this article (
http://ph7spot.com/articles/system_timer) for SystemTimer:

*"It is a well-known limitations of the green threads (running on top of a
single native thread) that when a green thread performs a blocking system
call to the underlying operating systems, none of green threads in the
virtual machine will run until the system call returns."*

So this means, that 4 simultaneous soap requests within 4 merb instances
would block all 4 instances until the web service returned a response -
meaning, the 5th request to the web app would be queued.

Another library, Terminator (
http://www.lindsaar.net/2008/9/11/terminator-timeout-without-mercy), works
around this problem by creating a new ruby process that kills the offending
process (which is the 'blocked' or 'slow' call to the web service if it
doesn't respond within n seconds.

My question is: is there a better solution with Merb ? Would it better to
write a tiny merb app that provided a rest interface to my app and
interfaced with the soap web service ? But would Merb, which presumably uses
green threads, face the same problem with slow system calls ?

Any help is appreciated,

Thanks,

Ahsan Ali / highandwild

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"merb" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/merb?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to