Hi Henry, This looks like a fun project! Just discovered ForkJoin :)
The Jetty filter is a Servlet filter, so you would need to deploy your Restlet application in Servlet mode inside Jetty to be able to leverage it. Otherwise, it would be feasible to reimplement a similar filter in Restlet. I've entered a RFE for this: "Add throttling service" http://restlet.tigris.org/issues/show_bug.cgi?id=723 Best regards, Jerome Louvel -- Restlet ~ Founder and Lead developer ~ http://www.restlet.org Noelios Technologies ~ Co-founder ~ http://www.noelios.com -----Message d'origine----- De : [email protected] [mailto:[email protected]] Envoye : vendredi 30 janvier 2009 16:02 A : [email protected] Objet : How to integrate jetty's ThrottlingFilter I use jetty in a restlet service, where each request has to perform rather complicated calculations and need lots of CPU time, (~100ms to respond). Each resource itself is multithreaded (using jsr166y and ForkJoin). I did set the maxThreads and acceptQeueuesize to very low values (<10), trying to keep the response times around 100ms even under high load. This works out OK, but I am having a problem: When the queue is full and the server is busy calculating replies, it /should/ immediatly respond with a 503 status when evem more requests arrive. Unfortunately, the requests are not denied but just time out. I assume I would have to use Jetty's throttlingFilter ( http://www.mortbay.org/jetty/jetty-6/apidocs/index.html?index-all.html ) - but I don't know how to do so within restlet. Any jetty experts around? Thanks, Henry. ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1074847 ------------------------------------------------------ http://restlet.tigris.org/ds/viewMessage.do?dsForumId=4447&dsMessageId=1075379

