• No results found

Enterprise Applications

N/A
N/A
Protected

Academic year: 2023

Share "Enterprise Applications"

Copied!
30
0
0

Loading.... (view fulltext now)

Full text

(1)

Resource Sharing Across Users Resource Sharing Across Users

in Server Clusters in Server Clusters

Krithi Ramamritham IIT Bombay

krithi@iitb.ac.in

Optimizing and Scaling

Optimizing and Scaling

Enterprise Applications

Enterprise Applications

(2)

Enterprise (Information) Systems Enterprise (Information) Systems

• Any kind of computing system that is of "enterprise class"

– offering high quality of service

– dealing with large volumes of data

– capable of supporting a large organization -- “an enterprise“

• Enterprise Information Systems

– provide a technology platform that enables organisations to integrate and coordinate their business processes.

– provide a single system that is central to the organisation.

– ensure that information can be shared across all functional levels and management hierarchies.

– help eliminate the problem of information fragmentation caused by multiple information systems in an organisation.

(3)

• Enterprise applications are constructed using a multi-tier architecture for

simplified development and maintenance

• Considerable time and money is invested in the server infrastructure

• A significant amount of developer time is being spent to optimize Web applications

Web Server

Layer

Application Server

Layer

Database Request

Content

Optimizing and Scaling Enterprise Applications…

Optimizing and Scaling Enterprise Applications…

(4)

WS vs. AS WS vs. AS

• Web servers

– Do well defined and quantifiable local work

• e.g., processing HTTP headers, serving static content

• Application servers

– Run multi-layer programs

• e.g., scripts involving calls to backends

… …

Web Switch

Web Server Cluster

Application Server Cluster

… …

Web Switch

Web Server Cluster

Application Server Cluster

(5)

Inside the Application Layer Inside the Application Layer

3-tier model 3-tier model

PRESENTATION

BUSINESS LOGIC

DATA CONNECTOR

HTML

Objects

Row Set

• JDBC

• ODBC

• Servlets

• COM+

• EJB

• JSP

• ASP

Legacy Systems Databases

ADDT’L SERVICES

• Commerce

• Content Mgt.

• Personalization

(6)

Inside the Application Layer…

Inside the Application Layer…

PRESENTATION

BUSINESS LOGIC

DATA

CONNECTOR • JDBC• ODBC

Code

...

Block(s)

Code

...

Block(s)

Legacy Systems Databases

ADDT’L SERVICES

• Commerce

• Content Mgt.

• Personalization

1. JSP invokes a Servlet

2. Servlet contacts CMS

3. CMS requests data 4. DBMS calls

storage system

(7)

Performance and Scalability Performance and Scalability

Issues Issues

• Computationally-intensive logic executed at multiple tiers

• Cross-tier communication

• Object instantiation and cleanup processing

• External I/O calls

• Database connection pool latencies

• Content conversion and formatting

(8)

Optimizing the Application Layer Optimizing the Application Layer

Traditional Means Traditional Means

• Optimize each tier independently:

– Presentation-level caches built inside application server processes

– Main memory database employed over persistent DBMS – Persistent object storage techniques employed inside

content management systems … and so on

PRESENTATION

BUSINESS LOGIC

DATA

CONNECTOR • JDBC• ODBC

• Servlets

• COM+

• EJB

• JSP

• ASP

ADDT’L SERVICES

Local cache and optimization

code

(9)

Query result caching Query result caching

Many application server products offer this feature

-- mitigates only local database access latency

-- only a subset of query results may be reused in page generation

-- page fragments may not all be from databases

(10)

Middle tier database caching Middle tier database caching

Caching database tables in main memory Oracle 9i Cache

Main-memory databases, e.g., TimesTen

-- mitigates only database access latency

-- caching at table granularity results in poor cache utilization

-- main-memory databases are difficult to integrate

and maintain and can be expensive

(11)

Page Level Caching Page Level Caching

Dynamically generated HTML pages are cached

+

Can completely offload work from web/app server – Low reusability for highly personalized web pages – URL may not uniquely identify a page

-- increasing the risk of delivering incorrect pages – Often introduces excessive invalidations

-- e.g., even if a single element on the page changes

(12)

Optimizing the Application Layer Optimizing the Application Layer

Issues Issues

• Traditional techniques impact specific components within the application, but not the entire application

– No mitigation of component-to-component interaction latencies – Different synchronization and invalidation policies risk

data integrity

– Each optimization scheme consumes programmer time for development and maintenance

(13)

Key ideas Key ideas

• Re-use program results to eliminate redundant work

• Facilitate single-point, architecture-wide optimization

Apply to both

programmatic objects and result fragments

(14)

Optimizing the Application Layer Optimizing the Application Layer

PRESENTATION

BUSINESS LOGIC

DATA

CONNECTOR • JDBC• ODBC

• Servlets

• COM+

• EJB

• JSP

• ASP

Legacy Systems Databases

ADDT’L SERVICES

• Commerce

• Content Mgt.

• Personalization

cache

Enables the results of programs to be re-used.

(15)

Usually….

Usually….

Legacy Systems

1. JSP invokes a Servlet

PRESENTATION

BUSINESS LOGIC

DATA CONNECTOR

• JDBC

• ODBC

Code

...

Block(s)

Code

...

Block(s)

Databases

ADDT’L SERVICES

• Commerce

• Content Mgt.

• Personalization

2. Servlet contacts CMS

3. CMS requests data 4. DBMS calls

storage system

Plus, at each step there are communication delays and logic processing delays

(16)

With Our Solution…

With Our Solution…

PRESENTATION

BUSINESS LOGIC

DATA

CONNECTOR • JDBC• ODBC

Code

...

Block(s)

Code

...

Block(s)

Function Parameter(s) Result

Real-time storage engine

Tags trigger calls to the storage engine.

Can store any program output, but is most commonly an HTML fragment or a Programmatic Object.

Chutney tags

When the Result of a

Function with a specific Parameter set is already known (and up-to-

date), the work normally necessary to produce that Result is bypassed.

Appl. Programming Interface

(17)

Cache Management Cache Management

A critical aspect of any caching solution

Support novel cache management strategies:

– Prediction-based cache replacement – Observation-based cache invalidation

(18)

Cache Replacement Cache Replacement

Prediction-based replacement

⁻ fragments having lowest

probability of access replaced

Least-Likely-to-be-Used (LLU) – Access probabilities based on:

• Current user navigational patterns over site graph

(in the form of clickstreams)

• Historical user navigational patterns over site graph

(in the form of association rules)

News

Sports

Hockey

Schedules Scores

Players Teams

Site Graph

(News, Sports, Hockey) Schedules = 20%

(News, Sports, Hockey) Players = 15%

(News, Sports, Hockey) Teams = 10%

(News, Sports, Hockey) Scores = 55%

LLU

(19)

Cache Invalidation Cache Invalidation

Need to support common cache invalidation techniques:

Time-based: Each cache element assigned a TTLEvent-based: Updates to the database send an

invalidation message to the cache

On demand: Manual invalidation of selected elements

– ….

(20)

Cache Invalidation…

Cache Invalidation…

• Other invalidation techniques supported:

Observation-based

• User-initiated updates are observed in scripts;

each such update sends an invalidation message to the cache

• Most appropriate for auction sites, online trading sites

• Invalidation does not require communication with the databases

Keyword-based:

• Elements can be associated with keywords; e.g., a retailer may wish to invalidate all “seasonal”

items

Regular expression-based:

• Elements can be invalidated based on regular expression matching

(21)

Other Fragment Level Caching…

Other Fragment Level Caching…

+

can offload presentation layer tasks

– runs in the application server process space => competes for server resources

– application server cluster

=> multiple cache instances, duplication of content,

additional synchronization overhead

app servers (e.g., BEA’s WebLogic, IBM’s WebSphere) cache fragments produced by JSP scripts

Application Server Cluster

(22)

Performance Study…

Performance Study…

Test Site

– Fictitious online retail site, allows browsing of product catalog

– Pages generated using JSP scripts

– Site content stored in Oracle database

– Database schema based on Dublin Core Metadata Open Standard

– Contains 200,000 products and 44,000 categories

– Each page consists of 3 components, each involving a database call

(23)

Performance Study…

Performance Study…

Test Setup

– Content Database Server:

Oracle 8.1.6

– Web/Application Server:

WebLogic 6.0 running on cluster of 2 machines – Server machines:

have 1 GB RAM, dual P III-933 Mhz processors run Windows 2K Advanced Server

(24)

Testing Methodology...

Testing Methodology...

Baseline Parameters:

– Cache Size, i.e., percentage of fragments that fit into cache: 75%

– Cache replacement policy: LLU

User load is varied by sending requests from client machines running Radview’s WebLoad

Simulated users navigate site according to Zipf 80-20 distribution (i.e., 80% of users follow 20% of navigation links)

(25)

Performance Impact Performance Impact

80% faster response times through existing application infrastructure

Source: Fortune 100 client results

0 10 20 30 40 50 60

0 100 200 300 400 500

Number of Users

Average Response Time (seconds)

non-Chutney Chutney

(26)

Chutney Throughput Impact Chutney Throughput Impact

250% increase in transaction rates

Source: Fortune 100 client results

0 100 200 300 400 500 600 700

0 100 200 300 400 500

Number of Users

Transactions Per Second

non-Chutney Chutney

(27)

Broad Interoperability Broad Interoperability

Chutney cache Java-based

JSP, Servlets, EJB, BEA WebLogic, IBM WebSphere,

iPlanet, Broadvision, etc.

Microsoft-based ASP, COM, IIS, MS Transaction

Server, etc.

Other ColdFusion,

Perl, etc.

Multi-server, heterogeneous environments can interface with a single storage engine.

Presentation Business

Logic Data

Presentation Business

Logic Data

Presentation Business

Logic Data

(28)

Alternative: CDNs Alternative: CDNs

Sources

Repositories

Clients

Content Distribution

Networks

e.g., Akamai

Push Based Push Based

Core Infrastructure

Core Infrastructure

(29)

Request Distribution Request Distribution

within Clusters within Clusters

… …

Web Switch

ServerWeb Cluster

Application Server Cluster

… …

Web Switch

ServerWeb Cluster

Application Server Cluster

Maximizing affinity

Exploit application characteristics

(30)

Summary Summary

• Bottlenecks persist throughout multi-tier architectures

• Traditional optimization approaches focus on individual components, not the entire application

• Need a solution which optimizes every tier

of a web application, globally

References

Related documents

The cache replacement policy that supports location dependent services was early proposed by [5] ( Manhattan) .Here the replacement was based on the Manhattan distance,

By changing the cache size for single and multicore procesoors we have tried to find the optimum cache size with maximum hit rate and efficency for single core and multicore

In this research, an attempt has been made to analyze the impact of cache size on performance of multicore processors by varying L1 and L2 cache size on the multicore processor

Hammer coherence protocol used in AMD Opteron system. Hammer coherence broadcast request to bus on cache miss. If data block present on chip then requested is forwarded to

In case of cache miss(data is not present in the cache), which replacement policy is to be chosen for evicting the data is done by checking the value of N, if N equals to 0, MRU

In the data caching techniques presented in this paper, to maintain cache consistency all of them uses a weak consistency model which uses TTL (Time-To-Live)

This feature also enables location based addressing to be trivially supported with minimal overhead by using a single content word entry (cached in the content cache) that represents

We show that our transformations are effective in improving the cache behavior of STM applications by reducing the data cache miss latency by 20.15% to 37.14% and improving