efficiently distributing component-based applications across wide-area environments d. llambiri, a....

24
Efficiently Distributing Component-Based Applications Across Wide-Area Environments D. Llambiri, A. Totok, V. Karamcheti New York University

Upload: reynold-turner

Post on 24-Dec-2015

213 views

Category:

Documents


0 download

TRANSCRIPT

Efficiently Distributing Component-Based Applications Across Wide-Area Environments

D. Llambiri, A. Totok, V. Karamcheti

New York University

Problem Setting

Two major trends in designing and deploying internet-accessible services Component middleware (J2EE, CORBA CM, .NET)

– integrated execution environment for pluggable components

– support for transactions, security, persistence, etc.

Bringing application data closer to clients– caching of static content

– web content distribution networks (Akamai)

– edge data processing (Akamai EdgeSuite, IBM WebSphere)

Is it beneficial to combine the two trends? Component middleware allows distributed deployment

Distributed Deployment ofComponent-based Applications

Provides several benefits faster client response times increased service availability replication/redeployment of “hot” components on demand

However, need to address two questions/challenges Can component-based applications benefit from distributed,

edge deployment in wide-area environments? How this distribution should be done to minimize programming

effort from the developers?

This study answers these questions Larger context: Mutable Services project

Approach of Study

Study performance of distributed deployment of prototypical component-based applications With application modifications as necessary

Target environment Java 2 Enterprise Edition (J2EE) framework Two well-known sample J2EE applications:

– Java Pet Store (SUN’s Java Enterprise BluePrints program)

– Rice University Bidding System (RUBiS)

Evaluate if applications can be efficiently distributed … without code changes?

with reusable design rules and optimizations? in a manner automatable by middleware?

NO

YES

YES

Overview

Background and methodology J2EE Java Pet Store

Design rules and optimizations Remote Façade design pattern Shared Stateful Component Caching (Read-Only Entity beans) Query Caching Asynchronous Updates

Discussion and related work Summary

Background (J2EE)

Data TierEJB TierWeb Tier

JSP

JavaServlet

RMI

StatelessSession

Bean

EntityBean

StatefulSession

Bean

EntityBean

RMI

RMI

RM

I

RM

I

Database

Database

JDBC

JDBC

Client

HTML HTTP

Client

HTMLHTTP

stateless client session state shared state

Background (Java Pet Store)

Service usage patterns: Browser: Category, Product, Item, Search Buyer: Sign In, Add to Cart, Checkout, Commit Order, Sign Out

Web Tier EJB TierEntitySession

Account

account

order orderstatus lineitem

categoryproductitem

inventory

Order

Cart

Catalog

Account

Order

Catalog

Inventory

Database

Customer

Shopping Cart

Inventory

session statestateless shared stateBrowser Buyer

Web Tier EJB TierEntitySession

Account

Order

Cart

Catalog

Account

Order

Catalog

Inventory

Customer

Shopping Cart

Inventory

session statestateless shared state

account

order orderstatus lineitem

categoryproductitem

inventory

Database

Methodology

Edge AS(JBoss)

Oracle

Edge AS(JBoss)

WAN

LAN

LAN

LAN

Main AS(JBoss)

LocalClients

RemoteClients

Centralized Application

HTTP

RemoteClient

Main Server

EJB Tier

Entity

Account

Order

Inventory

Session

ShoppingCart

Catalog

Customer

Web Tier

Account

Order

Cart

Catalog

Inventory

Database

Edge

Server

W

A

N

stateless session state shared state

0

100

200

300

400

500

600

Local Browser Local Buyer Remote Browser Remote Buyer

Se

ss

ion

av

era

ge

re

sp

on

se

tim

es

(m

s)

Centralized Application

Remote Façade

Shared Stateful Component Caching

Query Caching

Asynchronous Updates

Centralized Application (cont.)

WAN HTTP

EJB Tier EJB Tier

Entity

Account

Order

Inventory

Database

Session

ShoppingCart

Catalog

Customer

Web Tier

Account

Order

Cart

Catalog

Inventory

Session

ShoppingCart

Catalog

Customer

Web Tier

Account

Order

Cart

Catalog

Inventory

Replicating Stateless and Session Components

Main ServerEdge Server

RemoteClient

HTTP

W

A

N

stateless session state shared state

Remote Façade

Main ServerEdge Server

EJB Tier

Entity

Account

Order

Inventory

Database

Session

ShoppingCart

Catalog

Customer

Web Tier

Account

Order

Cart

Catalog

Inventory

RemoteClient

HTTP

EJB Tier

Session

ShoppingCart

Catalog

Customer

Web Tier

Account

Order

Cart

Catalog

Inventory

W

A

N

stateless session state shared state

CatalogCatalog

<<Facade>>

0

100

200

300

400

500

600

Local Browser Local Buyer Remote Browser Remote Buyer

Se

ss

ion

av

era

ge

re

sp

on

se

tim

es

(m

s)

Centralized Application

Remote Façade

Shared Stateful Component Caching

Query Caching

Asynchronous Updates

Remote Façade (cont.)

Better load distribution

Many HTTP requests can be served locally, using only session information

Why is Response Time Still High?

Main ServerEdge Server

RemoteClient

HTTP

EJB Tier

EntitySession

Web Tier

Catalog Catalog<<Facade>>

Inventory

Database

EJB Tier

Entity

Session

Web Tier

CatalogW

A

N

stateless shared state

EJB Tier

Entity

Session

Web Tier

Catalog

EJB Tier

Entity

Session

EJB Tier

EntitySession

Web Tier

Catalog Catalog<<Facade>>

InventoryInventoryRW

Shared Stateful Component Caching

Main ServerEdge Server

RemoteClient W

A

N Database

InventoryRO

Catalog<<Facade>> Inventory

RO

stateless shared statestateless RO shared RW shared

EJB Tier

EntitySession

Web Tier

Catalog Catalog<<Facade>>

InventoryInventoryRW

Shared Stateful Component Caching

Main ServerEdge Server

RemoteClient

HTTP

Database

EJB Tier

Entity

Session

Web Tier

Catalog InventoryRO

EJB Tier

Entity

Session

InventoryRO

Catalog<<Facade>>

update

W

A

N

stateless RO shared RW shared

0

100

200

300

400

500

600

Local Browser Local Buyer Remote Browser Remote Buyer

Se

ss

ion

av

era

ge

re

sp

on

se

tim

es

(m

s)

Centralized Application

Remote Façade

Shared Stateful Component Caching

Query Caching

Asynchronous Updates

Shared Stateful Component Caching (cont.)

Benefits of RO Entity beans

cachingBlocks while updates are

propagated to the edge servers

0

100

200

300

400

500

600

Local Browser Local Buyer Remote Browser Remote Buyer

Se

ss

ion

av

era

ge

re

sp

on

se

tim

es

(m

s)

Centralized Application

Remote Façade

Shared Stateful Component Caching

Query Caching

Asynchronous Updates

Query Caching

Benefits of query

caching

Local caching and better load distribution

Blocks while updates are

propagated to the edge servers

Asynchronous Updates

EJB Tier

EntitySession

Web Tier

Catalog Catalog<<Facade>>

InventoryInventoryRW

Main ServerEdge Server

RemoteClient

HTTP

Database

EJB Tier

Entity

Session

Web Tier

Catalog InventoryRO

EJB Tier

Entity

Session

InventoryRO

update

W

A

N

Catalog<<Facade>>

stateless RO shared RW shared

0

100

200

300

400

500

600

Local Browser Local Buyer Remote Browser Remote Buyer

Se

ss

ion

av

era

ge

re

sp

on

se

tim

es

(m

s)

Centralized Application

Remote Façade

Shared Stateful Component Caching

Query Caching

Asynchronous Updates

Asynchronous Updates (cont.)

Does not block on updates

Needs to access RW Entity beans on the main

server

Performance Results (RUBiS)

0

50

100

150

200

250

300

350

400

450

500

Local Browser Local Bidder Remote Browser Remote Bidder

Se

ss

ion

av

era

ge

re

sp

on

se

tim

es

(m

s)

Centralized Application

Remote Façade

Shared Stateful Component Caching

Query Caching

Asynchronous Updates

Discussion

Can functionality of proposed optimizations be automated by middleware?

Application dependent optimizations Remote Façade

– can not be automatically supported by the middleware

– enforcement: allow only façade objects to be accessed remotely (all other components use EJB 2.0 local interfaces)

Application independent optimizations Shared Stateful Component Caching (Read-Only Entity

beans), Query Caching, Asynchronous Updates– functionality can be implemented by application servers

– component behavior can be specified in the extended deployment descriptors

Related Work

EJB caching and clustering

State replication in wide-area environments (Bayou, TACT, database replication)

Application-level overlay networks (Overcast, RON)

Our approach application-independent solutions

lightweight techniques

potential for dynamic on-demand distribution and replication

Summary

Objective: Analyze/improve performance of component-based applications in WAN

Conclusions: Efficient distribution of component-based applications is feasible

Replication of stateless and stateful components

It is achieved by applying four identified reusable optimizations Which can be enforced or automated by middleware

Important to distinguish service usage patterns Improves understanding of performance and guides optimizations

Extended technical report: http://www.cs.nyu.edu/pdsg/projects/mutable-services/ (Publications)

Source code is available – send e-mail to [email protected]