From: Eleanor McHugh Date: 2006-09-25T07:52:57+09:00 Subject: Re: Looking for Webric example code On 24 Sep 2006, at 22:57, Dmitri Kondratiev wrote: > Thanks for update! I am thinking about using Webric for lightweight > REST-full protocol between WEB peers. In other words I need embedable > WEB server that will allow sevral apps exchange messages using simple > protocol on top of HTTP (get & post + params). I spent several months earlier in the year working on something very similar (all closed-source unfortunately) and WEBrick provided a good base. > The main question here: can Webric be embeded in another > application so > threads of this app will not be blocked and will continue to work > without starvation. In fact, application I am talking about may use > variable number of threads growing from 1 to 100 at different times > (these in addition to Webric threads). Well WEBrick uses its own thread pool and seems to do a pretty good job of managing it, but they are green threads so you'll have to make sure that none of the threads in your application are blocking or else the whole thing will stall. Depending upon your platform and how computationally intensive your application threads are you may run into some latency problems, but I doubt this will be the case with the number of threads in question. If latencies do ocur you might like to look at using dRb (distributed Ruby) to run some of your computationally intensive tasks in separate processes. Ellie Eleanor McHugh Games With Brains ---- raise ArgumentError unless @reality.responds_to? :reason