Re: Filters before SlingMainServlet

2010-10-02 Thread Ian Boston
On 30 Sep 2010, at 09:15, Felix Meschberger wrote: I dont know if its my machine or the way of testing but at the moment I can only get a max of 600 request per seconds on a json properties GET, flat regardless of concurrency out of sling. If I test Tomcat 6 on a html page I get 6K/s

Re: Filters before SlingMainServlet

2010-10-02 Thread Justin Edelson
On Oct 2, 2010, at 5:31 AM, Ian Boston i...@tfd.co.uk wrote: On 30 Sep 2010, at 09:15, Felix Meschberger wrote: I dont know if its my machine or the way of testing but at the moment I can only get a max of 600 request per seconds on a json properties GET, flat regardless of

Re: Filters before SlingMainServlet

2010-10-02 Thread Ian Boston
On 2 Oct 2010, at 15:14, Justin Edelson wrote: Have you tried this with a trunk build of JR 2.2? IIRC, some fairly significant changes have been made with respect to concurrent session access which might help with this issue. I have had a look and AFAICT, there is one AccessControlProvider

Re: Filters before SlingMainServlet

2010-10-01 Thread Felix Meschberger
Hi, On 30.09.2010 19:10, Ian Boston wrote: On 30 Sep 2010, at 17:16, Ian Boston wrote: On 30 Sep 2010, at 16:50, Ian Boston wrote: Looking in the code most of those methods are synchronised, which feels wrong as it will make the server single threaded to read, write I can understand,

Re: Filters before SlingMainServlet

2010-10-01 Thread Felix Meschberger
Hi, On 30.09.2010 15:43, Ian Boston wrote: On 30 Sep 2010, at 13:52, Felix Meschberger wrote: Hi, On 30.09.2010 13:16, Ian Boston wrote: On 30 Sep 2010, at 09:15, Felix Meschberger wrote: Ok, ( btw, thanks for the other pointers). The reason I want to register the filter before

Re: Filters before SlingMainServlet

2010-10-01 Thread Ian Boston
On 1 Oct 2010, at 07:23, Felix Meschberger wrote: Hi, On 30.09.2010 19:10, Ian Boston wrote: On 30 Sep 2010, at 17:16, Ian Boston wrote: On 30 Sep 2010, at 16:50, Ian Boston wrote: Looking in the code most of those methods are synchronised, which feels wrong as it will make the

Re: Filters before SlingMainServlet

2010-10-01 Thread Ian Boston
On 1 Oct 2010, at 07:31, Felix Meschberger wrote: WDYT? Another point: Even though such filters don't have access to the full SlingHttpServletRequest/Response functionality it should be noted, that the request has already been authenticated and the ResourceResolver used for request

Re: Filters before SlingMainServlet

2010-10-01 Thread Felix Meschberger
Hi, On 01.10.2010 08:51, Ian Boston wrote: On 1 Oct 2010, at 07:23, Felix Meschberger wrote: Hi, On 30.09.2010 19:10, Ian Boston wrote: On 30 Sep 2010, at 17:16, Ian Boston wrote: On 30 Sep 2010, at 16:50, Ian Boston wrote: Looking in the code most of those methods are

Re: Filters before SlingMainServlet

2010-10-01 Thread Felix Meschberger
Hi, On 01.10.2010 08:53, Ian Boston wrote: On 1 Oct 2010, at 07:31, Felix Meschberger wrote: WDYT? Another point: Even though such filters don't have access to the full SlingHttpServletRequest/Response functionality it should be noted, that the request has already been authenticated

Re: Filters before SlingMainServlet

2010-10-01 Thread Ian Boston
On 1 Oct 2010, at 08:32, Felix Meschberger wrote: Hi, On 01.10.2010 08:53, Ian Boston wrote: On 1 Oct 2010, at 07:31, Felix Meschberger wrote: WDYT? Another point: Even though such filters don't have access to the full SlingHttpServletRequest/Response functionality it should be

Re: Filters before SlingMainServlet

2010-10-01 Thread Ian Boston
On 1 Oct 2010, at 08:30, Felix Meschberger wrote: Inside the javax.servlet.HttpServlet code, probably part of Jetty/PAX, AFAICT, I am not certain I believe the stack trace is complete from YourKit (might have holes in it) Wow! I know see ... They have the javax.servlet.HttpServlet.class

Re: Filters before SlingMainServlet

2010-10-01 Thread Felix Meschberger
Hi, On 01.10.2010 09:42, Ian Boston wrote: On 1 Oct 2010, at 08:32, Felix Meschberger wrote: Hi, On 01.10.2010 08:53, Ian Boston wrote: On 1 Oct 2010, at 07:31, Felix Meschberger wrote: WDYT? Another point: Even though such filters don't have access to the full

Re: Filters before SlingMainServlet

2010-10-01 Thread Felix Meschberger
Hi, On 01.10.2010 10:09, Ian Boston wrote: On 1 Oct 2010, at 08:30, Felix Meschberger wrote: Inside the javax.servlet.HttpServlet code, probably part of Jetty/PAX, AFAICT, I am not certain I believe the stack trace is complete from YourKit (might have holes in it) Wow! I know see ...

Re: Filters before SlingMainServlet

2010-09-30 Thread Felix Meschberger
Hi, On 29.09.2010 22:00, Ian Boston wrote: Hi, Is it possible to register a filter before the SlingMainServlet ? Short answer: No. Longer answer: The SlingMainServlet (or actually the SlingRequestProcessorImpl these days) is controlling the execution of the filters and those are only called

Re: Filters before SlingMainServlet

2010-09-30 Thread Ian Boston
On 30 Sep 2010, at 07:23, Felix Meschberger wrote: Hi, On 29.09.2010 22:00, Ian Boston wrote: Hi, Is it possible to register a filter before the SlingMainServlet ? Short answer: No. Longer answer: The SlingMainServlet (or actually the SlingRequestProcessorImpl these days) is

Re: Filters before SlingMainServlet

2010-09-30 Thread Felix Meschberger
Hi, On 30.09.2010 09:31, Ian Boston wrote: On 30 Sep 2010, at 07:23, Felix Meschberger wrote: Hi, On 29.09.2010 22:00, Ian Boston wrote: Hi, Is it possible to register a filter before the SlingMainServlet ? Short answer: No. Longer answer: The SlingMainServlet (or actually the

Re: Filters before SlingMainServlet

2010-09-30 Thread Ian Boston
On 30 Sep 2010, at 09:15, Felix Meschberger wrote: Ok, ( btw, thanks for the other pointers). The reason I want to register the filter before Sling is the caching one captures certain public responses before any processing and so should be a) highly concurrent with the right cache and b)

Re: Filters before SlingMainServlet

2010-09-30 Thread Felix Meschberger
Hi, On 30.09.2010 13:16, Ian Boston wrote: On 30 Sep 2010, at 09:15, Felix Meschberger wrote: Ok, ( btw, thanks for the other pointers). The reason I want to register the filter before Sling is the caching one captures certain public responses before any processing and so should be a)

Re: Filters before SlingMainServlet

2010-09-30 Thread Ian Boston
On 30 Sep 2010, at 13:52, Felix Meschberger wrote: Hi, On 30.09.2010 13:16, Ian Boston wrote: On 30 Sep 2010, at 09:15, Felix Meschberger wrote: Ok, ( btw, thanks for the other pointers). The reason I want to register the filter before Sling is the caching one captures certain

Re: Filters before SlingMainServlet

2010-09-30 Thread Felix Meschberger
Hi, On 30.09.2010 15:43, Ian Boston wrote: On 30 Sep 2010, at 13:52, Felix Meschberger wrote: Hi, On 30.09.2010 13:16, Ian Boston wrote: On 30 Sep 2010, at 09:15, Felix Meschberger wrote: Ok, ( btw, thanks for the other pointers). The reason I want to register the filter before

Re: Filters before SlingMainServlet

2010-09-30 Thread Justin Edelson
On Thu, Sep 30, 2010 at 10:07 AM, Felix Meschberger fmesc...@gmail.com wrote: Hi, On 30.09.2010 15:43, Ian Boston wrote: On 30 Sep 2010, at 13:52, Felix Meschberger wrote: Hi, On 30.09.2010 13:16, Ian Boston wrote: On 30 Sep 2010, at 09:15, Felix Meschberger wrote: Ok, ( btw, thanks

Re: Filters before SlingMainServlet

2010-09-30 Thread Ian Boston
On 30 Sep 2010, at 15:59, Justin Edelson wrote: http://codereview.appspot.com/2333042 This looks like an elegant solution to me (ok, I am biased because it just reuses my own stuff ;-) ). +1 Thanks Regards Felix Made one nit-picky comment on the code, but otherwise +1. Would

Re: Filters before SlingMainServlet

2010-09-30 Thread Justin Edelson
On Thu, Sep 30, 2010 at 11:15 AM, Ian Boston i...@tfd.co.uk wrote: On 30 Sep 2010, at 15:59, Justin Edelson wrote: http://codereview.appspot.com/2333042 This looks like an elegant solution to me (ok, I am biased because it just reuses my own stuff ;-) ). +1 Thanks Regards Felix

Re: Filters before SlingMainServlet

2010-09-30 Thread Ian Boston
On 30 Sep 2010, at 16:20, Justin Edelson wrote: On Thu, Sep 30, 2010 at 11:15 AM, Ian Boston i...@tfd.co.uk wrote: On 30 Sep 2010, at 15:59, Justin Edelson wrote: http://codereview.appspot.com/2333042 This looks like an elegant solution to me (ok, I am biased because it just

Re: Filters before SlingMainServlet

2010-09-30 Thread Ian Boston
On 30 Sep 2010, at 16:50, Ian Boston wrote: Looking in the code most of those methods are synchronised, which feels wrong as it will make the server single threaded to read, write I can understand, but not read. I thought Jackrabbit was multithreaded on read? Do you know the reasoning

Re: Filters before SlingMainServlet

2010-09-30 Thread Ian Boston
On 30 Sep 2010, at 17:16, Ian Boston wrote: On 30 Sep 2010, at 16:50, Ian Boston wrote: Looking in the code most of those methods are synchronised, which feels wrong as it will make the server single threaded to read, write I can understand, but not read. I thought Jackrabbit was

Filters before SlingMainServlet

2010-09-29 Thread Ian Boston
Hi, Is it possible to register a filter before the SlingMainServlet ? I can register a filter via the extended http service (PAX Web WebContainer in my case) but I cant get the filter to bind to the SlingMainServlet, IIUC because I cant get hold SlingMainServlets HttpContext. For background

Re: Filters before SlingMainServlet

2010-09-29 Thread Justin Edelson
I guess there's no reason we couldn't expose the HttpContext as an OSGi service, but it seems odd that this would be necessary. It isn't with Felix's HttpService implementation - the default HttpContext is used and the filter is still invoked. Are you binding by pattern or servlet name? Justin