Performance and scalability: performance EJBHomeFactory

  1. performance EJBHomeFactory (4 messages)


    is there a standard way to test the influence of patterns?

    Let's say i want to measure the effect of the cache of a EJBHomeFactory?

    What would be the results?
    Would it be interesting to spend time at measuring?
    Or do you think it's totally unnecisarry?



    Threaded Messages (4)

  2. performance EJBHomeFactory[ Go to top ]

    I think it is unnecessary to measure a pattern because; patterns are best practice solutions for common problems. Pattern is a proven solution in industry. Spending time on measuring patterns is like re-inventing a wheel.

  3. performance EJBHomeFactory[ Go to top ]

    Just because the "Factory Pattern" is a pattern doesn't mean that it is applicable in a particular situation, that it is implemented correctly, or, even if both of the above are true, that a more efficient paradigm (which may not be a "common" pattern) may be a better alternative.

    Patterns are abstractions so that programmers can easily understand what other programmers are talking about. For example, when I say, "this is a factory pattern" my colleagues immediately know what I mean and can make some assumptions. But it does not mean that the best solution for what I am attempting to do is a factory pattern.

    Indeed, an argument can be made that since patterns are so generic, by definition they (rarely) completely solve the problem, and therefore pure patterns should not be used very often.

    None of the above has any bearing on how to test the performance for an EJBHomeFactory. :) Personally, with any cacheing algorithm, I think you need to test with or with out the cache. Depending on how often you use the thing, a cache might not make sense!

  4. not a waste of time[ Go to top ]

    I think it is a good idea to test patterns for their actual performance in a given situation rather than accepting it with blind faith.
    I am not questioning the statement that patterns provide a 'best practice' solution for a problem - my doubts are in their application. The real work lies in analyzing the problem correctly and applying the correct pattern!

    Understanding how a pattern works actually helps me in justifying the use of a particular pattern.
  5. performance EJBHomeFactory[ Go to top ]

    Because patterns are a generic solution to common problems they will in most cases not be the most performant solution to your specific problem. And you can always decide what is more important to you: readable code (including patterns) or best performance (which can not always be combined with good design).

    Kind regards,