Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

49
@HirofumiIwasaki Java EE 6 Adoption in One of the World’s Largest Online Financial Systems Hirofumi Iwasaki Financial Services Department, Development Unit, Rakuten, Inc. CCC Fall 2014 JavaOne OOW 2014 Special Replay Session

description

Financial companies need Java EE to power its business today. Rakuten Card, one of the largest credit card companies in Japan, adopted Java EE 6 for its online systems rearchitecture. You can learn why we choose Java EE, and our experiences and lessons we learned. This is the first disclosing of a large credit card company in Japan sharing their story. How to start such a big project? Why we choose it, how we selected the in house development policies, educated ourselves, and developed the additional libraries? How to launch within only six months? What is the key factor driving them as 24/7 critical real financial systems successfully? How to migrate to EE 7 in the future? We’ll answer these questions and any that you may have. This version is the exclusive session for JJUG CCC Fall 2014 in Japan, binding both JavaOne and OOW 2014 sessions.

Transcript of Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

Page 1: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki

Java EE 6 Adoption

in One of the World’s Largest

Online Financial Systems

Hirofumi Iwasaki

Financial Services Department, Development Unit,

Rakuten, Inc.

CCC Fall 2014

JavaOne

OOW 2014

Special

Replay

Session

Page 2: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki2

Speaker Biography

Hirofumi Iwasaki

– Group Manager, Technology Manager

– Financial Service Department, Development Unit,Rakuten, Inc.

Carrier

– Planning, designing & implementation of huge enterprise systems for financial, manufacturing and public systems with enterprise middleware, especially Java EE & .NET in Japan for about 16 years.

Opus, Lectures, etc.

– Conferences: JavaOne 2014, Oracle OpenWorld 2014, Java Day Tokyo 2014, JJUG CCC Spring (2014), WebLogic roundtable (2012-2013), Rakuten Tech Conference (2014, 2013) etc.

– Magazine: @IT (2005-2010), CIO Magazine (2009), IT Architect (2005-2009), Web+DB Press (2005), Java World (2001-2004), etc.

Page 3: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki3

JavaOne 2014 Session

Sep 29th, 2014,

12:30 PM – 01:30 PM

Parc 55 - Mission

Page 4: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki4

Oracle OpenWorld 2014

Oct 2nd, 2014,

10:45 AM - 11:30 AM

Moscone South - 200

Page 5: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki5

JCP with Rakuten

Rakuten Joined JCP

as a member of

“user company”.

Page 6: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki6

Agenda

1. Java EE 6 for Our Financial Systems Overview

2. Starting with GlassFish, Migrated to WebLogic

3. Hard Business Operations, with the Power of the WebLogic and Exadata

Page 7: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki7

Agenda

1. Java EE 6 for Our Financial Systems Overview

2. Starting with GlassFish, Migrated to WebLogic

3. Hard Business Operations, with the Power of the WebLogic and Exadata

Page 8: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki8

Global Rakuten Group

Page 9: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki

Rapidly Expanding Worldwide from 2010

• E-commerce in 14 countries and regions

• All services and businesses in 28 countries

Page 10: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki

Rakuten GroupConsolidated GMS

23.407 52.319 79.134 153.004329.106

478.765

832.354

1154.786

1474.570

1861.268

2746.821

3413.582

4146.244

2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013

5248.976

(JPY B)

US $51.4B

Page 11: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki11

Internet Services

(1997)

(2003)

(2006)

(2007)

(2010)

in USA

EC in

France

(2009)

(2004)

(2008)

(2008)

(2011)

EC in

UK

EC

In Austria

In Indonesia

in Brazil

(2005)

(2009)

EC

In Thailand

(2010)

Internet Finance

(2001)(2000) (2005)

In Germany

(2012)

EC in

Malaysia

(2013)

(2013)

In Spain

EC

In Singapore

EC

In Japan

Online Books,

DVD Store

Online Hotel

Reservation

Pay-per-view

Video Service

Portal Site

Performance

Marketing

In USA

Internet

ResearchInternet

Auction

EC

in Taiwan

Global eBook

Global Video streaming Global Video

Streaming

Global Social

Messaging App

(2014)

Online Security

BrokerageCredit Card E-money

Internet

BankingRakuten Life

Insurance

IP TelephonyProfessional

BaseballMarriage

Consultant

1997 2014

(2014)

Credit Card Payment

By Smartphone

(2012)

Point Service

(2013)

Phone Service

Online Golf

Reservation

Others

Energy Service

Real Café Service

Curation Service

Expanding Business Portfolio

Page 12: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki12

Life

Insurance

5 Financial Services of Rakuten Group in Japan

Credit Card

E-Money

Bank

Financial

Securities

Page 13: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki13

Life

Insurance

5 Financial Services of Rakuten Group in Japan

Credit Card

E-Money

Bank

Financial

Securities

Big 5 Services

Each has Huge Transactions

24/7 Non-Stop Services

Page 15: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki15

3 Big Issues of the Rakuten Card Systems

Credit Card

1. Outdated !

2. Complicated !

3. Difficult!

Page 16: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki16

3 Big Targets for New Architecture

Requirements

Sustainability

FlexibilitySystem

Transparency

Page 17: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki17

PortabilityResults of

Financial Sys

Vendor

Support

Community

Excellent Excellent Excellent Excellent

Platform A Nothing Good Not Bad Mediocre

Why We Chose the Java EE ?

Page 18: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki18

Why We Chose WebLogic 12cProduct Productivity Reliability Scalability Support Price Operation Development

WebLogic

Server 12cExcellent Excellent Excellent Excellent Not Good Excellent Excellent

Commercial

Product AExcellent Excellent Excellent Excellent Not Good Not Good Not Good

Commercial

Product BExcellent Excellent Not Good Not Good Not Good Not Good Excellent

Page 19: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki19

Why We Chose the Oracle Exadata?

Product Productivity Data

reliability

Scalability HA PCI DSS Operation

Oracle

ExadataExcellent Excellent Excellent Excellent Excellent Excellent

Product X - Not Good - - - Not Good

Product Y Excellent Excellent - Excellent Not Good Not Good

Page 20: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki20

PCI DSS Certification Requirements

We were supposed to be certified with PCI DSS, the card payment

industry data security standard. Exadata is the solution.

OS audit DBA audit Standard audit Fine grain audit

Audit

target

Instance start and

stop, connect with

admin or listener

DB operation with

admin user

DB operation with

login, object operation

with DDL/DML, data

reference, etc.

CRUD for specific

data

Output OS file, listener log OS file OS file,

(DBA_AUDIT_TRAIL

view in Oracle)

User definition table,

(DBA_FGA_AUDIT_

TRAIL view in

Oracle)

Audit log Time, OS info, DB

instance, action, auth

info, exit code

Time, DB user, action,

auth info, OS user, exit

code

Time, user, action, OS

user, terminal name,

query, etc.

time, DB user, OS

user, accessed

object name, fine

grain audit policy

name, query

Page 21: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki21

5 Big Issues to Apply New JEE Architecture

Page 23: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki23

2. Education: Read, Read, Read!

RECOMMENDED

for WebLogic 12c

Good & Only

Japanese

EE 6 book

Start from HERE

4th Edition

Good Pocket

Reference!

For NetBeans 7

with EE 6

Page 24: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki24

2. Education: Online Materials

NetBeans Java EE docs

for Advanced Information

Original Tutorial

for Newbies (Start here!)

Page 25: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki25

2. Education: Simplify to LearnOld Architecture

New Architecture

Too difficult to learn many

non-standard old technologies

Simple & Easy!

Page 26: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki26

Comparison between old and new system

Feature Old New(JEE6)

Dependency Injection Spring DI CDI

Web Framework PHP(Symfony, Smarty) JSF

REST Servlets JAX-RS

Transactions Transactional(Spring) EJB CMT(JTA)

Persistence iBATIS JPA

Batch TERASOLUNA batch FW EJB

WebSockets ー Java API for WebSockets

Validation ー Bean Validation API

Security ー Java EE Security

Page 27: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki27

Rich Clients

(no business logics)

Call

Web Presentation

(no business logics)

Business Logic

(no presentations)

3. Architecture: Apply EE 6 Specs

Data Access

JPA

EJB

CMT

JSF

DBs

Java FX JTA

Container

Managed

automatic

Transaction

Messaging

JMS MQ

Connection

RMI-IIOPOther

Servers

EMailMTA

JavaMail

JAX

Call

Call

Call

Call

Call

There's no

rich client

Page 28: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki28

3. Architecture: Migrate from Old

Front-End (Apache)

Front-End

(WebLogic)

Back-End

(WebLogic)

Old App ArchitectureBack-End

Database

View

PHP

Action

with

Business

Logic

Web

Service

API

Service

Data

Service

External

Service

External

Services

DMZ

(Apache)

Static

HTML,

Images,

CSS

View

Facelet

Exadata

External

ServicesBacking

Bean

(no

business

logic)

Business

Logic

Entity

External

DAO

Entity

Transaction

Boundary

Transaction

Boundary

BEGIN

COMMIT

WebLogic

Plug-In

BEGIN

COMMIT

New App Architecture

Page 29: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki29

Core

3. Architecture: Simplified

L7

Bala

ncer

Front Real-time

Front Batch

Web Site B

Web Site A

Internal Site

Re

vers

e P

roxy

Batch Exec

Se

rvic

es (a

ka

AP

Is)

System B

Gateway

Database

System C

Sub Proc

Page 30: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki30

4. Environment: Ease of Dev.

X X=

Centralized DEV DB

Local WebLogic Server instance

Code and Test with Fast-swap

Page 32: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki32

5. Test: Full Auto Testing &Validation.

Management Server

1. Auto PULL

2. Auto

Build

& Test3. Auto

Validate4. Report

HourlyZERO Violations

Page 33: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki33

Agenda

1. Java EE 6 for Our Financial Systems Overview

2. Starting with GlassFish, Migrated to WebLogic

3. Hard Business Operations, with the Power of the WebLogic and Exadata

Page 34: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki34

Chart of the mid 2011 Java EE app servers

Vendor App Server EE 5 Servers EE 6 Servers

Open Source GlassFish 2.1.1 3.1.1

Oracle WebLogic 10.3 -

IBM WebSphere 7.0 8.0

Red Hat JBoss 6.0 7.0 (partially)

In Mid 2011, We Didn’t Have WebLogic 12c Yet

We wanted to apply Java EE 6 for our new system, but not released.

We decided to use GlassFish 3.1.1 until the EE 6 applied WebLogic

(12c) released.

Page 35: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki35

Impact of the Migrating within the Project

Non-Interchangeable Development Code

– Different container behaviors.

– Non Java EE, different each server special APIs.

Scheduled Impacts for Migrating WebLogic Configurations

– Cluster configurations for high availabilities.

– Other setting adjustments.

– Bug checking and applying patches.

– Connecting Oracle Enterprise Manager.

GlassFish WebLogic

Page 36: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki36

Code Base BEA WebLogic 6.0

based + Improvements

Felix OSGi modular

based kernel

Web Container WebLogic Original Tomcat Container

EJB Container WebLogic Original GlassFish Original

Remote Invocation T3, RMI-IIOP, SOAP RMI-IIOP, SOAP

Transaction Processing WebLogic Original GlassFish Original

Persistence Container WebLogic Original TopLink Based

Runtime JRockit, Oracle JDK Oracle JDK

Investigation of the Differences

WebLogic GlassFish

Page 37: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki37

Schedule for Migrating from GlassFish to WebLogic

Java EE 6

Development

with GlassFish

Migrating to

WebLogic

(12c)

Develo

pm

ent

Opera

tions

Java EE Development

with WebLogic (12c)Production

Release

Configuration of Java EE 6 applied

WebLogic (12c) and

Enterprise Manager (12c)

(Dec, 2011)

Production

Release

Finally the

new WL was

released at

the end of 2011

Page 38: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki38

Non-Interchangeable Point: 1. Container Initialization

Single WAR including JSF and EJBs

– GlassFish

1. EJB initialize (@Startup)

2. JSF (Servlet) initialize (HttpServlet#init())

– WebLogic

1. JSF (Servlet) initialize (HttpServlet#init())

2. EJB initialize (@Startup)

Inverse initialization pattern

– Affected for the server initializations.

– Absorbed with the wrapper classes

Page 39: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki39

Non-Interchangeable Point: 2. Remote Invocation

Different EJB remote invocation operations. Wrapped for absorbing.

GlassFish (5 properties, no security)

Properties prop = new Properties();

prop.setProperty(Context.INITIAL_CONTEXT_FACTORY,

“com.sun.enterprise.naming.SerialInitContextFactory”);

prop.setProperty(Context.URL_PKG_PREFXIES,

“com.sun.enterprise.naming”);

prop.setProperty(Context.STATE_FACTORIES

“com.sun.corba.ee.impl.presentation.rmi.JNDIStateFacto

ryImpl”

prop.setProperty("org.omg.CORBA.ORBInitialHost",

“theservername”);

prop.setProperty("org.omg.CORBA.ORBInitialPort",

“3700”);

Context context = new InitialContext(prop);

ARemote remote

= (ARemote) context.lookup(“java:global/…”);

WebLogic (4 properties, with security)

Properties prop = new Properties();

prop.setProperty(Context.INITIAL_CONTEXT_FACTORY,

“weblogic.jndi.WLInitialContextFactory”);

prop.setProperty(Context.PROVIDER_URL,

“t3://theservername:7001”);

prop.setProperty(Context.SECRITY_PRINCIPAL,

“weblogic”);

prop.setProperty(Context.SECURITY_CREDENTIALS,

“thepassword”);

Context context = new InitialContext(prop);

ARemote remote

= (ARemote) context.lookup(“java:global/…”);

Page 40: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki40

Agenda

1. Java EE 6 for Our Financial Systems Overview

2. Starting with GlassFish, Migrated to WebLogic

3. Hard Business Operations, with the Power of the WebLogic and Exadata

Page 41: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki41

active-active

cluster to avoid

single-point of

failure

Non-stop

failover

Parallel

operation for

high

performance

Atomic Database Scaling

Stand-by

Re

al-T

ime

Ba

tch

Old Database New Scaling model (Exadata)

SAN

Active

Fibre

Channel

switch

(1~8Gb/s)

InfiniBand

switch

(40Gb/s)

Real-T

ime

Ba

tch

Single point of

failure for non-

stop service

MySQL

limitation for

update

transaction

performance

Batch traffic

adversely

affects online

performance

Shared storage

limitation with

another

service's bad

performance

affects

5 minutes

in fail over

Divide online /

batch servers

High

performance

networking

Independent

storage for 24

Hrs / 365 days

performance

guarantee

Storage

RT group Batch group

・・・ ・・・

Scale-out

enabled

architecture

Not scalable

architecture

×

Page 42: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki42

Single Database, Single Schema Strategy

Exadata

X3-2

Replication

(APB)

Web

Are

a

INT

RA

Are

a

Merged to

Single Exadata

Ultra-huge financial

online transactions

with ACID props.

MS SQL Server

Page 43: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki43

Migration of Application

Front-End (Apache)

Front-End

(WebLogic)

Back-End

(WebLogic)

Old App Architecture

Back-End

Database

View

PHP

Action

with

Business

Logic

Web

Service

API

Service

Data

Service

External

Service

External

Services

DMZ

(Apache)

Static

HTML,

Images,

CSS

View

Facelet

Exadata

External

ServicesBacking

Bean

(no

business

logic)

Business

Logic

Entity

External

DAO

Entity

Transaction

Boundary

Transaction

Boundary

BEGIN

COMMIT

WebLogic

Plug-In

BEGIN

COMMIT

New App Architecture

Page 44: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki44

Fast Deployment OperationsWebLogic Server

Single

WAR

for API

WebLogic

Managed Server

Real-Time

Batch

For Management

WebLogic Management Console

Same WAR, for

different servers.

Automatic

multi server

deploying

Page 45: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki45

Non-stop “Production Redeployment”

WebLogic Server

Old Module

New ModuleWebLogic

Request

Dispatcher

Requests

Auto versioning,

Non-stop redeployment

WebLogic

Managed

Server

WAR

Automatic multi

versioning, parallel

operation

Old modules will be un-

deployed gracefully when all

old sessions are invalidated.

Page 46: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki46

Managing Servers by Oracle Enterprise Manager (EM)

Introduced

Oracle Enterprise

Manager

Easy to Find

Performance &

Status

Page 47: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki47

Our Requests for WebLogic and Exadata

For WebLogic,

– Appliance of latest Java EE specs ASAP!!

We know the WebLogic is the basement of the Oracle Fusion Middleware, but we want the latest EE for our products.

Yes, we’re waiting the next WebLogic version supporting JEE7.

For Exadata

– Make patches easy to operate

Huge costs for updating quarterly update patch.

Complicated procedures for non-stop upgrading.

Hoping for the next generation updating technology.

Page 48: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki48

Contact

Hirofumi Iwasaki (@HirofumiIwasaki)

Page 49: Java EE 6 Adoption in One of the World's Largest Online Financial Systems (for JJUG CC Fall 2014)

@HirofumiIwasaki49