Java Development on NonStop Servers

Arya MirSoftware and s/w Development

Mar 28, 2012 (5 years and 5 months ago)

1,003 views

Java Development on NonStop Servers

©2010 Hewlett
-
Packard Development Company, L.P.

The information contained herein is subject to change without notice

Sanjib Guhathakurta

Product Manager, NonStop Division, HP

Java Development on
NonStop Servers

Agenda: All Modern, All Standard, All NonStop

Develop

Standard
programming
models

Certified Java SE Platform (JDK and JVM)

Apache Tomcat (
Valued
-
added port
)

Open Source Java Frameworks

Develop

Standard
programming
models

JVM

Deploy



NonStop
Fundamentals

Availability

Transactions

Clustering

Availability

Transactions

Scalability

NonStop OS

NonStop TS/MP

NonStop TMF

NonStop Server for Java (NSJ)

JDK & JRE

NonStop Server for Java (NSJ)

Certified Java SE implementation


Supports all “headless“ (server
-
side) JDK API

JVM with HotSpot compiler



Same HotSpot compiler as in HP
-
UX



Optimized for Intel Itanium processor architecture

Our focus



Maintaining currency relative to industry Java releases



Continuing performance improvements



Tool support for diagnostics and performance management

JToolkit: Legacy integration with Java

Pathway
serverclass

JPathway API

JEnscribe API

Enscribe

Supports $recieve
messages <= 2MB

Pathway
serverclass

JPathsend API

Supports JPathsend
messages <= 2MB

Server
process

JRequester API

$FOO

$BAR

Maintaining Java currency

NSJ Release Threads

If you are not on NSJ 6, move to NSJ 6. It’s a free upgrade

T2766H60^ABP(JDK 6.0_20)
FCS: Jan 2011

T2766H51^ABW(JDK 1.5.0_24)
FCS: Sept 2010

T2766H50^ABN(JDK 1.5.0_02)
FCS: May 2009

T2766H10^ABV(JDK 1.4.2_26)
FCS: August 2010

Latest releases

NSJ 6.0 (JDK 6.0)
FCS: Mar 2009

NSJ 5.1 (JDK 5.0)
FCS: May 2008

NSJ 5.0 (JDK 5.0)
FCS: Jan 2006

NSJ 4.2 (JDK 4.2)
FCS: Aug 2005

At introduction

NSJ 5.0 (JDK 5.0)
FCS: Jan 2006

Active

Final NSJ
Update

8

6/9/2011

Continuing performance improvements

JVM performance improvements across Java releases

1.00
1.09
1.33
1.52
NJS4.2
NSJ5.1(C3 Compiler)
NSJ6
NSJ6(ABP)
All measurements done on Integrity NonStop NS16000 systems

1.00
(base)

1.09

1.33

1.52

9

6/9/2011

Java performance


Hardware matters!

S86K/NSJ4.2
NS16000/NSJ6 (ABP)
NB50000c/NSJ6 (ABP)
Java Benchmark
1.0
5.6
7.6
0
1
2
3
4
5
6
7
8
Throughput
36% Speedup
5.6x Speedup
Note: This shows single JVM performance, not aggregate system throughput

5.6X
Speedup

36%
Speedup

1.0

5.6

7.6

NB50000c/NSJ6 ABP

S86K/NSJ 4.2

NS16000/NSJ6 ABP

HPjmeter: HP’s Java analysis tool

Free download at www.hp.com/go/hpjmeter



Data file for
offline analysis

Real
-
time data

JVM

JVM Agent

JVM

Node Agent

HPjmeter console

Two modes for collecting JVM metrics

Where should I tune?

Java method hotspots


Real
-
time display of CPU
time consumed by Java
methods


Identifies potential CPU and
performance bottlenecks


Highest consumers are
likely optimization
opportunities


From real
-
time Java method hotspots …

How is Java heap used?

Heap monitor


Real
-
time display of heap usage
and free space available


High
-
level view of memory
usage trends


Adjustable time scale up to 24
hours


Garbage collection activity views

GC types

Save or print any chart

Zoom
-
in on X
-
axis, Y
-
axis, or both

Allocation site statistics


Data shows allocation site, number of allocations and total number of bytes
allocated

NonStop JavaServer Pages

Value
-
added port of Apache Tomcat

NonStop JavaServer Pages (NSJSP)

NSJSP

Standard
Apache
Tomcat

NonStop
Fundamentals
(Scalability + Fault
Tolerance)

Apache Tomcat is …


Open Source


Market leader in Java app server market



>60% of enterprises use Tomcat



Used by most
Fortune 1000 companies



More than 600k downloads per month


Mature



Top level Apache project



Developed & tested since 10+ years



Very active development community

NSJSP=Tomcat API + Enterprise RAS

NSJSP
adds
enterprise capabilities



Integrated with iTP Webserver for
load balancing


Fully integrated with TS/MP for
out of the box

clustering




linear
scalability

and
fault tolerance


Enhanced
manageability


End
-
user support

by HP Global Support Center

Tomcat vs. NSJSP

NSJSP:
Standard Tomcat, optimized for scale & HA on NonStop


Web Apps

Servlet Container
(Catalina)

Connector
(Coyote)

Tomcat Server

Apache / IIS
Web Server

AJP Protocol

Web Apps

Servlet Container
(Catalina)

iTP WebServer

Connector

NSJSP Server

Web Apps

Servlet Container
(Catalina)

iTP WebServer

Connector

NSJSP Server

iTP Web
Server

Pathsend

TS/MP Environment

iTP Web
Server

Server Class

NSJSP is
light
-
weight
compared to Java EE

Linux / Unix /
Windows

Domain
objects

Java EE

Transactions

Clustering

Connection
-
Pooling

Availability

Scalability

Management

Presentation

Integration

Persistence

Linux / Unix /
Windows

Domain
objects

NSJSP

Presentation

Integration

Persistence

NonStop OS

Scalability

Availability

Clustering

Transactions

Connection Pooling

SASH Frameworks

NonStop OS provides the enterprise capabilities included in Java EE
app servers

Open Source Frameworks

Simplifies app development

The rise of open source frameworks


Reaction against complexity of Java EE
programming model


Frameworks are easier to learn, use and test


Some of these frameworks are now de
-
facto
programming models for enterprise Java
development

Open Source Java Framework support on NonStop

SASH
: myFace
s
,
A
xis2,
S
pring,
H
ibernate

Apache
MyFaces


Component based web UI framework

Apache Axis2

Web services framework

Spring

Framework for developing apps using
POJO

components

Hibernate

Object Relational Mapping (ORM) framework

Benefits of SASH


High market acceptance


Open source, free


Non proprietary, backed by major vendors


Portable apps, no vendor lock
-
in


Light
-
weight


Simple components (POJOs)


No expensive app
-
server needed!


De facto standards


JSF, JPA
-

part of Java EE spec


Frameworks, not just a collection of APIs


Productivity increase from abstractions, consistency of app structure


Better quality apps by automatically embedding good design patterns

SASH supports all components of enterprise
Java apps

Presentation

SOA Services

NonStop

SQL/MX

Business Logic

Scalable and available

SASH execution container

NSJSP (Tomcat)

NonStop TS/MP

NonStop OS

Customer Need

Fit

User Interface Modernization



Expose existing Business Logic as SOA Services



Build new, Modern Services and Applications



Modernize Data Access



Modernize Development Environment



SASH addresses …

Open Source Java framework support on
NonStop provides …


Enterprise Java on NonStop


Executes in NonStop’s Tomcat server


Leverages NonStop fundamentals


Integrate existing Apps via JToolkit (Java)


Fully integrated and tested by NonStop



Documentation & Examples


Documentation on
http://docs.hp.com


Covers NonStop
-
specifics and examples


End
-
User Support through HP


GMCSC support

SQL/MX

JPA/Hibernate

POJO

Spring


MyFaces

Spring MVC

Axis2

Spring WS

NSJSP (Tomcat)

JDBC / JTA

NSJ (Java VM)

Obtaining sample apps and Hibernate dialect
file for SQL/MX


Log on to NonStop eServices Portal


Go to Scout (where you go for downloading SPRs)


Look for T0874


this package contains the sample apps


Look for T0873


this package contains the Hibernate dialect file for
SQL/MX


Simply download them

Note that the frameworks are not distributed by HP

Java Product Releases

Java product releases










2010


NS Java 4.2 Update

JDK 4.2_26


NS Java 5.1 Update

JDK 5.0_24


NS Java 6.0 Update

JDK 6.0_20


NS JSP 6.0 Update

Apache Tomcat 6.0.18

2011


SASH Frameworks Update

Spring 3.0.2

Axis2/J 1.5.2

MyFaces 2.0.2

Hibernate 3.5.1


NS Java 6.0 Update

JDK 6.0_24

Future

Apache Tomcat 7.0


SASH Frameworks Update


NS Java 7.0 (32
-
bit)

JDK 7.0


NS Java 7.0 (64
-
bit)

This is a rolling (up to three year) Statement of Direction and is subject to change without notice
.


NS JSP 7.0

Agenda: All Modern, All Standard, All NonStop

Develop

Standard
programming
models

Certified Java SE Platform (JDK and JVM)

Apache Tomcat (
Valued
-
added port
)

Open Source Java Frameworks

Develop

Standard
programming
models

JVM

Deploy



NonStop
Fundamentals

Availability

Transactions

Clustering

Availability

Transactions

Scalability

NonStop OS

NonStop TS/MP

NonStop TMF

Discussion until now:


All Modern, All Standard

Let’s now discuss:


All NonStop

SMP Systems scale app through threads


as workload increases,
app creates more
threads

to do work


threads created in
different CPUs (or cores)
to provide concurrency

Shared Memory

Data Objects

App Threads

8
-
way SMP system

NonStop MPP Systems scale apps through processes


as workload increases,
NonStop middleware
creates more
processes

to do work


processes are created in
different CPUs (or cores)
to provide
parallelism

4 CPU NonStop

Process

Memory

Memory

Memory

Memory

Auto scaling a service with NonStop TS/MP

3/6/06

35

ORDER

ORDER

ORDER

ORDER

ORDER

ORDER

ORDER

ORDER

ORDER



When service load increases, TS/MP automatically creates more
processes to handle the load



When service load decreases, additional processes are shut down



When to create process, and how many, is driven by configuration



All this with
no programming effort

on user
-
written code

JVM

CPU

CPU

CPU

CPU

Appserver

Oops! One of my SMP CPUs failed

Result: Entire application is unavailable


large fault domain

JVM

JVM

JVM

JVM

CPU

CPU

CPU

CPU

NSJSP

NSJSP

NSJSP

NSJSP

Result: Processes fail, but application is still available!

Oops! One of my NonStop CPUs failed

Auto reconfiguration of service processes with
NonStop TS/MP

ORDER

ORDER

ORDER

ORDER

ORDER

ORDER

ORDER

ORDER

ORDER

ORDER

ORDER

ORDER



TS/MP starts additional process in remaining processors



“in flight” transactions are automatically aborted by Transaction Manager

NonStop TS/MP ensures that a service is always available

Application runtime


end to end scale and high
availability

Transparent Scalability

Transparent Fault Tolerance

















SQL/MX

Typical JEE Systems Complexity to achieve
scalability

httpd

httpd

httpd

Java EE

Java EE

Java EE

Database

Server

Database

Server

Complexity Eliminated on NonStop

iTP
Webserver

iTP
Webserver

iTP
Webserver

NSJSP

NonStop

SQL/MX

TS/MP

Everything on one system, easily managed