Menu

#40 Scalability bottleneck for concurrent reports

1.0
closed
performance (2)
2015-02-24
2014-10-29
No

Hi Randy, we've recently come across a scalability problem in JETT related to concurrent report execution. Using some performance tracing tools we have determined the following problem:

ExcelTransformer uses ExpressionFactory. ExpressionFactory is a Singleton class which uses the JexlEngine class of org.apache.commons.jexl2

The problem itself is found in JexlEngine in the parse() method where the parser is synchronized, this is what creates the bottleneck.

We may have avoided this problem had there been a way to use a new ExpressionFactory instance as it will create a new JexlEngine.

We have no way here to extend the class as ExpressionFactory as it has only a private constructor, and no setter; it has only a getter that will return the singleton instance.

Would you be able to offer us some suggestions or even better would be to fix this and release an updated version of jett since at the moment this causes a major problem with concurrent report execution. Please help!

Thanks again Randy.

Discussion

  • Randy Gettman

    Randy Gettman - 2014-11-17

    Here are my thoughts on allowing multiple ExpressionFactorys in JETT.

    Are you using multiple ExcelTransformers in a multi-threaded environment? Is that what ultimately leads to contention when the JexlEngine's parse method is called, locking the parser?

    I could make the ExpressionFactory class no longer a singleton class but a normal factory object. Then each ExcelTransformer can own a JexlEngine. There would no longer be contention in the JexlEngine because each ExcelTransform would use its own JexlEngine.

    What do you think?

     
  • Mark Vejvoda

    Mark Vejvoda - 2014-11-24

    Yes this is what we were looking for. Please apply this fix and if possible make a new JETT release so that we can consume those changes. Very much appreciated.

    Thanks

     
  • Randy Gettman

    Randy Gettman - 2014-11-25

    Mark,

    I have checked in code for this ticket. This code removes the singleton status on ExpressionFactory. Each instance of ExcelTransformer now owns its own ExpressionFactory, which it stores in the WorkbookContext for transforming.

    This will be in the next version of JETT.

     
  • Mark Vejvoda

    Mark Vejvoda - 2014-11-25

    Thanks again randy. Any idea as to when we might expect a new release?

    Thanks

     
  • Randy Gettman

    Randy Gettman - 2014-11-25

    There are a couple more things I'd like to include in a new release, including the bug fix for Ticket 41, plus a new "ana" tag to complement the new Analytic functionality I released in jAgg 0.9.0 recently. I may or may not decide to tackle respecting Conditional Formatting, depending on how complex this turns out to be.

    I'm estimating that within 2-3 weeks I will make the next release for JETT.

    In the mean time, you are always free to check out the source code for JETT and build it yourself. Let me know if you experience any issues building JETT yourself.

     
  • Randy Gettman

    Randy Gettman - 2015-02-24

    This was included in JETT 0.9.0, which was published on December 19th, 2014.

     
  • Randy Gettman

    Randy Gettman - 2015-02-24
    • status: open --> closed
    • assigned_to: Randy Gettman
     

Log in to post a comment.