EJB 1.1, BMP, and DAO pattern vs. EJB 2.0 & CMP

Discussions

Performance and scalability: EJB 1.1, BMP, and DAO pattern vs. EJB 2.0 & CMP

  1. EJB 1.1, BMP, and DAO pattern vs. EJB 2.0 & CMP (5 messages)

    Hello all,

    Can anyone point me to any benchmark data that compares EJB 1.1 BMP with a DAO pattern against an EJB 2.0 CMP scenario?
    My reasoning is: I am at a client that has a very minimum amount of Java development experience, almost ZERO J2EE experience (aside from reading a book or two), mediocre public facing hardware (qty. 1 - Sun 450, single processor w/ 2gig ram server), and a very very good WebLogic salesperson (sold them WLS, WLIntegration, and WLPortal servers). Enter my project team.

    We have two options: Add complexity (BMP and DAO) but keep performance at a manageable level at the cost of additional complexity
    - or -
    Keep it extra simple (EJB2.0 CMP only) but have a potential resource and performance nightmare.

    I have two overall goals; when my team leaves, the client MUST be able to: Write new applications without consultant assistance, and maintain the system as it was deployed.

    Again, does anyone (or can they point me to any) have any benchmark data that can help me make one decision over the other?

    Thanks in advance!
  2. I doubt any of the WebLogic developers working in the trench like you and me has time to collect such benchmark data, although it is extremely important to have that info. BEA should provide us with such data but so far I haven't seen any. I just trust the words from Tyler Jewell et al. that EJB 2.0 CMP is more performant than BMP + DAO (without the Fat Key pattern). So if I were you I would go the CMP route. However, I do remember a post in this forum a few weeks ago saying a French IT magazine concluded the performance of CMP and container-managed relationships in WebLogic is very poor (https://theserverside.com/discussion/thread.jsp?thread_id=12583). Maybe WebLogic 7.0 will improve on that.
  3. Doesn't the fact that we don't see any bench mark data tell something????? I'm in J2EE for around 2 years now, but I'm yet to see such data...
  4. Even if you do get performance data, its not likely you will get it for that hardware configuration and for your specific load conditions....which means it will not be useful to you...(I can elaborate if you like, but I think you get the point)

    Instead evaluate the potential of having a "performance nightmare" (which by the way you could end up with either way)...number of users....no of instances of Entity Beans likely at peak load...estimated complexity of the domain model (for ejb links)....etc. Using some approximations then create test conditions both ways.

    I guess this will end up "costing" the client more...but it will be your turn to do a sales job ! (try not to be upset with sales guys...they are the reason we get more work :-)

    If you do not have the time do this, I would go with "Keep it extra simple (EJB2.0 CMP only)" in the interest of TCO (its usually cheaper to upgrade hardware than people...sorry to give you a true "management" approach). By the way I suspect you will find that the performance curves vary by load with BMP & DAO faring better at very low load and CMP faring better at higher loads...

    If you do find data, let us all know.
  5. I have performed extensive testing of BMP vs CMP within Weblogic on a variety of hardware and os configurations using Oracle. I can't share the raw data but I can recommend one of the best features of EJB 2.0, the ability to use local interfaces. Try to avoid the remote interfaces if possible.

    If you use the session/entity and value holder patterns you should not need remote interfaces for your entity beans. Using this feature/patterns will give you better performance and faster implementation.

    Rob
  6. Using local interfaces and session facade should be a no-brainer, but the real question is should we use CMP with container-managed relationship or the BMP with DAO strategy.