One day billion visits - J2EE system using the Core J2EE Pattern architecture

xiaoxiao2021-03-06  16

aims:

Through this article, learn how to use the Core J2EE Patternal J2EE application with a high degree of extended multi-layers.

Author:

Deepak alur

- Senior Software Architect, SUNPS Program

- Co-Author of Core J2EE Patterns

- Sun-eBay V3 Architecture-Team Leader

Arnold Goldberg

- Lead architect-ebay.com platform

- LED V3 Architecture, Design and Implementation

Raj Krishnamurthy

- Software Architect, SUNPS PROGRAM

- Sun-eBay V3 Architecture Team-Key Member

Agenda:

Getting Started and Core J2EE Patterns

Ebay.com's goal of three-layer architecture

Key architecture and technical decision

Ebay.com How to Apply Core J2EE Patterns

in conclusion

I, Getting Started and Core J2EE Patterns

1, goals:

- Architecture of eBay.com

- Scheme in architecture

- Benefits using Core J2EE Patterns

2, eBay introduction

(1) mission

1, global trading platform

2, auction, pricing, B2C, B2B

(2) Statistics

- 69 million registered members

- 28000 classification, 16 million items

- 2002 Years: $ 148 billion

- Global community

- 10 billion visits per day

- More than 1200 URLs

3, eBay old two-layer architecture and its existence

(1) EBAY old two-layer architecture

- Two-layer architecture integrated together (high coupling between components in the architecture)

- 33 million BST C Isapi DLL

- Functional design

- not for system Qualities

(2) Problems in the second layer architecture

- Hold commercial innovation (not enough scalability)

- As the number of visits increases, system linear scalability faces challenges (cannot be supported by only hardware inputs, the support of the expansion system)

- High maintenance cost

- Not convenient to "reconstruction" (difficult code is difficult to improve)

- Architects in Constant Fire-Fighting Mode

4, the three-layer architecture transformation began at the end of 2000

The system is transitioned to a hierarchical, loosely coupled, modular, standard-based architecture transition

5, ebay

The transformation of the architecture is based on the model described below.

Core J2EE Pattern Best Practice and Design Strategy Second Edition, Sun official website also provides Core J2EE Pattern, see

Http://java.sun.com/blueprints/corej2eepatterns/patterns/

The book introduces 21 J2EE design patterns, we can classify them to the third floor.

(1), indicating the design mode of the layer:

- Intercepting filter (x)

- Front Controller (X)

- Application Controller (X)

- Context Object (x)

View Helper

- Composite View

- Service to worker (x)

- Dispatcher View

Band (X) means that these design patterns are used in the architecture of eBay.com.

(2) Design mode of the business logic layer:

- Business delegate

- Service Locator (X)

- Session Facade- Application Service (x)

- Business Object (x)

- Composite Entity

- Transfer Object (x)

- Transfer Object Assembler (x)

- Value List Handler (x)

Band (X) means that these design patterns are used in the architecture of eBay.com.

3, integrated layer (also known as data access layer) design mode:

- Data Access Object (x)

- Service Activator

- Domain store (x)

- Web Service Broker (X)

Band (X) means that these design patterns are used in the architecture of eBay.com.

Second, the goal of eBay three-layer architecture

1, goal

High availability, high reliability, linear expansion, and establish a seamless growth of the system.

High development efficiency, support fast delivery of new features.

It can be adapted to future architectures, which should be updated in the future.

EBAY's system availability has reached 99.92% in 2002. (Amazing), add 15 major functions every quarter website,

Nearly 30,000 lines of code per week are modified, and an international version can be provided within 3 weeks.

2. In order to adapt to the future architecture, eBay uses the following practice.

J2EE mode

ONLY Adopt Technology When Required

Create New Technology As Needed

A large number of performance tests

A large amount of capacity plan

A large number of key points

Highly Redundant Operational Infrastructure and The Technology To Leverage IT

3, in order to achieve linear expansion, eBay uses the following practice:

(1) Use Server State reasonably

(2) No Server Affinity

(3) Functional Server pools.

(4) Horizontal and Vertical Database Partitioning.

The eBay architecture uses a server blocking concept. Applications on each server are related to its use case, and a part of the server in Server Pool is specifically used to log in, some servers are specifically used to display product information. After all, different USE CASE access to the database is different, such as "displaying product information" USE case is just read-only operations. And since it is read-only operation, the pressure of the database will be relatively low. I can use only several servers to assume this part of the operation, and more servers are used to read and write more use cases, which reasonably uses server resources.

Since different applications are placed on different servers, the copying problem of the user status is involved here. This is the first eBay

Reasonably use Server State

The reason, I know, eBay

The user status is only rarely saved in Session

EBAY

Put the user's status in the database and cookie

in.

4, in order to make data access linear expansion

(1) Modify our data access layer

(2) Support Support Well-Defined Data Access Patterns

RELATIONSHIPS AND TRAVERSALS

Local cache and global cache

(3) Customized O-R mapping-domain storage mode

(4) Code Generation of Persistent Objects (5) Support Lazy Loading

(6) Support FETCH SETS (ShaLLlow / Deep Fetches)

(7) Support Retrieval and Submit (READ / WRITE SETS)

5. In order to make data storage linear expansion, eBay uses the following practices.

(1) Transaction control of commercial logic

Only use bean-managed transactions

Judicious use of XA

Automatic submission of the database

(2) Routing based on content

O-R mapping is used during operation, find the correct data source

Horizontal linear expansion of databases

Failover Hosts Can Be Defined

(3) Data source management

Dynamic

Overt and Heuristic Control of Availability

If the database is down, the application can serve other requests.

6, the technique of strain in the future

(1) Message system

Between the subsystem, loose coupling between the database

J2EE's Message Driven Beans

(2) SOAP

For external developers and partners, balance our platform through available tools and best practices

Use SOAP to standardize communication within the process between the process between eBay applications

Use SOAP to meet our QoS demand

Fourth, apply J2EE's design mode to eBay

Introduced three

Use Cases

Example, "View Account", "View Product", "

ebayapi

", Introduced these three

Use Case

How to use

J2EE

Design mode implements its design.

转载请注明原文地址:https://www.9cbs.com/read-41993.html

New Post(0)