tapestry-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leonardo Uribe <lu4...@gmail.com>
Subject Re: [cross-community] benchmarks : simple application throws exception under jmeter tests
Date Thu, 06 Sep 2012 01:35:17 GMT
Hi

It seems there reply was not sent to dev list. Here it is:

2012/9/5 Thiago H de Paula Figueiredo <thiagohp@gmail.com>:
> On Wed, 05 Sep 2012 16:45:33 -0300, Leonardo Uribe <lu4242@gmail.com> wrote:
>
>> Hi
>
>
> Hi!
>
>>
>> For some time, I have been working on create a fair and accurate
>> comparison between different web frameworks.
>>
>> I have been trying to update a tapestry simple booking demo app to
>> version 5.3.5 (it was written originally for 5.1.0.5). It is located
>> here:
>>
>>
>> https://github.com/lu4242/performance-comparison-java-web-frameworks/tree/master/perfbench-code/tapestry-jpa
>
>
> You're doing something in
> https://github.com/lu4242/performance-comparison-java-web-frameworks/blob/master/perfbench-code/tapestry-jpa/src/main/java/tapestryjpa/web/BookingSession.java
> which someone with more Tapestry experience would never do: stuff a list of
> objects from the database in the session. I'll try to do a push request in
> the weekend with changes to make the code look more Tapestry-like. That's my
> guess on why Tapestry, which doesn't store render state in the session, uses
> roughly the same amount of memory as Wicket, which does store render state
> in the session, in this comparison:
> http://ptrthomas.wordpress.com/2009/09/14/perfbench-update-tapestry-5-and-grails/
>

The code comes from that blog, but my objective is do the comparison
in the right way. In theory, it is better to keep the business model
the same, even if is not optimal. In that way, the only thing that
changes is the one related to the framework. Anyway, it sounds better
to fix that part, to reflect the way people using Tapestry use to do
it.

Any suggestion or improvement you can do will be a big help. Thanks a lot.

>> 1. Is the exception a known problem? How to solve it? I already tried
>> set tapestry.gzip-compression-enabled to false and it does not work.
>> 2. Does anybody know which flags or config params needs to be enabled
>> for optimal performance?
>
>
> Basically, tapestry.production-mode = true should suffice.
>

Ok, good to know that.

>> 3. Does anybody know how to do server side validation over one field +
>> ajax? the example does not have that part, and unfortunately I don't
>> know how to do it properly (the idea is compare how ajax performs for
>> each framework).
>
>
> Does it need to be field per field or can it be whole form at once? If the
> latter, just use an AJAX form submission. If not, we need to create a custom
> event with ComponentResources.createEventLink() and invoke it using a little
> bit of JavaScript.
>

It is necessary the validation for only two fields (BookPage.tml
 "Credit Card #:" and "Credit Card Name:". This is how is done with JSF 2:

      <div class="entry">
        <div class="label"><h:outputLabel id="CreditCardLabel"
for="creditCard">Credit Card #:</h:outputLabel></div>
        <div class="input">
          <h:panelGroup id="creditCardDecorate">
            <h:inputText id="creditCard"
value="#{hotelBooking.booking.creditCard}" required="true">
              <f:ajax event="blur" render="creditCardDecorate"/>
            </h:inputText>
            <h:panelGroup layout="block">
              <h:message for="creditCard" errorClass="errors"/>
            </h:panelGroup>
          </h:panelGroup>
        </div>
      </div>

The idea is an outer panel (creditCardDecorate) that is rendered using
ajax when some text is entered in the input field and the onblur event
is activated (the input text loses focus). The visible effect is if
there is a validation error, a new message is added below the input
text.

In few words the idea is just do server side validation over one field
and update the result using ajax. It does not matter if the update is
for all the field including the message (preferred), or just for the
message box, the effect should be the same. The idea is see how the
framework is able to deal with ajax.

Really my understanding of Tapestry is very poor, so I don't really
know how to do it properly. Any help in this part will be most
welcome.

best regards,

Leonardo Uribe


2012/9/5 Leonardo Uribe <lu4242@gmail.com>:
> Hi
>
> For some time, I have been working on create a fair and accurate
> comparison between different web frameworks.
>
> I have been trying to update a tapestry simple booking demo app to
> version 5.3.5 (it was written originally for 5.1.0.5). It is located
> here:
>
> https://github.com/lu4242/performance-comparison-java-web-frameworks/tree/master/perfbench-code/tapestry-jpa
>
> To test how it works under concurrency, I created a proper jmeter test
> case here:
>
> https://github.com/lu4242/performance-comparison-java-web-frameworks/blob/master/perfbench-code/tapestry-jpa/src/test/jmeter/booking-jmeter-direct.jmx
>
> If you run the app manually it works correctly. The problem starts
> when you try it under an specific load.
>
> At start it works fine, but after some time (30 seconds more or less,
> in a periodic fashion), an exception is thrown (see it at the end of
> the mail).
>
> Here are my questions:
>
> 1. Is the exception a known problem? How to solve it? I already tried
> set tapestry.gzip-compression-enabled to false and it does not work.
> 2. Does anybody know which flags or config params needs to be enabled
> for optimal performance?
> 3. Does anybody know how to do server side validation over one field +
> ajax? the example does not have that part, and unfortunately I don't
> know how to do it properly (the idea is compare how ajax performs for
> each framework).
>
> Suggestions are most welcome.
>
> regards,
>
> Leonardo Uribe
>
> org.apache.tapestry5.ioc.internal.OperationException: For input
> string: "" [at context:BookPage.tml, line 32]
>         at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121)
>         at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88)
>         at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
>         at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
>         at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146)
>         at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1053)
>         at org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:81)
>         at org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
>         at $ComponentEventRequestHandler_d8469a0713c.handle(Unknown Source)
>         at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
>         at $ComponentEventRequestHandler_d8469a0713c.handle(Unknown Source)
>         at org.apache.tapestry5.services.TapestryModule$41.handle(TapestryModule.java:2472)
>         at $ComponentEventRequestHandler_d8469a0713c.handle(Unknown Source)
>         at $ComponentEventRequestHandler_d8469a0707e.handle(Unknown Source)
>         at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
>         at org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39)
>         at $ComponentRequestHandler_d8469a07080.handleComponentEvent(Unknown
> Source)
>         at $ComponentRequestHandler_d8469a07046.handleComponentEvent(Unknown
> Source)
>         at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46)
>         at $Dispatcher_d8469a0704a.dispatch(Unknown Source)
>         at $Dispatcher_d8469a07043.dispatch(Unknown Source)
>         at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302)
>         at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
>         at $RequestHandler_d8469a07044.service(Unknown Source)
>         at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902)
>         at $RequestHandler_d8469a07044.service(Unknown Source)
>         at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892)
>         at $RequestHandler_d8469a07044.service(Unknown Source)
>         at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
>         at $RequestHandler_d8469a07044.service(Unknown Source)
>         at $RequestHandler_d8469a0703c.service(Unknown Source)
>         at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253)
>         at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
>         at $HttpServletRequestFilter_d8469a0703a.service(Unknown Source)
>         at $HttpServletRequestHandler_d8469a0703e.service(Unknown Source)
>         at org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852)
>         at $HttpServletRequestHandler_d8469a0703e.service(Unknown Source)
>         at $HttpServletRequestHandler_d8469a07039.service(Unknown Source)
>         at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
>         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
>         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
>         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: org.apache.tapestry5.runtime.ComponentEventException: For
> input string: "" [at context:BookPage.tml, line 32]
>         at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1136)
>         at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3100(ComponentPageElementImpl.java:61)
>         at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1057)
>         at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1054)
>         at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
>         ... 52 more
> Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
> For input string: "" [at context:BookPage.tml, line 39]
>         at org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:672)
>         at org.apache.tapestry5.corelib.components.Form.advised$onAction_d8469a070a9(Form.java:522)
>         at org.apache.tapestry5.corelib.components.Form$Invocation_onAction_d8469a070a8.proceedToAdvisedMethod(Unknown
> Source)
>         at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84)
>         at org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37)
>         at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
>         at org.apache.tapestry5.corelib.components.Form.onAction(Form.java)
>         at org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java)
>         at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:927)
>         at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1112)
>         ... 56 more
> Caused by: java.lang.NumberFormatException: For input string: ""
>         at java.lang.NumberFormatException.forInputString(NumberFormatException.java:48)
>         at java.lang.Long.parseLong(Long.java:431)
>         at java.lang.Long.parseLong(Long.java:468)
>         at java.text.DigitList.getLong(DigitList.java:177)
>         at java.text.DecimalFormat.parse(DecimalFormat.java:1297)
>         at java.text.SimpleDateFormat.subParse(SimpleDateFormat.java:1590)
>         at java.text.SimpleDateFormat.parse(SimpleDateFormat.java:1311)
>         at java.text.DateFormat.parse(DateFormat.java:335)
>         at org.apache.tapestry5.corelib.components.DateField.processSubmission(DateField.java:277)
>         at org.apache.tapestry5.corelib.base.AbstractField.processSubmission(AbstractField.java:193)
>         at org.apache.tapestry5.corelib.base.AbstractField.access$100(AbstractField.java:37)
>         at org.apache.tapestry5.corelib.base.AbstractField$ProcessSubmission.execute(AbstractField.java:95)
>         at org.apache.tapestry5.corelib.base.AbstractField$ProcessSubmission.execute(AbstractField.java:89)
>         at org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:661)
>         ... 65 more
> [http-bio-8080-exec-31] ERROR [org.apache.tapestry5.ioc.Registry]
> java.io.IOException: Not in GZIP format
> [http-bio-8080-exec-31] ERROR [org.apache.tapestry5.ioc.Registry]
> Operations trace:
> [http-bio-8080-exec-31] ERROR [org.apache.tapestry5.ioc.Registry] [ 1]
> Triggering event 'action' on ConfirmPage:form
> [http-bio-8080-exec-31] ERROR
> [org.apache.tapestry5.services.TapestryModule.RequestExceptionHandler]
> Processing of request failed with uncaught exception:
> java.io.IOException: Not in GZIP format
> org.apache.tapestry5.ioc.internal.OperationException:
> java.io.IOException: Not in GZIP format [at context:ConfirmPage.tml,
> line 44]
>         at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.logAndRethrow(OperationTrackerImpl.java:121)
>         at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:88)
>         at org.apache.tapestry5.ioc.internal.PerThreadOperationTracker.invoke(PerThreadOperationTracker.java:87)
>         at org.apache.tapestry5.ioc.internal.RegistryImpl.invoke(RegistryImpl.java:1124)
>         at org.apache.tapestry5.internal.structure.ComponentPageElementResourcesImpl.invoke(ComponentPageElementResourcesImpl.java:146)
>         at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.triggerContextEvent(ComponentPageElementImpl.java:1053)
>         at org.apache.tapestry5.internal.services.ComponentEventRequestHandlerImpl.handle(ComponentEventRequestHandlerImpl.java:81)
>         at org.apache.tapestry5.internal.services.ImmediateActionRenderResponseFilter.handle(ImmediateActionRenderResponseFilter.java:42)
>         at $ComponentEventRequestHandler_d8469a0713c.handle(Unknown Source)
>         at org.apache.tapestry5.internal.services.AjaxFilter.handle(AjaxFilter.java:42)
>         at $ComponentEventRequestHandler_d8469a0713c.handle(Unknown Source)
>         at org.apache.tapestry5.services.TapestryModule$41.handle(TapestryModule.java:2472)
>         at $ComponentEventRequestHandler_d8469a0713c.handle(Unknown Source)
>         at $ComponentEventRequestHandler_d8469a0707e.handle(Unknown Source)
>         at org.apache.tapestry5.internal.services.ComponentRequestHandlerTerminator.handleComponentEvent(ComponentRequestHandlerTerminator.java:43)
>         at org.apache.tapestry5.services.InitializeActivePageName.handleComponentEvent(InitializeActivePageName.java:39)
>         at $ComponentRequestHandler_d8469a07080.handleComponentEvent(Unknown
> Source)
>         at $ComponentRequestHandler_d8469a07046.handleComponentEvent(Unknown
> Source)
>         at org.apache.tapestry5.internal.services.ComponentEventDispatcher.dispatch(ComponentEventDispatcher.java:46)
>         at $Dispatcher_d8469a0704a.dispatch(Unknown Source)
>         at $Dispatcher_d8469a07043.dispatch(Unknown Source)
>         at org.apache.tapestry5.services.TapestryModule$RequestHandlerTerminator.service(TapestryModule.java:302)
>         at org.apache.tapestry5.internal.services.RequestErrorFilter.service(RequestErrorFilter.java:26)
>         at $RequestHandler_d8469a07044.service(Unknown Source)
>         at org.apache.tapestry5.services.TapestryModule$3.service(TapestryModule.java:902)
>         at $RequestHandler_d8469a07044.service(Unknown Source)
>         at org.apache.tapestry5.services.TapestryModule$2.service(TapestryModule.java:892)
>         at $RequestHandler_d8469a07044.service(Unknown Source)
>         at org.apache.tapestry5.internal.services.StaticFilesFilter.service(StaticFilesFilter.java:90)
>         at $RequestHandler_d8469a07044.service(Unknown Source)
>         at $RequestHandler_d8469a0703c.service(Unknown Source)
>         at org.apache.tapestry5.services.TapestryModule$HttpServletRequestHandlerTerminator.service(TapestryModule.java:253)
>         at org.apache.tapestry5.internal.services.IgnoredPathsFilter.service(IgnoredPathsFilter.java:62)
>         at $HttpServletRequestFilter_d8469a0703a.service(Unknown Source)
>         at $HttpServletRequestHandler_d8469a0703e.service(Unknown Source)
>         at org.apache.tapestry5.services.TapestryModule$1.service(TapestryModule.java:852)
>         at $HttpServletRequestHandler_d8469a0703e.service(Unknown Source)
>         at $HttpServletRequestHandler_d8469a07039.service(Unknown Source)
>         at org.apache.tapestry5.TapestryFilter.doFilter(TapestryFilter.java:171)
>         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:243)
>         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)
>         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)
>         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:169)
>         at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:472)
>         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)
>         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:98)
>         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
>         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:407)
>         at org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:987)
>         at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:579)
>         at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:309)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
>         at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
>         at java.lang.Thread.run(Thread.java:662)
> Caused by: org.apache.tapestry5.runtime.ComponentEventException:
> java.io.IOException: Not in GZIP format [at context:ConfirmPage.tml,
> line 44]
>         at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1136)
>         at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.access$3100(ComponentPageElementImpl.java:61)
>         at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1057)
>         at org.apache.tapestry5.internal.structure.ComponentPageElementImpl$5.invoke(ComponentPageElementImpl.java:1054)
>         at org.apache.tapestry5.ioc.internal.OperationTrackerImpl.invoke(OperationTrackerImpl.java:74)
>         ... 52 more
> Caused by: org.apache.tapestry5.ioc.internal.util.TapestryException:
> java.io.IOException: Not in GZIP format
>         at org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:672)
>         at org.apache.tapestry5.corelib.components.Form.advised$onAction_d8469a070a9(Form.java:522)
>         at org.apache.tapestry5.corelib.components.Form$Invocation_onAction_d8469a070a8.proceedToAdvisedMethod(Unknown
> Source)
>         at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:84)
>         at org.apache.tapestry5.ioc.internal.services.LoggingAdvice.advise(LoggingAdvice.java:37)
>         at org.apache.tapestry5.internal.plastic.AbstractMethodInvocation.proceed(AbstractMethodInvocation.java:86)
>         at org.apache.tapestry5.corelib.components.Form.onAction(Form.java)
>         at org.apache.tapestry5.corelib.components.Form.dispatchComponentEvent(Form.java)
>         at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.dispatchEvent(ComponentPageElementImpl.java:927)
>         at org.apache.tapestry5.internal.structure.ComponentPageElementImpl.processEventTriggering(ComponentPageElementImpl.java:1112)
>         ... 56 more
> Caused by: java.lang.RuntimeException: java.io.IOException: Not in GZIP format
>         at org.apache.tapestry5.internal.services.ClientDataEncoderImpl.decodeClientData(ClientDataEncoderImpl.java:62)
>         at $ClientDataEncoder_d8469a070a7.decodeClientData(Unknown Source)
>         at org.apache.tapestry5.corelib.components.Form.executeStoredActions(Form.java:650)
>         ... 65 more
> Caused by: java.io.IOException: Not in GZIP format
>         at java.util.zip.GZIPInputStream.readHeader(GZIPInputStream.java:141)
>         at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:56)
>         at java.util.zip.GZIPInputStream.<init>(GZIPInputStream.java:65)
>         at org.apache.tapestry5.internal.services.ClientDataEncoderImpl.decodeClientData(ClientDataEncoderImpl.java:55)
>         ... 67 more

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tapestry.apache.org
For additional commands, e-mail: dev-help@tapestry.apache.org


Mime
View raw message