12/5/2013
1
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.1
Java on HP NonStop Update
for BITUG BIGSIG
Moore Ewing
HP EMEA NonStop PreSales
December 2013
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.2
Designed from the ground up for 100% application availability
The unique value of HP NonStop
Database and transactions • Highly scalable, clustered SQL database with
transactional integrity
• Mixed workload support – OLTP, queries and
batch
NonStop Operating System• Fault-tolerant, scalable, shared-nothing
architecture
• Single-system-image clustering up to 255
systems
• Uncompromising data integrity
• Java, C/C++, ODBC, JDBC, SOAP, XML
• Eclipse
Modern app development
• Transparent application fault tolerance and
scalability through standard middleware
• Service-Oriented Architecture (SOA)
• Java frameworks for fast deployment
System management• HP Mission-Critical Converged
Infrastructure integration
• Industry standard, enterprise class
Middleware
Modern Application Development
Middleware
Database and Transaction Management
System Management and Control
Security
NonStop Operating System
APPLICATIONS
Hardware
The HP NonStop Integrated Stack
• Built-in system and application security
• Enterprise security integration
• Software to help with Security audits
Security
12/5/2013
2
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
NonStop 1 to K-Series
Architecture evolution (Hardware)
- from Bus&Channel technology to Server-Area-Network
Shared-nothing architecture2 to 16 CPUs per systemFault-tolerant hardware & software Bus-based system interconnectAny-to-any IPCConstrained I/O connectivity
NonStop S- and NS-Series
• Shared-nothing architecture
• Replaced Bus and Channel
by low-latency network CPUs per Any-to-any
IPC
ServerNet
T/16 CISC chips -> MIPS RISC chips ------���� Itanium 1-core -���� Itanium n-core
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
NonStop is primarily a software product
TNS1 CLX CYCLONE S-Series NS-Series NSBlades
NonStop OS + TMF + Pathway + NSSQL + RDF
The hardware has constantly changed to new technology ,
the architecture of how the software uses it has stayed the same !
+iTPWebserver + NSJ + NSSOAP + NSJSP
12/5/2013
3
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.5
How does an HP NonStop server do it?
NonStop Architecture is Scalable and Fault-Tolerant
Share-nothing, clustered, single system image architecture• Creates an Available and Scalable system with online expansion of resources (CPUs, disc, etc.)
Hardware and software fault-tolerance
• Non-redundant duplication of hardware plus stateful takeover by process-pairs
Single system image across network of clusters
• Supports local expansion, distributed applications and disaster recovery
Fail-fast fault containment
• Combines with share-nothing model to prevent propagation of errors
Online management of the system and database
• Avoids application downtime while administration is taking place
Evolving technology
• Intra-system connectivity: bus/channel – ServerNet (CPU and I/O network)
• Processor chips: Tandem CISC – MIPS RISC – Intel Itanium EPIC
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.6
ServerNet Physical Interconnect
NonStop system architecture is MPP not SMP
NOS
NOS
NOS
NOS
TC
P/IP
v6
SQ
L/M
X
Single System Image
Pro
cess M
an
ag
em
en
t
12/5/2013
4
© Copyright 2012 Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice.
HP NonStop
The critical role of “TS/MP”
NonStop TS/MP
RequestorRequestor
RequestorRequestor
RequestorRequestor
PATHSEND
Scalability and availability
RequestorRequestor
PATHSEND
RequestorRequestor
TS/MPApp 2
Ap 1
App 1
App 1
RequestorRequestor
PATHSEND
RequestorRequestor
RequestorRequestor
RequestorRequestor
RequestorRequestor
PATHSEND
App 2
App 2
App 2
App 2
App 2
App 2
App 2
Ap 1
App 1
App 1
Ap 1
App 1
App 1
Ap 1
App 1
App 1
TS/MP
SC-APP1
SC-APP2
12/5/2013
5
TS/MP and Requester-Serverclass structure - Application Virtualization in and across NonStop Servers
• Application load balancing within & across NonStop Servers
• Application persistence
• Transaction management within & across NonStop Servers
• Instances of a Server Class balanced across CPUs
• Location of data transparent to application
• On-line upgrade to new version of ServerClasses
Application is divided into
- Requester processes - Presentation. Navigation , Context Management
- ServerClasses – pools of replicated processes doing data-related business logic and data access
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
© Copyright 2012 Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice.
Bringing Java toIntegrity NonStop
About more than just a language ........... About Enterprise quality transactional applications
12/5/2013
6
Java EE for Transactional Online Processing Applications
• APIs and APIs and APIs and APIs and TECHNOLOGY SPECIFICATIONsTECHNOLOGY SPECIFICATIONsTECHNOLOGY SPECIFICATIONsTECHNOLOGY SPECIFICATIONs– A A A A collection / integration of various enterprise collection / integration of various enterprise collection / integration of various enterprise collection / integration of various enterprise
application functions and APIs to access them application functions and APIs to access them application functions and APIs to access them application functions and APIs to access them
• Development and Deployment platform– A unified platform for server-side development
• Reference Implementation– Implements the Java EE specification & demonstrates its viability
• Compatibility tests– Certifies a Java EE product, confirms application portability
• Java EE Blueprints– Programming model, patterns, guidelines, best practices
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
JEE functionalities
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
12/5/2013
7
Bringing Java to Integrity NonStop• Technical challenges in NS system environment
- a uni-processor system without threading
- 32-bit addressing with a 2GB user data limit in the process
- Static binding without DLLs
• “Religious wars” in the JEE world
- EJB Entity beans very “ugly” and expensive
- Servlet/JSP + Opensource projects satisfied many (most) applications
• Implemented
- POSIX User level threading for JVM
- Opensource Web Container (Tomcat) and popular Frameworks .
-Have added 64-bit addressing and EJB3 container (JBoss/Wildfly))
• Had to bridge the SMP-MPP threading gap………
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
© Copyright 2012 Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice.
NonStop Server for Java
12/5/2013
8
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.15
NSJ features – summary
NSJ 6 features
• Based on Oracle JDK 1.6.0_24 version
• Supports all headless JDK APIs
• < 1.2 GB Java heap size
• Current version = NSJ 6 Update 3
NSJ 7 features
• Based on Oracle JDK 1.7.0_01 version
• First NSJ release with 64-bit support
• Supports a very large Java heap
– Size is only limited by the physical memory of the
system
• Improved garbage collection
– Parallel and concurrent mark sweep GC
This is a rolling (up to three year) Roadmap and is subject to change without notice.
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.16
Garbage collection and NSJ 7.0
JVM
SHARED MEMORY
GC Process
IPU 0 IPU 1 IPU 2 IPU 3
CPU n
C-heap Java Heap Java Thread Stacks
GC Process GC Process GC Process
For a JVM running on NSMA (J-series)
• GC Policy Commands now supported
� -XX:+UseSerialGC
� -XX:+UseParallelGC
� -XX:+UseParNewGC
� -XX:+UseParallelOldGC
� -XX:+UseConcMarkSweepGC
• Garbage collection processes created in each IPU
associated with each JVM
• Essentially working as GC “threads” similar to SMP
implementations (e.g. HP-UX)
• Can be used in either 32-bit or 64-bit JVM
For a JVM running on single-core (H-series)
• GC policy remains as Serial
• JVM will not start if any other GC Policy Command is used
New feature in future release of NSJ
This is a rolling (up to three year) Statement of Direction and is subject to change without notice.
12/5/2013
9
© Copyright 2012 Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice.
NonStop Extensions for
Java
• JToolkitTo integrate Java modernisations with other NonStop application environments
• JI ( Java Infrastructure)Allow Java APIs to use TS/MP functionality
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.18
JToolkit – Legacy Integration with Java
Pathway serverclass
JPathway API
JEnscribe API
Supports $RECEIVE messages <= 2MB
Pathway serverclass
JPathsend API
Supports JPathsendmessages <= 2MB
Standalone Server
processes
JRequester API
Enscribe
12/5/2013
10
JI (Java Infrastructure) - Motivation for creating it
•Why should a java programmer learn NonStop API while java apps are meant to be platform agnostic
WHY LEARN NONSTOP API ?
•A big chunk of NonStop specific code in NSJSP (port of Apache Tomcat) is interfacing with $RECEIVE
PORTING
•Give customers and ISVs something new that will make it easier to exploit NonStop systems
PROVIDE SOMETHING TO BRIDGE THE Java-NonStop GAP
•Help more open source products (JBoss etc) to be ported onto NonStop
REDUCE EFFORT and COST
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Product Overview
•Provides Java standard face to NonStop API for IPC (Pathsend or FS)
•Use java.net.Socket and java.nio.SocketChannel for Pathsend and FS IPC
Standard Interface
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
12/5/2013
11
Advantages
Develop on desktop, Deploy on NonStop
DEVELOPMENT
•The application can be developed on desktop using an IDE of developer’s choice
•During development no NonStop libraries are needed
TESTING
•The application can be tested on desktop using any of the various testing frameworks
•Testing too does not require any NonStop specific libraries
DEPLOYMENT
•The application can be deployed as a TS/MP server class
•The application inherits all the goodness of the platform and TS/MP
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Architecture – Modes of operation
• Client initiates data exchange
• Server responds to client request• Server can ONLY respond to client
message
Request-response
• Default mode of operation in JI
• Client and Server can each send data independent of the other
Bi-directional
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
12/5/2013
12
Use cases – NSASJ (JBoss port on TS/MP)
• NIL
JBoss code modification to run it as TS/MP server class
Open Source Component. Uses JI to act as pathsendclient
Open Source Component. Uses JI to act as pathsendclient
JBoss AS. Uses JI to run as a TS/MP server classJBoss AS. Uses JI to run as a TS/MP server class
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
JEE functionalities
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
12/5/2013
13
© Copyright 2012 Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice.
NonStop iTP WebServer
and
NonStop Servlets for
JavaServer Pages
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.26
NSJSP
Server
NSJSP: Standard Tomcat, optimized for scale & HA on NonStop
Tomcat vs NSJSP
Web Apps
Servlet Container
(Catalina)
Tomcat Server
Apache Web Server AJP Protocol
NSJSP Server
Servlet Container
(Catalina)
iTP Web
Server
PathsendiTP Web Server
TS/MP
Serverclasses
Web AppsWeb Apps
Web Apps
Web AppsWeb Apps
NSJSP Environment
12/5/2013
14
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.27
PATHMON
$YWEB
Value-add port of Apache Tomcat to NonStop
NonStop Servlets for JavaServer Pages (NSJSP)
Request
Response
CPU 0 CPU n
JVM JVM JVM
iTP
WebServer
PATHMON
$ZWEB
CPU 1 CPU 2
TS/MP
NSJSPNSJSPNSJSP
JVM
NSJSP
Implemented to leverage
scalability and fault-tolerance
provided by TS/MP
Can leverage Pathway Domains
feature of TS/MP 2.4 and later
releases to implement an “On-line
Upgrade” configuration of NSJSP.
NSJSP Manager
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.29
iTPiTPiTPiTP WebServerWebServerWebServerWebServer and NonStop JSPand NonStop JSPand NonStop JSPand NonStop JSP
Para
llel
TC
P/IP
Su
b S
yste
m HTTPD TS/MP
ServerclassServer Process
HTTPD
Server Process
HTTPD
Server Process
HTTPD
Server Process
HTTPD
TS/MP Load
Balancing
SERVLET TS/MP
ServerclassServer Process
JVM
Server Process
JVM
Server Process
JVM
Server Process
JVMServer Process
JVMTS/MP& IPC
Handler
TomcatContainerClasses
UserClasses
HTTPD - uses TS/MP for management
and PTCP/IP for request routing :
really a replicated application
NSJSP - uses TS/MP for management and initial
request routing (new Servlet session)
NonStop Server
12/5/2013
15
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.31
Open Source Java Frameworks on NonStop
– Enterprise Java on NonStop
• No changes were required except...
• Special “dialect” file for Hibernate
• Executes in NSJSP container
• Inherits NonStop fundamentals with NSJSP
• Integrate existing NonStop Apps via JToolkit (Java)
• Fully integrated and tested by HP
• End user documentation provided
• Fully supported by HP
SQL/MX
NSJSP (Tomcat)
JDBC / JTA
NSJ (Java VM)
JPA/Hibernate
POJO
Spring
MyFaces
Spring MVCAxis2
Spring WS
POJO
Presentation
Services
NonStopSQL/MX
Business Logic
Scalable and availableSASH execution container
NSJSP (Tomcat)
NonStop TS/MP
NonStop OS
JEE
Presentation BusinessLogic DataAccess
Where do SASH frameworks fit?
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
12/5/2013
16
©2009 HP Confidential33
Java Ecosystem on HP NonStop
NSJ
Hibernate
Spring
NSJSP
(Tomcat)
JToolkit
EJBJDBC T2
Axis2
myFaces
JPA
64-bit
JDBC T4
Servlets
JSP
log4j
EMS appender
SPJ
SASH
Eclipse
Advanced GC JMS
NonStop OS
JSF
Dynamic JVM languages
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
35
NSASJ 1.0 = JBOSS EJB Container + Enterprise RAS
HP NonStop
Financial
ServicesHealthcare & Public Sector
ManufacturingCommunication
Media Entertainment
Certified Java SE Platform (JDK and JVM)Certified Java SE Platform (JDK and JVM)
JBOSS EJB Container (Value-added port)JBOSS EJB Container (Value-added port)
Clustering Availability TransactionsScalability
NonStop OS
NonStop TS/MP NonStop TMF
Applications using EJBApplications using EJB
This is a rolling (up to three year) Roadmap and is subject to change without notice.
12/5/2013
17
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
36
Wildfly(Jboss) and NSASJ Deployments
JBoss AS Domain Deployment
NSASJ derived from JBoss AS
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
37
Architecture & Components
•JEE container and TS/MP serverclass
SERVER
•Transfer data from remote client to SERVER
•A pathsend client to SERVER
Post Master
•Management Component
Host Controller
•Stores state information (example stateful beans)
Cache server
12/5/2013
18
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
38
Integration with NSJSP
• Two connectivity options shown in figure
− Using JI and without JI
• NSJSP servlet can use the NSASJ provided client library to invoke the EJBs
• Servlet can also integrate with the JTA library provided by NSASJ
− EJB invocations by the servlet are within a transaction context
• If JI used then TMF context too can be propagated to the EJBs
NonStop Server
NSASJ EJB Container
App EJB
JI So
cke
t
NSJSP
Container
EJB Client in
Servlet
JI Socket
Path
send
Post MasterJI
SocketLocal
Socket
Path
send
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
39
JTA and TMF Integration
• Integrated with TMF using XARM library
• Seamless integration with TMF
JTA Library
12/5/2013
19
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
40
Integration with NSMQ
• NSMQ provides a resource adaptor which can be deployed & configured in NSASJ
• NSASJ instances can be configured to register with NSMQ either as consumer or producer
− Consumers will be Message Driven Beans (MDB)
− SLSB & SFSB will be the producers
• NSMQ parameters can be configured such that inbound messages are evenly distributed across the consumer
NSASJ instances
• Similarly for outbound messages, the NSMQ cluster manager will handle the even distribution
• NSASJ transactions involving NSMQ interactions are part of the global TMF transaction
NonStop Server
NSASJ EJB Container
NSMQ
Client RA
App
EJBNSMQ
NSMQ Architecture and ComponentsA client application creates and
sends JMS messages.
The Parallel I/O sub system of
TCP/IPv6 balances the load across
the NSMQ brokers
The Cluster of NSMQ brokers.
Messages are stored in SQL/MX
database to prevent data loss.
A client application which receives
and processes messages© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
12/5/2013
20
ScalabilityNSMQ brokers are
interconnected to handle
additional load
All the brokers establish a duplex
connection with other brokers
Messages are exchanged
between brokers dynamically
Consumers connected to any of
the broker has access to the
messages residing in any broker.© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Fault Tolerance and High AvailabilityEvery NSMQ broker is run as a
master and slave processes.
The master process caters to the
requests of the clients.
In the event of master failure, the
client takes over the
responsibilities of the master.
The messages are stored in the
SQL/MX database before
dispatch. © Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
12/5/2013
21
JEE functionality on NonStop
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
© Copyright 2012 Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice.
Questions Raised ( by Customer Newbies to NonStop )
• Scaling OLTP for cpus/cores?
• The File Loader problem?
• Cost of Java compared to COBOL?
• Need to learn TS/MP and JToolkit?
12/5/2013
22
Questions Answered
• Scaling OLTP for cpus/cores?
JEE …..iTPWS/NSJSP NSASJ NSMQ all scale by configuration
without programmer code
RYO (Custom) …..
Use Farm/Cluster distributed model
Mapto TS/MP if possible
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Questions Answered
• The File Loader design problem?
HP accept that for Utility/Batch type programs MPP requires
more design effort due to lack of Globally shared memory.
A trade-off for the benefits of NonStop Architecture with
Continuously Available production OLTP applications.
Techniques such as disc-based context would be recommended.
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
12/5/2013
23
Questions Answered• Cost of Java compared to COBOL?
Good analysis by them of their test case
Small Benchmarks = OK
Full Applications
- dynamic managed environment vs static data language = NOK
- extensive use of libraries = ?/NOK
JDBC
- should use Prepare/Execute
- MFC helps reduce compilation and start-up costs
- cost of parameter/results marshalling© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Questions Answered• Cost of Java compared to COBOL?
(Good analysis of test case)
With TS/MP
- JPathway marshalling can be expensive
(They identified this)
- JI should be less expensive
(but Java clients only)
- Java /COBOL/C++ = not technical, a user trade-off
( what they recognised) © Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
12/5/2013
24
Questions Answered
• Need to learn TS/MP and JToolkit?
JI (again)
But only supports Java Clients !
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
Using Java on Integrity NonStop• Architecture is the Key --------------�
- exploit Clustered IP and TS/MP
• JVM Startup hints
- Class Loading and .war unpacking
(WLS could be very bad)
- JDBC preparation, use pools and MFC
- artificial warm-up to prime JIT
• NSJSP Sessions, avoid if possible, keep small
- MyFaces can be expensive , consider GWT
• Review use of libraries
• Manage object lifecycles for gc , very short or very long
The application should be capable of being deployed on a
farm/cluster of systems, by either replication of instances or
by distribution of the components of a single instance.
All components of the application should be replicable
within or across instances to ensure availability and
scalability of the application.
There should be no reliance upon global shared memory
between processor units nor upon sequenced serialization
such as allocation of strictly sequential identifiers or rigid
time-ordered processing.
© Copyright 2012 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.
12/5/2013
25
© Copyright 2013 Hewlett-Packard Development Company, L.P. The information contained herein is subject to change without notice.53
Modern NonStop middleware stack
Financial
ServicesHealthcare & Public Sector
ManufacturingCommunication
Media Entertainment
Certified Java SE Platform (JDK and JVM) (NSJ)
Clustering Availability Scalability Transactions
NonStop OS
NonStop TS/MP NonStop TMF
iTP Web Server
All Modern
All Standard
All NonStop
SASH(Open Source Java)
Jtoolkit SOAPNSJSP
(Tomcat Servlets)
NSDEE(Eclipse)
NSASJ
(EJB of JBoss)
NSMQ(ActiveMQ)
Cache*
JI
© Copyright 2012 Hewlett-Packard Development Company, L.P.
The information contained herein is subject to change without notice.
Thank you
The Full Java Ecosystem now on HP NonStop
Java Infrastructurethe new key to TS/MP for Java