Ejb architecture design strategies and performance optimizations
This presentation is the property of its rightful owner.
Sponsored Links
1 / 15

EJB Architecture Design Strategies and Performance Optimizations PowerPoint PPT Presentation


  • 34 Views
  • Uploaded on
  • Presentation posted in: General

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.

Download Presentation

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.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -

Presentation Transcript


Ejb architecture design strategies and performance optimizations

EJB Architecture Design Strategies andPerformance Optimizations

James LynnHewlett-Packard Middleware Division


Agenda

EJB Patterns

Remote Object Considerations

Cost of Network and Marshalling

Controlling Cost

Session Issues

Stateful vs. Stateless

Transactioning

JTA

JTS

Agenda


Ejb pattern

EJB Pattern

App Server Host

RMI Registry

Host

J2EE Server

JNDI Naming

Service

RMI

Registry

Client Host

Client

EJB Server

DBMS Host

DBMS

EJBs


Ejb pattern details

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


Remote objects

Cost of Remote Objects

Network Latency

Marshalling

Cost Control Measures

Granularity

Partitions

Remote Objects


Session entity ejb pattern

Session/Entity EJB Pattern

App Server Host

J2EE Server

JNDI Naming

Service

DBMS

Host

Client Host

Client

EJB Server

DBMS

Session

EJBs

Entity

EJBs


Session ejb pros

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


Stateless session beans

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


Message driven ejb pattern

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


Message driven ejb pros

Allows for asynchronous message processing

Messages are processed with all the benefits of EJB

Message-Driven EJB Pros


Standalone mode ejb pattern

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


J2ee transaction platform

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


Interposition

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


Summary

Summary


Diagram key

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


  • Login