ejb architecture design strategies and performance optimizations
Download
Skip this Video
Download Presentation
EJB Architecture Design Strategies and Performance Optimizations

Loading in 2 Seconds...

play fullscreen
1 / 15

EJB Architecture Design Strategies and Performance Optimizations - PowerPoint PPT Presentation


  • 70 Views
  • Uploaded on

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.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' EJB Architecture Design Strategies and Performance Optimizations' - rendor


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

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

ad