Data Management in Application Servers. Dean Jacobs BEA Systems

Similar documents
Distributed Computing with BEA WebLogic Server

Java Enterprise Edition

Contents at a Glance. vii

Deccansoft Software Services. J2EE Syllabus

J2EE Development. Course Detail: Audience. Duration. Course Abstract. Course Objectives. Course Topics. Class Format.

PASS4TEST. IT Certification Guaranteed, The Easy Way! We offer free update service for one year

Web Application Development Using JEE, Enterprise JavaBeans and JPA

<Insert Picture Here> WebLogic JMS Messaging Infrastructure WebLogic Server 11gR1 Labs

Java EE 6: Develop Business Components with JMS & EJBs

Chapter 6 Enterprise Java Beans

Web Application Development Using JEE, Enterprise JavaBeans and JPA

Component-Based Software Engineering. ECE493-Topic 5 Winter Lecture 26 Java Enterprise (Part D)

Overview p. 1 Server-side Component Architectures p. 3 The Need for a Server-Side Component Architecture p. 4 Server-Side Component Architecture

Web Design and Applications

EJB ENTERPRISE JAVA BEANS INTRODUCTION TO ENTERPRISE JAVA BEANS, JAVA'S SERVER SIDE COMPONENT TECHNOLOGY. EJB Enterprise Java

Database code in PL-SQL PL-SQL was used for the database code. It is ready to use on any Oracle platform, running under Linux, Windows or Solaris.

Implementing a Web Service p. 110 Implementing a Web Service Client p. 114 Summary p. 117 Introduction to Entity Beans p. 119 Persistence Concepts p.

BEAAquaLogic. Service Bus. Interoperability With EJB Transport

Java EE 7: Back-End Server Application Development

Oracle EXAM - 1Z Java EE 6 Enterprise JavaBeans Developer Certified Expert Exam. Buy Full Product.

Exam Questions 1Z0-895

BEAWebLogic Server. Introduction to BEA WebLogic Server and BEA WebLogic Express

In the most general sense, a server is a program that provides information

J2EE - Version: 25. Developing Enterprise Applications with J2EE Enterprise Technologies

index_ qxd 7/18/02 11:48 AM Page 259 Index

JVA-163. Enterprise JavaBeans

NetBeans IDE Field Guide

White Paper. Major Performance Tuning Considerations for Weblogic Server

WebLogic JMS Clustering. Jayesh Patel

Fast Track to EJB 3.0 and the JPA Using JBoss

Enterprise Java Unit 1-Chapter 2 Prof. Sujata Rizal Java EE 6 Architecture, Server and Containers

Developing Applications with Java EE 6 on WebLogic Server 12c

Bipul Sinha, Amit Ganesh, Lilian Hobbs, Oracle Corp. Dingbo Zhou, Basavaraj Hubli, Manohar Malayanur, Fannie Mae

Oracle WebLogic Server

WebSphere 4.0 General Introduction

Enterprise JavaBeans, Version 3 (EJB3) Programming

Chapter 2 WEBLOGIC SERVER DOMAINS. SYS-ED/ Computer Education Techniques, Inc.

Wasser drauf, umrühren, fertig?

SUN Sun Certified Enterprise Architect for J2EE 5. Download Full Version :

Adapter for Mainframe

BEAWebLogic Server and WebLogic Express. Programming WebLogic JNDI

Upgrading Custom Java EE Applications from Oracle Application Server to WebLogic Server

BEA WebLogic. Server. MedRec Clustering Tutorial

Oracle 10g: Build J2EE Applications

Mastering BEA WebLogic Server Best Practices for Building and Deploying J2EE Applications

Using Clusters for Oracle WebLogic Server g Release 1 (10.3.6)

Java EE Architecture, Part Two. Java EE architecture, part two 1

Techniques for Building J2EE Applications

Vision of J2EE. Why J2EE? Need for. J2EE Suite. J2EE Based Distributed Application Architecture Overview. Umair Javed 1

Notes. Submit homework on Blackboard The first homework deadline is the end of Sunday, Feb 11 th. Final slides have 'Spring 2018' in chapter title

BEA WebLogic Server. and BEA WebLogic Express. Introduction to BEA WebLogic Server 6.1

CO Java EE 7: Back-End Server Application Development

Administering Clusters for Oracle WebLogic Server 12c (12.1.2)

IBM. Enterprise Application Development with IBM Web Sphere Studio, V5.0

Oracle WebLogic Server 11g: Administration Essentials

WebLogic JMS System Best Practices Daniel Joray Trivadis AG Bern

1Z Oracle. Java Enterprise Edition 5 Enterprise Architect Certified Master

Server and WebLogic Express

Diplomado Certificación

Projects. How much new information can fit in your brain? Corporate Trainer s Profile TECHNOLOGIES

Oracle9iAS Tech nicaloverview

(9A05803) WEB SERVICES (ELECTIVE - III)

"Charting the Course... Mastering EJB 3.0 Applications. Course Summary

Application Servers in E-Commerce Applications

Introduction. Enterprise Java Instructor: Please introduce yourself Name Experience in Java Enterprise Edition Goals you hope to achieve

Oracle Fusion Middleware

Java- EE Web Application Development with Enterprise JavaBeans and Web Services

TOPLink for WebLogic. Whitepaper. The Challenge: The Solution:

BEAWebLogic. Server. Automatic and Manual Service-level Migration

Enterprise JavaBeans 3.1

CMP 436/774. Introduction to Java Enterprise Edition. Java Enterprise Edition

J2EE Application Server. EJB Overview. Java versus.net for the Enterprise. Component-Based Software Engineering. ECE493-Topic 5 Winter 2007

BEAAquaLogic. Service Bus. JPD Transport User Guide

2017, IBM Corporation Liberty z/os Good Practices. WebSphere Liberty z/os Applications and Application Deployment

these methods, remote clients can access the inventory services provided by the application.

ENTERPRISE beans are the J2EE components that implement Enterprise Java-

KINGS COLLEGE OF ENGINEERING DEPARTMENT OF COMPUTER SCIENCE & ENGINEERING ACADEMIC YEAR (ODD SEMESTER) QUESTION BANK

Chapter 1 Introducing EJB 1. What is Java EE Introduction to EJB...5 Need of EJB...6 Types of Enterprise Beans...7

Distributed Transactions and PegaRULES Process Commander. PegaRULES Process Commander Versions 5.1 and 5.2

Oracle Fusion Middleware

X100 ARCHITECTURE REFERENCES:

Oracle - Developing Applications for the Java EE 7 Platform Ed 1 (Training On Demand)

PATROL for BEA WebLogic User Guide. Version

BEA WebLogic. Server. Introduction to WebLogic Server and WebLogic Express

Call: JSP Spring Hibernate Webservice Course Content:35-40hours Course Outline

Sun Java System Application Server 8.1: Administration & Deployment

Introduction to componentbased software development

Oracle Fusion Middleware 11g: Build Applications with ADF I

BEAWebLogic. Server. Introduction to WebLogic Server and WebLogic Express. Version 8.1 Revised: June 28, 2006 Part Number:

Oracle Banking APIs. Part No. E Third Party Simulation Guide Release April 2018

Market leading web application server product

Example Purchase request JMS & MDB. Example Purchase request. Agenda. Purpose. Solution. Enterprise Application Development using J2EE

BEA WebLogic Server. Using WebLogic Server Clusters

Plan. Department of Informatics. Advanced Software Engineering Prof. J. Pasquier-Rocha Cours de Master en Informatique - SH 2003/04

Multi-tier architecture performance analysis. Papers covered

Appendix A - Glossary(of OO software term s)

IBM WebSphere Application Server V4.0. Performance. 10/02/01 Copyright 2001 IBM Corporation WS40ST11.prz Page 248 of of 28

Exam Actual. Higher Quality. Better Service! QUESTION & ANSWER

WebLogic Server- Tips & Tricks for Troubleshooting Performance Issues. By: Abhay Kumar AST Corporation

J2EE Interview Questions

Transcription:

Data Management in Application Servers Dean Jacobs BEA Systems

Outline Clustered Application Servers Adding Web Services

Java 2 Enterprise Edition (J2EE) The Application Server platform for Java Java Servlets / Java Server Pages (JSP) Enterprise Java Beans (EJB) Stateless Session, Stateful Session, Entity Java Messaging Service (JMS) Java Database Connection (JDBC) Java Connector Architecture (JCA) Java Naming & Directory Interface (JNDI) Java Transaction API (JTA)

The BEA WebLogic Server All Java, clean-room implementation of the J2EE Shipping basic APIs since 1997 One of the most widely-used Application Servers on the market Over 12,000 customers Associated BEA product: TUXEDO Distributed TP Monitor Originally developed at Bell Labs in 1984 Influenced the design of WebLogic

WebLogic Cluster Architecture Load Balancing & Failover Points #1 #2 #3 #4 Browsers Web Servers Servlet Engines (JSP) Object Servers (JMS/EJB) Databases (JDBC)

Data Management Essential to distribute and maintain data outside of the monolithic backend to improve scalability and performance Facilitated by relaxing traditional ACID properties of the data Especially appropriate for reference and transient data WebLogic accomplishes this using five basic service types, which differ in their treatment of internal state The J2EE APIs are implemented in terms of these service types

Service Types 1 Stateless 2 Conversational State in memory Persistent Consistent Reads APIs EJB/JMS/JDBC/JCA factories, JSP SSS, EJB Stateless/Entity JSP SSS, EJB Stateful 3 Cached Some JSP fragments, EJB Entity 4 Optimistic Some EJB Entity 5 Singleton JMS destinations, JTA Tx Managers, Admin Server

Stateless Services Server 1 O1 acme eng grompler O1 O2 Server 2 O2 acme eng grompler O1 O2 O1 O2 Client

Service Types 1 Stateless 2 Conversational State in memory Persistent Consistent Reads APIs EJB/JMS/JDBC/JCA factories, JSP SSS, EJB Stateless/Entity JSP SSS, EJB Stateful 3 Cached Some JSP fragments, EJB Entity 4 Optimistic Some EJB Entity 5 Singleton JMS destinations, JTA Tx Managers, Admin Server

Session State Replication #1 #2 A B A CB Browser Web Servers B C Servlet Engines

Session State Replication #1 A #3 C A B B Browser C Web Server Servlet Engine

Service Types 1 Stateless 2 Conversational State in memory Persistent Consistent Reads APIs EJB/JMS/JDBC/JCA factories, JSP SSS, EJB Stateless/Entity JSP SSS, EJB Stateful 3 Cached Some JSP fragments, EJB Entity 4 Optimistic Some EJB Entity 5 Singleton JMS destinations, JTA Tx Managers, Admin Server

Caching Strategies Flush at regular intervals (TTL) Best when data is frequently updated Flush after an update completes Best when data is infrequently updated Implemented using multicast Manual flush API to allow notification of backdoor updates Pre-load and refresh (t currently supported) Interesting to persist the data remotely Refresh at regular intervals (data warehouse) or after update (data replication) Facilitates querying through the cache Worthwhile primarily for data that will be hit many times per refresh

Transactional Reads Authoritative copy of the data in a database The service maintains a copy in memory between invocations Reads by any client use the in-memory copy The challenge: Maintain consistency with the database given updates that go through other instances or the backdoor Possible solutions Distributed concurrency control Centralized lock manager Use the database Partition so exactly one copy of each data item

Service Types 1 Stateless 2 Conversational State in memory Persistent Consistent Reads APIs EJB/JMS/JDBC/JCA factories, JSP SSS, EJB Stateless/Entity JSP SSS, EJB Stateful 3 Cached Some JSP fragments, EJB Entity 4 Optimistic Some EJB Entity 5 Singleton JMS destinations, JTA Tx Managers, Admin Server

Optimistic Services Use the database to implement optimistic concurrency control for transactions with writes protection for read-only transactions Upon commit, compare the before-and-after values of fields that were read and throw a concurrency exception if they don t match Can be done fairly efficiently using UPDATE-WHERE Does not require modification of the database schema To minimize the likelihood of such exceptions, flush after updates occur (but not within the transaction) Does not ensure serializability in that, for example, an increment and decrement of the same field will look like it was not modified This is a feature in that it allows safe but non-serializable transactions

Service Types 1 Stateless 2 Conversational State in memory Persistent Consistent Reads APIs EJB/JMS/JDBC/JCA factories, JSP SSS, EJB Stateless/Entity JSP SSS, EJB Stateful 3 Cached Some JSP fragments, EJB Entity 4 Optimistic Some EJB Entity 5 Singleton JMS destinations, JTA Tx Managers, Admin Server

Availability of Singleton Services Harden individual servers Multiple execute queues / thread pools Deny rather than degrade service Redundant networks Restart failed and ailing servers Lifecycle and health monitoring APIs Under control of a nanny daemon or HA framework Upgrade without interruption Rolling upgrade of servers Hot redeploy of applications Migrate singleton services Manually from the Administrative console Automatically using distributed agreement to avoid split-brain syndrome

Outline Clustered Application Servers Adding Web Services

WSDL Web Services Description Language Payload/transport-neutral but demands support for SOAP/HTTP Specifies a set of service signatures of various types One-way Receive a message Request-response Receive a message and send a correlated message Solicit-response Send a message and receive a correlated message tification Send a message Implies an interesting programming model Can be implemented in terms of the J2EE, but demands at least special packaging and optimizations

Web Services Programming Model Unified model for synchronous RPC and asynchronous messaging Queuing should occur under the covers for one-way messages A typed messaging model, like MS queued components and unlike JMS Peer-to-peer conversational services An object on each side representing the state of the conversation Either side can initiate communication regarding the conversation Conversations have finite but potentially long lifetimes One local transaction per service invocation start() continue() finish() A B

Dependent Conversations Callbacks realized using the listener pattern B registers with C as a bar listener A mechanism for isolating the interfaces must be provided B should not expose bar to A B may want to also register with D as a bar listener Implement as a dependent sub-object A conversation may have several simultaneous users goo() mar() foo() bar() A B C

Asymmetry Between Peers The initiator A plays a different role than the responder B All services that may be invoked within the conversation are described in the WSDL of the responder Incremental step beyond client/server where the client can be asynchronously contacted In keeping with the realities of managing distributed computations If both are servers, B may invoke a service described in A s WSDL, but then it is a different conversation and the roles are reversed foo() bar() A B

Queuing An option for both in-bound and out-bound messages One input/output queue pair co-located with each deployed instance of a Web Service in a cluster Messages stored in serialized format (XML rather than Java) to facilitate loose coupling Participate in future Web Services protocols for reliable messaging Decision of whether or not to store messages durably should be tied to the properties of the conversation

Conversations Durable conversations Expected to survive backend server failures Also applies to messages that have been queued for/by them Requires ACID transactions, which limits performance and scalability n-durable conversations Kept in memory along with any messages that have been queued for/by them May be paged out to free memory, but writes are not required to hit the disk and the data is not expected to survive server failures Co-locating the conversation with its messages provides a nice unit of failure, in that both are wiped out together Appropriate when reliability is provided by the application and for shoppingcart and read-only applications

Implementing n-durable Conversations The hard part is tracking them down within a cluster A peer-to-peer version of servlet session state A basic design goal is to not use singleton services, since they reduce performance and scalability which partially defeats the optimization A better approach is to rely on session affinity when it is available and routing based on conversation IDs (CIDs) when it is not

Finding Conversations Session Affinity Widely-applicable because conversation identity can be based on anything, even application data Efficient because it eliminates the need for extra hops inside the cluster For HTTP, can be achieved using DNS or a hardware load balancer Regardless, there will be circumstances where session affinity fails, particularly for long-lived conversations CID-Based Routing Accomplished by embedding server identity in the CID Should occur before queuing BEA is attempting to standardize protocols that support Dual CIDs, where each side gets to specify a CID that the other side is expected to use Even if that is successful, there is a pattern a sequence messages sent without waiting for any response where CID-based routing is not possible

www.bea.com