Replication & EJB Graham Morgan. EJB goals Ease development of applications –Hide low-level details such as transactions. Provide framework defining the.

Slides:



Advertisements
Similar presentations
J0 1 Marco Ronchetti - Basi di Dati Web e Distribuite – Laurea Specialistica in Informatica – Università di Trento.
Advertisements

11 Copyright © 2005, Oracle. All rights reserved. Creating the Business Tier: Enterprise JavaBeans.
JNDI Java Naming Directory Interface JNDI is an API specified in Java that provides naming and directory functionality to applications written in Java.
Approaches to EJB Replication. Overview J2EE architecture –EJB, components, services Replication –Clustering, container, application Conclusions –Advantages.
A DAPT IST Replication Framework: Progress Report Vance Maverick University of Bologna Dec. 11, 2003.
EEC 688/788 Secure and Dependable Computing Lecture 12 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB JavaForum.
Notes to the presenter. I would like to thank Jim Waldo, Jon Bostrom, and Dennis Govoni. They helped me put this presentation together for the field.
Sapana Mehta (CS-6V81) Overview Of J2EE & JBoss Sapana Mehta.
Introduction to Enterprise JavaBeans. Integrating Software Development Server-side Component Model Distributed Object Architecture –CORBA –DCOM –Java.
Application Server Lecture Paulo Barroso Kris Carver Todd Kitterman Eric Silva.
Copyright W. Howden1 Lecture 19: Intro to O/O Components.
EEC 693/793 Special Topics in Electrical Engineering Secure and Dependable Computing Lecture 12 Wenbing Zhao Department of Electrical and Computer Engineering.
Basic Services: Architecture Options Vance Maverick ADAPT Bologna Feb. 13, 2003.
July 23 th, 2005 Software Architecture in Practice RiSE’s Seminars Bass’s et al. Book :: Chapter 16 Fred Durão.
J2EE Kenneth M. Anderson CSCI Web Technologies October 3, 2001.
.NET Mobile Application Development Introduction to Mobile and Distributed Applications.
Emmanuel Cecchet et al.  Performance Scalability of J2EE application servers.  Test effect of: ◦ Application Implementation Methods ◦ Container Design.
EJB Fundamentals Celsina Bignoli
EJB. Component Characteristics An enterprise Bean typically contains business logic that operates on the enterprise’s data. An enterprise Bean’s instances.
1 J2EE Components. 2 Application Servers relieve the programming burden for business distributed components. They provide support for system level services.
1 Session Bean Chuyên đề Lập trình Java & J2EE Chương 14 Biên soạn: Th.S Nguyễn văn Lành.
J2EE Part 2: Enterprise JavaBeans CSCI 4300 Images and code samples from jGuru EJB tutorial,
6st ACS Workshop UTFSM ACS Course Component, Container, Lifecycle Management 6st ACS Workshop UTFSM, Valparaiso, Chile H. Sommer, G. Chiozzi.
Enterprise Java Bean Matt. 2 J2EE 3 J2EE Overview.
CD Database Server (CDDB) Zachary Carter Alan Savage Diana Abbas Kyle Dorman.
Enterprise JavaBeans. Lesson 1: Introduction to Server-Side Component Software.
Enterprise JavaBeans. What is EJB? l An EJB is a specialized, non-visual JavaBean that runs on a server. l EJB technology supports application development.
Introduction to J2EE Architecture Portions by Kunal Mehta.
EJB Framework.  As we know, EJB is the center of the J2EE architecture that provides a sturdy framework for building enterprise applications. The major.
第十四章 J2EE 入门 Introduction What is J2EE ?
Enterprise Java Beans Java for the Enterprise Server-based platform for Enterprise Applications Designed for “medium-to-large scale business, enterprise-wide.
J2EE Overview ver 1.0Page 1 © Wipro Technologies Talent Transformation J2EE Overview.
1 Introduction to Middleware. 2 Outline What is middleware? Purpose and origin Why use it? What Middleware does? Technical details Middleware services.
Source: Peter Eeles, Kelli Houston, and Wojtek Kozaczynsky, Building J2EE Applicationa with the Rational Unified Process, Addison Wesley, 2003 Prepared.
Component frameworks Roy Kensmil. Historical trens in software development. ABSTRACT INTERACTIONS COMPONENT BUS COMPONENT GLUE THIRD-PARTY BINDING.
Enterprise JavaBeans Understanding EJB Components Version 0.1 Kamal Wickramanayake
Databases JDBC (Java Database Connectivity) –Thin clients – servlet,JavaServer Pages (JSP) –Thick clients – RMI to remote databases –most recommended way.
1 Java EE Programming Enterprise JavaBeans. 2 Topics J2EE Overview Enterprise JavaBeans Overview Enterprise Entity Beans Case Study How to build them.
Liang, Introduction to Java Programming, Seventh Edition, (c) 2009 Pearson Education, Inc. All rights reserved Chapter 43 Remote Method Invocation.
Shuman Guo CSc 8320 Advanced Operating Systems
Introduction to Enterprise JavaBeans Topics In Systems Architecture Barry Herbold
Jini Architecture Introduction System Overview An Example.
Assignment of JAVA id : BSSE-F10-M-10-JAVA1 Overview of J2EE/Session 2/Slide 1 of 38.
Jini Architectural Overview Li Ping
Chapter 4 Wenbing Zhao Department of Electrical and Computer Engineering Cleveland State University Building Dependable Distributed Systems.
© FPT SOFTWARE – TRAINING MATERIAL – Internal use 04e-BM/NS/HDCV/FSOFT v2/3 JSP Application Models.
Component Patterns – Architecture and Applications with EJB copyright © 2001, MATHEMA AG Component Patterns Architecture and Applications with EJB Markus.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
1 Distributed Systems Distributed Object-Based Systems Chapter 10.
Introduction to EJB. What is an EJB ?  An enterprise java bean is a server-side component that encapsulates the business logic of an application. By.
Java Programming: Advanced Topics 1 Enterprise JavaBeans Chapter 14.
Copyright © 2002 ProsoftTraining. All rights reserved. Enterprise JavaBeans.
Enterprise JavaBeans. Lesson 1: Introduction to Server-Side Component Software.
EJB Replication Graham, Iman, Santosh, Mark Newcastle University.
EJB. Introduction Enterprise Java Beans is a specification for creating server- side scalable, transactional, multi-user secure enterprise-level applications.
Tanenbaum & Van Steen, Distributed Systems: Principles and Paradigms, 2e, (c) 2007 Prentice-Hall, Inc. All rights reserved DISTRIBUTED SYSTEMS.
EJB (Enterprise Java Beans)
Enterprise Java Bean. Overview of EJB View of EJB Conversation Roles in EJB, Types of Enterprise Beans Lifecycle of Beans Developing Applications using.
DISTRIBUTED SYSTEMS Principles and Paradigms Second Edition ANDREW S
Introduction to Enterprise JavaBean
Understanding and Designing with EJB
Distributed Object-based systems
Chapter 40 Remote Method Invocation
JINI ICS 243F- Distributed Systems Middleware, Spring 2001
Chapter 46 Remote Method Invocation
Component-based Applications
Understanding and Designing with EJB
Chapter 46 Remote Method Invocation
Enterprise Java Beans.
Presentation transcript:

Replication & EJB Graham Morgan

EJB goals Ease development of applications –Hide low-level details such as transactions. Provide framework defining the handling of clients, servers and components. –Promote a standard way for client/server applications to be built. –EJB components should run in any EJB-compliant server. JavaBeans are components but differ from EJBs as containers and “higher level” documentation are not addressed by JavaBeans specification. –JavaBeans are accommodated by infrastructures supported by vendors (e.g., drag and drop development environments (such as Delphi).

Components, containers, servers Component –Java class that implements “business logic”. Container –Hosts components (possibly multiple instances). Enhances components with services such as transactions and persistence (depending on the requirements of the components). –For example, if transaction is to be aborted the container assumes responsibility for the abort. Server –Hosts containers. Makes available services to containers.

EJB elements Bean Objects Remote interface Recently renamed Component Interface Home interface Container Services PersistenceTransaction Naming EJBObjects EJBObjects – delegates client requests to EJB instances. Wrapper functions may allow container to provide additional services (e.g., transactions). RMI used to enable client communication. Generated automatically by vendor tools. Home interface – provides lifecycle type services on a per class basis and lookup methods for locating existing beans within a container. Implementation generated by vendor tools. Container – implements required bean properties via the use of standard services (e.g., transactions). Container vendor – provides deployment tools to automatically generate EJBObjects to enable successful integration of beans with required services. Naming - consists of an API and an SPI (Service Provider Interface). The SPI enables a variety of naming and directory services to be plugged in transparently, allowing the Java application using the API of the JNDI technology to access their services. The Java Naming and Directory Interface TM

Exploiting mechanisms provided by transaction and group services for replication of beans. Transaction service –Recovery – ensure shared information on stable store is manipulated consistently despite failures. –Concurrency control – a replica group may be locked for write access only. Assuming deterministic machine approach to replication, states of replicas will not deviate. Group service –Failure suspicion – identifying failure and making it possible to reattempt an aborted transaction in a transparent manner to the client. –Atomic multicast – ensuring all or zero members of a replica group receive a multicast. Required to ensure all members of a group are write locked.

Replication & transactions Object Data stores Objects Data stores C1 C2C3C2 End-to-end transaction Replicated objects and data stores - can still commit if a replica succeeds.

A typical scenario of clients accessing non- replicated service ClientsBean Data store

Scenario 1 – Replicated data store. CleintsBean Data store Availability is limited as availability of service dependent on availability of single bean. When bean fails another entity bean may be instantiated (possibly on another server if required) to continue serving clients. Naming service Naming service plays an important role in ensuring all clients have access to a single instance of the bean.

Scenario 2 – Replicated bean. ClientsBeans Data stores Possibility of speedier reply to client as availability higher. Opportunity for greater number of entity replicas than data stores. Transaction may commit as long as a bean succeeds. Container A Container B Replicating beans over different containers and different machines is desirable. Require the replication of bean components (e.g., home interface).

Initial implementation – concentrating on the beans. R1R2 Bean ObjectsEJBObjects Client request Parse the EJBobject code (via tool or manually) and insert replication mechanism that intercepts client request and provides required replication scheme. Client access issues: (1)alter the EJBobject code (client side) to enable automatic reissue of bind request to naming service if current object binding fails or (2)enable multicast (transparent to client application) of client request to all replicas. Requires callback to client when group membership changes occur. Administration issues: (1)replication requirements may be described in a beans deployment descriptor. (2)containers providing replication schemes may provide a tool allowing the management of a system during runtime. Inter-object group communications

Providing a replication enabled container Services TransactionsGroup Comms Naming EJBObject Container EJB Server Bean M1 M2 M3 M1 –interception of original client request. M2 – required message passing for ensuring replication policy. M3 – further message passing to fulfill requirements. We assume EJB server resides on a single node and has access to services to ensure replication policies may be achieved.

Bean location and discovery issues To ensure success of replication scheme all elements of EJB (including clients) must have access to a highly available naming service. –Clients may need to rebind when failure occurs and this is not possible if failure occurs in the naming service and naming service is single point of failure. Naming service itself requires replication over a number of nodes. –This is complicated by the presence of the home interface which is designed for locating specific instances of beans in containers. –Agreement must be reached on what beans to interact with. For example, assume passive replication (primary and backups). Naming service must always provide name of the same primary to all clients.

Other considerations How do we handle beans that make use of asynchronous messaging? –Example - when a client buys a book, an inventory bean could notify an ordering bean of a low stock situation. This notification may be asynchronous, freeing the client from having to wait while reordering operation completes. How do we generate the code? –There needs to be some tool that provides code/wrapper objects for replicated beans. In essence, we provide a replication enabled container. However, how do we provide administrative support at run-time for our service? Do we treat entity and session beans differently? –Entity beans are long lived persistent components that may have many clients whereas session beans are short lived non-persistent components that exist on a per-client basis.

Conclusions Good opportunity to exploit both transactions and group communications to provide replication at the component level. Bean location and discovery looks to be a problem. Will have to automatically generate code “container style”. Providing runtime administration support does not look easy. Require further investigation into specific replication schemes (active & passive). Providing EJB replication appears to be more challenging that first thought.