37
1 Java在企业级开发中的应用 Xin Sheng Mao / 毛新生 CTO, 学院 IBM 中国 中心 开发 [email protected]

Ibm Java在企业级开发中的应用

Embed Size (px)

Citation preview

Page 1: Ibm Java在企业级开发中的应用

1

Java在企业级开发中的应用

Xin Sheng Mao / 毛新生CTO, 新 技 学院兴 术

IBM 中国 中心开发

[email protected]

Page 2: Ibm Java在企业级开发中的应用

主要内容

• IBM 的企业级Java应用平台• 将 Web 2.0 引入 Java 平台• 支持云计算

Page 3: Ibm Java在企业级开发中的应用

企业级Java应用的发展趋势

企业级Java应用的发展趋势:• Time to value• Business agility• Efficiency• Higher level of performance, reliability, availability,

security, scalability and manageability

CIO的思考:• How to meet these trends• How to adopt new technologies including SOA, web 2.0,

Cloud Computing

Page 4: Ibm Java在企业级开发中的应用

IBM企业级Java应用平台技术战略

SOA Agility to Extremes• SOA for Business Users

– Alignment of Business and IT by empowering the Business user with a set of rich, web-based business tools

• Agility – Built-for-purpose middleware that radically improves time to

value– Clouds, SaaS, REST, Scripting

• Extreme Transaction Processing

Page 5: Ibm Java在企业级开发中的应用

Interaction Services Information Services

Partner Services Business App Services Access Services

DevelopmentServices

Management Services

Infrastructure Services

Enables collaboration between people, processes

& information

Manages diverse data and content in a unified

manner

Connect with trading partners

Build on a robust, scaleable, and secure services environment

Facilitate interactions with existing information and

application assets

Integrated environment

for design and creation of

solution assets

Manage and secure

services, applications &

resources

Optimizes throughput, availability and utilization

App

s &

In

fo A

sset

s

Process Services

Business ServicesSupports enterprise business process and

goals through businesses functional service

Enterprise Service Bus

Orchestrate and automate business processes

IBM Java 企业应用平台

Applications servers are for building & running applications

Page 6: Ibm Java在企业级开发中的应用

全面支持 Java 技术规范和标准

Major Change Enhancement No Change

展展展展展展现现现现现现

业业业业业业务务务务务务逻逻逻逻逻逻辑辑辑辑辑辑& 集集集集集集成成成成成成

数数数数数数据据据据据据访访访访访访问问问问问问

管管管管管管理理理理理理

安安安安安安全全全全全全

Java EE 5 Jave SE 6

EJB3.0

Web ServiceStandards

Portlet JSR 286

SpringCertified

JPA

Servlet 2.5

JDBC 4.0

JMS 1.1

SCA/SDO JCA 1.5

JNDI

JMX 1.2

Security

Web Service Security

JSP 2.1

工工工工工工具具具具具具

RAD

Feature Packs Caching Workload Management & HA

• Simplification of the programming model with EJB 3.0 and JPA 1.0• Improved developer productivity with Java SE 6• Improves programmer productivity with RAD for WebSphere • Simplify the adoption of new standards with Feature Packs

Page 7: Ibm Java在企业级开发中的应用

构建高性能、可扩展的企业应用

Page 8: Ibm Java在企业级开发中的应用

大量企业级Java应用要求Java平台可靠和高性能

On an Average Day of eBay (as of 2004) Business Growth

Tran

sact

ions

per

day

2004 2009

Page 9: Ibm Java在企业级开发中的应用

大量企业级Java应用要求Java平台可靠和高性能(续)

App Data

LoadBalancerBackup

Node Agent

WebSphere Application Server Node

Deployment Manager

IBM HTTPServer

IBM HTTPServer

LoadBalancer

Web Container EJB Container

Web Container EJB Container

App Server

App Server

Web Container EJB Container

Web Container EJB Container

App Server

App Server

Node Agent

Application Server Clusters

WebSphere Application Server Node

DB Server

DB Server

DB ClusterWeb Server Cluster

超过99.9%的网站可用性• 0.1x秒响应速度及高呑吐量• 强大的水平及垂直扩展能力,

可以支持未来的业务增长

对Java应用平台的要求: 全面支持 Java 技术规范及其标准 安全

高性能

高可靠性

高可用性

高可扩展性WebSphere XDObject Cache

Page 10: Ibm Java在企业级开发中的应用

WebSphere Application Server

Network Deployment

Capabilities

CustomerNeeds

Built on common WebSphere code

Built on open source technology

Reduced acquisition

costs; Small

footprint..

Ultimate scalability & performance; functional

depth & breadth

Fast deployment

Manage CEwith WS VE forgreater QoS &central admin…

High Qualities of Service

From Basic Application Server to Advanced Servers

WebSphere Virtual Enterprise

WebSphere Application Server for zOS

…or, migrate to WAS / ND forgreater QoS & performance – Migration tools & docs make migration easier…

…or, both:Choose the rightexecution environmentfor the job, and manageyour heterogeneousenvironment with WS VE.

For lightweight, departmental applications

WebSphere Application Server

– Express

WebSphereApplication Server

WebSphere Application Server Community

Edition

Page 11: Ibm Java在企业级开发中的应用

Service Level Management• Pooled resources • Prioritized workloads using service policies

Applications Application Resources

Health Management• Application performance monitoring• Prevent outages by taking corrective action for common

server health problems

Application Edition Management• Interruption-free deployment of new application versions• Intelligent routing to application versions in production

Key Capabilities for High Performance, High Availability and High Scalability (By WebSphere VE)

InformationResources

Server Consolidation• Dynamic workload adjustment

Page 12: Ibm Java在企业级开发中的应用
Page 13: Ibm Java在企业级开发中的应用

通过 SOA 支持业务敏捷性

Page 14: Ibm Java在企业级开发中的应用

Interaction Services Information Services

Partner Services Business App Services Access Services

DevelopmentServices

Management Services

Infrastructure Services

Enables collaboration between people, processes

& information

Manages diverse data and content in a unified

manner

Connect with trading partners

Build on a robust, scaleable, and secure services environment

Facilitate interactions with existing information and

application assets

Integrated environment

for design and creation of

solution assets

Manage and secure

services, applications &

resources

Optimizes throughput, availability and utilization

App

s &

In

fo A

sset

s

Process Services

Business ServicesSupports enterprise business process and

goals through businesses functional service

Enterprise Service Bus

Orchestrate and automate business processes

Business Agility Through SOA Foundation

Web Service standardsSCA / SDO

BPELService RepositoryBusiness Rules

Human Activity

IntegrateModernization

IntegrateBeyond Enterprise

BPM

Middleware Virtualization

Page 15: Ibm Java在企业级开发中的应用

SOA Foundation:Runtime, Tools and Methodology

WebSphere Business ModelerRational Software Architect (RSA)Rational RequisiteProWebSphere Studio Asset Analyzer (WSAA)Industry Models: eTOM, IAA, IFWSOMA-ME***

WebSphere Service Registry and Repository (WSRR)Rational Asset Manager (RAM)RUP for SOA (inside Rational Method Composer)SIMM**CBM**SOMA**GS Method**WHITE = IBM Products

** Yellow = Methods used by Services*** Red = Tools used by Services

Rational Application Developer (RAD)WebSphere Integration Developer (WID)Rational Testing Suite

ITCAM for SOAITCAM for WebSphereTivoli Access Manager (TAM)Tivoli Federated Identity Manager (TFIM)OMEGAMON

WebSphere Enterprise Service Bus (WESB)WebSphere Message BrokerDataPower XS40WebSphere Adapters

Page 16: Ibm Java在企业级开发中的应用

Where Business Rules Typically Exist

Applications

ProcessesPeople

Documents

实现简便、快速、可靠的业务改变-ILog BRMS (业务规则管理系统)

Business Rule Management System

Rules are Defined,

Analyzed and Maintained

Rules are Deployed,

Executed and Monitored

Rules are Stored and

Shared

User Tools

Rule Server

Rule Repository

Rules+

Metadata

Page 17: Ibm Java在企业级开发中的应用

© Copyright IBM Corporation 2005

North AP Business Partner Technical Strategy and Enablement

17

集集集集集集装装装装装装箱箱箱箱箱箱管管管管管管理理理理理理业业业业业业务务务务务务环环环环环环境境境境境境

集集集集集集装装装装装装箱箱箱箱箱箱管管管管管管理理理理理理业业业业业业务务务务务务1、、、、、、设设设设设设备备备备备备交交交交交交接接接接接接单单单单单单管管管管管管理理理理理理(IEIR,国国国国国国内内内内内内和和和和和和香香香香香香港港港港港港)2、、、、、、集集集集集集装装装装装装箱箱箱箱箱箱堆堆堆堆堆堆存存存存存存费费费费费费管管管管管管理理理理理理(ESDS,全全全全全全球球球球球球)3、、、、、、集集集集集集装装装装装装箱箱箱箱箱箱滞滞滞滞滞滞期期期期期期费费费费费费管管管管管管理理理理理理(IDDS,全全全全全全球球球球球球) 4、、、、、、集集集集集集装装装装装装箱箱箱箱箱箱动动动动动动态态态态态态管管管管管管理理理理理理(IEIS/IEM,全全全全全全球球球球球球)5、、、、、、修修修修修修箱箱箱箱箱箱审审审审审审批批批批批批管管管管管管理理理理理理(MNR,全全全全全全球球球球球球)6、、、、、、外外外外外外围围围围围围系系系系系系统统统统统统(佣佣佣佣佣佣金金金金金金/支支支支支支票票票票票票等等等等等等,CBA/SCBA/CPA/etc)

航航航航航航运运运运运运物物物物物物流流流流流流业业业业业业务务务务务务的的的的的的核核核核核核心心心心心心组组组组组组成成成成成成

货货货货货货物物物物物物

船船船船船船舶舶舶舶舶舶

集集集集集集装装装装装装箱箱箱箱箱箱

Page 18: Ibm Java在企业级开发中的应用

© Copyright IBM Corporation 2005

North AP Business Partner Technical Strategy and Enablement

18

箱箱箱箱箱箱管管管管管管平平平平平平台台台台台台架架架架架架构构构构构构 – IT概概概概概概念念念念念念视视视视视视图图图图图图(产产产产产产品品品品品品映映映映映映射射射射射射)

Rich Client Portal 开放网络环境

HTTPServer

WPS

IBM MQ

iLog

WSRRLDAP Server

CSSSybase

EMP DBSybase

IRIS2

JDBC

Web Services

EDI

MQ

EB

XML/HTTP

WPS/LDAP DBDB2

JDBC JDBC

展现层 网络 DMZ 箱管系统 后台系统

外网用户

内网用户

GZIPESB Built-in

Page 19: Ibm Java在企业级开发中的应用

采用Web 2.0技术:快速、简单地开发与部署应用

Page 20: Ibm Java在企业级开发中的应用

Web 2.0 and RESTful SOA

Simple to use Simple to access

AJAX•Highly Interactive•Browser invoked services

JSON / XML / ATOM •Information exchange•JavaScript Friendly

REST•Easily invoked•HTTP-Centric Patterns

Page 21: Ibm Java在企业级开发中的应用

Web 2.0 Support

Ajax Messaging For connecting Ajax clients to real-time updated data like stock quotes or instant messaging.

Ajax Application

IBM $125.25 +$2.50… MSFT $43.75 -$1.50 …

Ajax Development ToolkitBased on Dojo (dojotoolkit.org) with IBM extensions. Reduces time to market and helps lower Ajax adoption costs.

EJBs POJOsSOA

Ajax Proxy

WebSphereApplication Server

ServiceBus (JMS)

Web 2.0 to SOA ConnectivityFor enabling connectivity from Ajax clients to SOA services and other JEE assets. Extends enterprise data to customers and partners through web feeds.

Web Feeds

Event-Driven DataExternal Web Services

Page 22: Ibm Java在企业级开发中的应用

RESTful SOA: One of IBM WebSphere key Strategies

Product Description

CICS (v3.1/3.2) • ATOM/REST support pack• PHP support pack enabling sMash-style

REST enablement

Application Server (v6.0 and beyond) Feature Pack for Web 2.0

Community Edition Feature Pack for Web 2.0

Process Server/ Enterprise Service Bus (v6.1 and beyond)

• JSON/ATOM support• SCA HTTP Imports/Exports,

• REST enablement of platform (key performance indicators, Human Task

Management, etc…)

sMashREST development platform

Business Monitor (v6.1 and beyond) REST-enabled dashboard of business processes

Service Registry and Repository (v6.1) REST exposure of resources

Message Broker (v6.1.0.2) Inbound/outbound REST support and XML processing

MQ (v7.0) HTTP Bridge – REST APIs exposing queues/topics

Commerce JSP tags exposing resources RESTfully

DataPow er HTTP Verbs and XSLT processing

• RESTful SOA Strategy– REST enabling WebSphere Portfolio – Enable Agile Applications

• sMash, Business Space

– Enable Web-based Hosting• Middle-ware as a Service

• WebSPhere sMash Strategy – Embed in products including

CICS, WMB and Rainmaker– Web-based Developer Tools

(Forms applications)– Partner enabling

REST enabled WebSphere Portfolio

Page 23: Ibm Java在企业级开发中的应用

Sample: Rapidly Expose Data RESTfullyEnable Developers With A Simple Programmatic And HTTP Data API

Access REST resource Access REST resource through AJAXthrough AJAX

Database

/app/resources/ employees.groovy

/app/models/ employees.json

ZRM.delegate()

Model application data• Constrained set of APIs encourage a RESTful application

architecture• Data model that maps well into Atom feeds and JSON

formats• Robust framework for persistence, validation, and

serializationAccess resource data with Dojo

WebSphere sMash application

Page 24: Ibm Java在企业级开发中的应用

Light-weight Flow in WebSphere sMash

• Assemble Flow is target to compose application with the flow pattern by “wiring” activities.

• Light-weight flow model and engine<process name="sortSample" persistPolicy=“off"> <receiveGET name="rssRcv"/> <feed name="YahooFeed" url="http://rss.news.yahoo.com/rss/topstories"/> <feed name="CNNFeed" url="http://rss.cnn.com/rss/cnn_topstories.rss"/> <aggregateFeeds name="aggregate"> <input value="${YahooFeed}"/> <input value="${CNNFeed}"/> </aggregateFeeds> <sortFeed name="sort" orderBy="-published"> <input value="${aggregate}"/> </sortFeed> <truncate name="truncate" number="10"> <input value="${sort}"/> </truncate> <replyGET name="rssRply"> <input value="${truncate}"/> </replyGET></process>

Sample: Aggregate two feedSample: Aggregate two feed

Page 25: Ibm Java在企业级开发中的应用

虚拟化与自动化

挑战:降低IT成本、变化的工作负载、高可用、高扩展能力、高性能

企业的云计算

Page 26: Ibm Java在企业级开发中的应用

100%

0%50

%

100%

0%50

%

15% Utilized Servers

100%

0%50

%

10% Utilized Servers20% Utilized Servers

Cluster 1 Cluster 2 Cluster 3

Home Equity Loans Processing

Credit Card Processing Savings / Deposit Processing

Company’s Existing Application Topology and Utilization

An Example: The Problem customers is facing…

Page 27: Ibm Java在企业级开发中的应用

Loan Processing Time: 15% over target Customer Complaints: 25% over target CSR Efficiency: 30% below target

Equity Loans Processing

Change: New promotion results in a huge increase in loan requests…

Cluster 1 Cluster 2 Cluster 3

10% Utilized Servers

100%

0%50

%

15% Utilized Servers

100%

0%50

%

100%

0%50

%

20% Utilized Servers55% Utilized Servers75% Utilized ServersPromotion results in 100% Utilized Servers

Credit Card Processing Savings / Deposit Processing

Animated

An Example: The Problem customers is facing…

Page 28: Ibm Java在企业级开发中的应用

Equity Loans Processing

Cluster 1 Cluster 2 Cluster 3

10% Utilized Servers

100%

0%50

%

15% Utilized Servers

100%

0%50

%

100%

0%50

%

20% Utilized Servers55% Utilized Servers75% Utilized ServersPromotion results in 100% Utilized Servers

Credit Card Processing Savings / Deposit Processing

Animated

50% Utilized Servers 40% Utilized Servers

Realizes that the home loan processing application has high priority…

An Example: The Problem customers is facing…

Page 29: Ibm Java在企业级开发中的应用

Cluster 1 Cluster 2 Cluster 3

* Hypothetical, for illustrative purposes only

100%

0%50

%

55%* Utilized Servers

One Resource Pool

Claims Processing Account Management Billing ApplicationGold Silver Bronze

Customer Support Gold Underwriting Silver

Maximizes utilization and improves responsiveness!

Resource Virtualization & Optimization

Page 30: Ibm Java在企业级开发中的应用

Server/Storage Centric Virtualization & ProvisionServer/Storage Centric Virtualization & Provision

Servers Servers Servers

Server Farm 1Server Farm 1

Servers Servers Servers

Server Farm 2Server Farm 2

Application Centric Virtualization & Provision

Application Driven

Resource Optimization Application Prioritization High Availability & Scalability

Monitoring & Reporting

SLACapacity Planning

DynamicScheduling

ScalableTransaction Processing

Servers

Server Farm NServer Farm N

Servers Servers

WebSphere RainmakerWebSphere Rainmaker

Application Driven Application Driven

WebSphere Products Virtual Images: Create, Configure, Dispense, Capacity Management and Storage

WebSphere Virtual Enterprise (WVE)

WebSphere eXtreme Scale (WXS)

Middleware as a Service - WebSphere Virtualization

Page 31: Ibm Java在企业级开发中的应用

WebSphere Virtual Enterprise 应用案例 - OsakaGas

SSSSSSeeeeeeccccccuuuuuurrrrrriiiiiitttttty y y y y y SSSSSSysysysysysystttttteeeeeemmmmmm ffffffoooooorrrrrr SSSSSSeeeeeerrrrrrvvvvvviiiiiicccccceeeeee CCCCCC hhhhhhaaaaaaiiiiiinnnnnn

WWWWWW eeeeeebbbbbb AAAAAA pplpplpplpplpplppliiiiiiccccccatatatatatatiiiiiioooooonnnnnn SSSSSSeeeeeerrrrrrvvvvvveeeeeerrrrrrssssssSSSSSSeeeeeeccccccuuuuuurrrrrriiiiiitttttty y y y y y SSSSSSyyyyyyststststststeeeeeemmmmmm ffffffoooooorrrrrr OOOOOO GGGGGG &&&&&& OOOOOO GGGGGG GGGGGG rrrrrroooooouuuuuupppppp WWWWWW EEEEEEBBBBBB SSSSSSeeeeeerrrrrrvvvvvveeeeeerrrrrrssssss

Database Node #2

Database Node #1

O G -TAMfor IC -C ard

O G -TAM

SC -TAM W ebServersfor SC

W ebServers

for Internet

Users with IC -C ard

G eneral Users

W AS ServersW AS4 C luster

Shared AP ServersW AS6 C luster

Database Server #1

Database Server #2

Staging AP Servers

W AS6 C luster

Portal Servers(W AS5)

IIIIIInnnnnntttttteeeeeerrrrrrnnnnnneeeeeetttttt UUUUUU sssssseeeeeerrrrrrssssss

AP-1 DB Server

AP-1 Server

W eb Serversfor O G /O G G

JVMJVMJVM

JVMJVMJVM

JVMJVM

JVM

JVMJVMJVM ・・・

・・・JVM

C TG

JVMJVM

C TG

M ainfram eJVM

Pain Points:•Many Apps in a few JVMs in Shared Common AP Servers

•Cannot visualize/understand each Apps behavior

•Not all Apps are well-behaved

Solution:1. Add WVE between Web Server and WAS2. Health Control3. Operational ReportingResults:

•200 Enterprise Apps well controlled

•Runtime Visualization

•Autonomic Control

•No Change to Existing Systems

•Higher Availability Achieved

Page 32: Ibm Java在企业级开发中的应用

WebSphere eXtreme ScaleRealizing high performance, scalable for data-intensive applications

It can be used as a very powerful cache that

scales from simple in-process topologies to powerful distributed

topologies.

It can be used as a platform for building

powerful XTP/Data Grid applications.It can be used as a form of

in memory database to manage application state (and it scales to 1000’s of

servers). This is sometimes referred to as

Distributed Application State Management.

New York San Francisco

London Shanghai

Page 33: Ibm Java在企业级开发中的应用

WebSphere eXtreme Scale 应用案例:ESPN

• WXS @ ESPN• ESPN.com moved to WXS • User profile management and cache• 10x improvement in response time

After

450,000 logged in Sports Fans13,000 Page Views / Sec WXS serving

130,000 Req/Sec Heading to 1 Million

10 Dual Quad Core IntelSun 6.1 JVM

MS SQLServer

Before

ESPNserver

WebSphereExtreme Scale

Page 34: Ibm Java在企业级开发中的应用

The Next

An engine with overall and major tune-up• Utilizing OSGi technologies, build compose-able

Application Server• Purpose-built servers (e.g. Web)• Yielding: Right sized; memory, footprint, admin,

maintenance

Page 35: Ibm Java在企业级开发中的应用

学学学学学学习习习习习习资资资资资资源源源源源源推推推推推推荐荐荐荐荐荐•WebSphere 应用服务器的常见问题及解答(WAS FAQ)•WebSphere Application Server V7.0 中的新增功能•WebSphere Application Server V7 的系统管理•使用 RAD V7.5 和 WAS V7.0 构建 Java EE 应用程序•WebSphere Application Server V7.0 中的 Web Services 安全策略及配置

更更更更更更多多多多多多技技技技技技术术术术术术资资资资资资源源源源源源,,,,,,请请请请请请访访访访访访问问问问问问 WebSphere Application Server V7 专专专专专专题题题题题题

•专家访谈:WebSphere sMash 的新增功能•在 WebSphere sMash 中集成 Java 和 PHP•将 WebSphere sMash 的强大功能与 Adobe Flex 相结合•借助 Project Zero 在 Web 2.0 领域创建 RESTful IBM Lotus Domino 应用程序

更更更更更更多多多多多多技技技技技技术术术术术术资资资资资资源源源源源源,,,,,,请请请请请请访访访访访访问问问问问问 WebSphere sMash 产产产产产产品品品品品品专专专专专专题题题题题题

•Podcast:Scott Ambler 谈敏捷开发•recomm2: 多媒体课堂:利用 Rational 产品支持全球分布式开发及敏捷开发

更更更更更更多多多多多多技技技技技技术术术术术术资资资资资资源源源源源源,,,,,,IBM Rational 敏敏敏敏敏敏捷捷捷捷捷捷开开开开开开发发发发发发工工工工工工具具具具具具包包包包包包

Web 2.0 入门、企业 2.0、社会计算以及与 REST、Mashup、Feed、RIA、Ajax、PHP、ROR、Project Zero 等热门技术相关的文章、教程和其它资源

更更更更更更多多多多多多技技技技技技术术术术术术资资资资资资源源源源源源,,,,,,请请请请请请访访访访访访问问问问问问 Web 2.0 技技技技技技术术术术术术资资资资资资源源源源源源中中中中中中心心心心心心

Page 36: Ibm Java在企业级开发中的应用

IBM developerWorks: 专专专专专专注注注注注注基基基基基基于于于于于于开开开开开开放放放放放放式式式式式式标标标标标标准准准准准准和和和和和和跨跨跨跨跨跨平平平平平平台台台台台台开开开开开开发发发发发发领领领领领领域域域域域域的的的的的的先先先先先先进进进进进进技技技技技技术术术术术术

Page 37: Ibm Java在企业级开发中的应用