1 / 15

EJB Architecture Design Strategies and Performance Optimizations

EJB Architecture Design Strategies and Performance Optimizations. James Lynn Hewlett-Packard Middleware Division. EJB Patterns Remote Object Considerations Cost of Network and Marshalling Controlling Cost Session Issues Stateful vs. Stateless Transactioning JTA JTS. Agenda. EJB Pattern.

rendor
Télécharger la présentation

EJB Architecture Design Strategies and Performance Optimizations

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. EJB Architecture Design Strategies andPerformance Optimizations James LynnHewlett-Packard Middleware Division

  2. EJB Patterns Remote Object Considerations Cost of Network and Marshalling Controlling Cost Session Issues Stateful vs. Stateless Transactioning JTA JTS Agenda

  3. EJB Pattern App Server Host RMI Registry Host J2EE Server JNDI Naming Service RMI Registry Client Host Client EJB Server DBMS Host DBMS EJBs

  4. EJB Pattern Details Home Interface Client Host App Server Host Client J2EE Server EJB Home Stub EJB Home Skeleton EJB Home EJB Object Stub EJB Object Skeleton EJB Object EJB Remote Interface

  5. Cost of Remote Objects Network Latency Marshalling Cost Control Measures Granularity Partitions Remote Objects

  6. Session/Entity EJB Pattern App Server Host J2EE Server JNDI Naming Service DBMS Host Client Host Client EJB Server DBMS Session EJBs Entity EJBs

  7. Business logic is implemented in Session EJB instead of client Reduces network traffic Avoids redundancy among multiple similar clients Transactions among multiple Entity EJBs are handled by Session EJB, not by client Reduces likelihood of database corruption Avoids redundancy among multiple similar clients Session EJB Pros

  8. Stateful Session Beans require 1-1 correspondence May impact memory requirements Stateless Session Beans may be pooled Potentially less memory required Possible increase in cost with respect to CPU Stateless Session Beans

  9. Message-Driven EJB Pattern App Server Host J2EE Server Message- Driven EJBs DBMS Host JMS Client Host JMS Server Host EJB Server JMS Server JMS Client DBMS Session EJBs Entity EJBs

  10. Allows for asynchronous message processing Messages are processed with all the benefits of EJB Message-Driven EJB Pros

  11. Standalone Mode EJB Pattern App Server Host RMI Registry Host JNDI Naming Service RMI Registry Client Host Standalone Client HP Bluestone EJB Server DBMS Host DBMS EJBs

  12. Servlet EJB J2EE transaction platform J2EE Components • J2EE requires a JTA • Transactions can be started by • J2EE components • J2EE application client • Transactions can be propagated from one J2EE platform to other J2EE platforms JSP <tx:begin> <sql>…</sql> <sql>…</sql> </tx:begin> Resource specific api UserTransaction JTS Resource XA Wrapper JTA JTA-XAResource JTS Physical Resource

  13. Interposition No Interposition • Reduces network resources • Optimized orchestration of 2PC Machine 1 Machine 2 Client Application/Component Transaction Resource Commit prepare TS Transaction Resource commit With Interposition Machine 1 Machine 2 Client Application/Component Transaction Resource Commit TS TS prepare Transaction Resource commit

  14. Summary

  15. Diagram Key Entities (note shape) Entity Provider (note shading) Vendor-provided or generated Host computer Process Custom Java object(s) Vendor-provided You must customize Text file Type of Communication DBMS Method call Network

More Related