Constructing distributed applications using Xbeans

Similar documents
Distributed Xbean Applications DOA 2000

Constructing distributed applications using Xbeans

XML APIs Testing Using Advance Data Driven Techniques (ADDT) Shakil Ahmad August 15, 2003

Embedded Web Server Architecture for Web-based Element Management and Network Management

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

NetBeans IDE Field Guide

Extreme Java G Session 5 - Main Theme Java Core Technologies (Part III) Dr. Jean-Claude Franchitti

Hospitality Industry Technology Integration Standards Glossary of Terminology

Outline. Introduction to Java. What Is Java? History. Java 2 Platform. Java 2 Platform Standard Edition. Introduction Java 2 Platform

Lecture 15: Frameworks for Application-layer Communications

Lecture 15: Frameworks for Application-layer Communications

COMPARATIVE STUDY OF TECHNOLOGIES RELATED TO COMPONENT-BASED APPLICATIONS BASED ON THEIR RESPONSE TIME PERFORMANCE

Introduction to Web Services & SOA

FIPA-OS Feature Overview. Agent Technology Group Nortel Networks February 2000

Design and Implementation of Computer Room Management System in University

Differentiating Parameters for Selecting Simple Object Access Protocol (SOAP) vs. Representational State Transfer (REST) Based Architecture

Appendix A - Glossary(of OO software term s)

Raising the Level of Development: Models, Architectures, Programs

SOFTWARE COMMUNICATIONS ARCHITECTURE SPECIFICATION APPENDIX A: GLOSSARY

ODF API - ODFDOM. Svante Schubert Software Engineer Sun Microsystems, Hamburg

Enterprise Workflow Resource Management

Introduction. Chapter 1:

Lecture 1: Overview of Java

An introduction to MOF MetaObject Facility.

A Web Service-Based System for Sharing Distributed XML Data Using Customizable Schema

Introduction to Web Services & SOA

11. EXTENSIBLE MARKUP LANGUAGE (XML)

The Eclipse Modeling Framework and MDA Status and Opportunities

National Language Support for Windows NT and AIX Now Available with IBM WebSphere Application Server V3.0.1, Standard Edition

A Distributed Query Engine for XML-QL

Stand: File: gengler_java_e. Java Community Process: Not perfect, but operating very successfully

Chapter 4 Research Prototype

SOFTWARE COMMUNICATIONS ARCHITECTURE SPECIFICATION APPENDIX A: GLOSSARY

Application Servers in E-Commerce Applications

Structured Data Representation for Multiple Programming Languages on Java VM

Inventions on using LDAP for different purposes- Part-3

Oracle Database 12c: Use XML DB

Architectural Styles I

EMC Documentum xdb. High-performance native XML database optimized for storing and querying large volumes of XML content

APM. Object Monitor. Object Lab. Richard Hayton & Scarlet Schwiderski

J2EE Interview Questions

An UML-XML-RDB Model Mapping Solution for Facilitating Information Standardization and Sharing in Construction Industry

2779 : Implementing a Microsoft SQL Server 2005 Database

IBM XML Toolkit for z/os and OS/390, V1.5 Supports XML Open Standards for Java and C++ Parsers and Java XSLT Processor

Building Better Interfaces: HL7 Conformance Profiles

DQpowersuite. Superior Architecture. A Complete Data Integration Package

Engr. M. Fahad Khan Lecturer Software Engineering Department University Of Engineering & Technology Taxila

AN EXTENSION TO A CORBA TRADER TO SUPPORT XML SERVICE DESCRIPTIONS

UNITE 2006 Technology Conference

Asynchronous Web Services: From JAX-RPC to BPEL

Enterprise JavaBeans (I) K.P. Chow University of Hong Kong

Chapter 6 Architectural Design. Lecture 1. Chapter 6 Architectural design

Architecting great software takes skill, experience, and a

Agent-Enabling Transformation of E-Commerce Portals with Web Services

Tools to Develop New Linux Applications


Building Web Services in Java

M359 Block5 - Lecture12 Eng/ Waleed Omar

Getting Started with Web Services

DESIGN AND IMPLEMENTATION OF TOOL FOR CONVERTING A RELATIONAL DATABASE INTO AN XML DOCUMENT: A REVIEW

Introduction to JAVA Programming Language

What s new with EntireX Communicator 7.3 Rolf Bahlke crossvision Chief Architect

Architectural Design Outline

Middleware. Adapted from Alonso, Casati, Kuno, Machiraju Web Services Springer 2004

How To Get Database Schema In Java Using >>>CLICK HERE<<<

Software Paradigms (Lesson 10) Selected Topics in Software Architecture

By Chung Yeung Pang. The Cases to Tackle:

An RDF NetAPI. Andy Seaborne. Hewlett-Packard Laboratories, Bristol

UNITE 2003 Technology Conference

Geoffrey Fox Community Grids Laboratory Indiana University

What Does Xml Data Has Failed Schema Validation Mean

The Specifications Exchange Service of an RM-ODP Framework

Database System Concepts

Beginning To Define ebxml Initial Draft

How to be a Good Bean

Distributed Systems Project 4 Assigned: Friday March 20 Due: Friday April 3, 11:59pm

Introduction to Programming

Design and Implementation of XML DBMS Based on Generic Data Model * 1

CORBA Components - Volume I

Chapter 1: Introduction

Chapter 1: Introduction

Data Presentation and Markup Languages

25. DECUS Symposium THE Application Development Environment for OpenVMS

(C) Global Journal of Engineering Science and Research Management

An Introduction to Software Architecture. David Garlan & Mary Shaw 94

The Extensible Markup Language (XML) and Java technology are natural partners in helping developers exchange data and programs across the Internet.

Advanced Database Applications. Object Oriented Database Management Chapter 13 10/29/2016. Object DBMSs

Develop Unified SNMP, XML, CLI, and Web-based Management for Embedded Real-Time Systems with MIBGuide

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

Internet Application Developer

1. INTRODUCTION. IJCTA, 9(23), 2016, pp International Science Press. Parveen Kumar* and Pradeep Tomar**

XML Processing & Web Services. Husni Husni.trunojoyo.ac.id

Working with XML and DB2

Test On Line: reusing SAS code in WEB applications Author: Carlo Ramella TXT e-solutions

Chapter 1: Introduction. Chapter 1: Introduction

Component-based Architecture Buy, don t build Fred Broks

Modular Java Applications with Spring, dm Server and OSGi

Outline. EEC-681/781 Distributed Computing Systems. The OSI Network Architecture. Inter-Process Communications (IPC) Lecture 4

MD Link Integration MDI Solutions Limited

Standard Business Rules Language: why and how? ICAI 06

Transcription:

Constructing distributed applications using Xbeans Bruce Martin jguru, San Mateo, USA martin@jguru.com http://www.jguru.com Abstract: An Xbean is a software component that takes XML as input, processes it in some fashion and then passes XML on to the next Xbean. Xbeans are Java Beans. Java Bean technology supports the packaging, reuse, connection and customization of Java code. With the appropriate set of Xbeans and a Java Bean design tool, it is possible to build useful XML-based distributed applications with little or no programming. This paper describes how Xbeans can be easily composed into distributed applications, including data exchange, business to business, work flow and web channel applications. Xbeans.org is an opensource project to build a freely available repository of Xbeans. Introduction The Extensible Markup Language, or XML, has emerged as the universal standard for exchanging and externalizing data. Software products of all kinds are being upgraded to "support XML." Typically this means they can import and export XML data. At the same time, standards groups representing almost every human endeavor are agreeing upon XML DTDs (Documentum Type Definitions) for exchanging data. One of many examples is the International Press Telecommunications Council" These vertical market standards will allow diverse applications to exchange data in unforeseen ways. But just defining standard representations for exchanging data is insufficient. The data need to be integrated with existing applications and databases and processed by programs written in some programming language. To the end of accessing XML data from different programming languages, the W3C has defined the DOM (Document Object Model) standard. The DOM is an application programmer s interface to XML data. It is available from many programming languages, including Java. Thus, Java programs can access XML data via the DOM API. Rather than structuring software that manipulates XML data as mammoth programs, software component technology allows developers to package smaller grained pieces of reusable functionality. Java Beans are software components that support the packaging, reuse, connection and customization of Java code. Design tools allow applications to be created by connecting and customizing existing Java Beans. Xbeans Xbeans are Java Beans that manipulate XML data. With the appropriate set of Xbeans and a Java Bean design tool, it is possible to build useful distributed applications with little or no programming. (We will describe several applications later.) 1

As illustrated in Figure 1, an Xbean consumes XML as input, processes it in some fashion and then produces XML as output. Figure 1. An Xbean consumes XML as input, processes it and then produces XML as output Xbeans consume and produce XML as DOM documents. That is, the data passed to Xbeans are not strings that need to be parsed by an XML parser, but an already parsed document object that is accessed via the w3c standard DOM API. As such, Figure 1 is not precise. Figure 2 shows the Xbean processing more precisely. Figure 2. Xbeans consume and produce XML as DOM documents As shown in Figure 3, Xbeans are connected to each other forming a channel. Data flow from one bean to another in a channel. This is very similar to a UNIX pipe ; typed XML data flow, rather than untyped bytes. Xbeans are also similar to CORBA event channels. 2

Figure 3. Xbeans are connected together into channels Applications of Xbeans The Xbean paradigm is a very general data flow mechanism. XML describes structured data; Java provides the computation and control on the data. As described in detail later, Xbeans are functionally composable simply by supporting a couple of minimal interfaces. We now illustrate the power of the Xbean paradigm with a few distributed application examples: Data exchange between enterprises Enterprises want to exchange data. Industry specific standards efforts are defining XML Data Type Definitions (DTDs). These DTDs represent the semantics and format of the data to be exchanged. Enterprises, however, have their data in their own databases defined by existing schema. That is, no two enterprises represent the same data in the same way. The idea is to access native data, translate it according to a standard DTD, transport it, translate it according to a native DTD and finally store it. Figure 4 illustrates a simple data exchange between enterprises using Xbeans. The blue boxes represent different Xbeans. Figure 4. Data exchange between enterprises using Xbeans Each Xbean is configured appropriately. The accessor Xbean is configured to perform a particular SQL query and represent the result as an XML document. The translator Xbean is configured to translate the incoming XML document into an XML document that conforms to the agreed upon DTD for exchanging data. The sender and receiver Xbeans are configured to cooperate to transport the data. At the enterprise that receives the data, a configured translator translates the data from the agreed upon DTD to a DTD that more closely matches the native schema. Finally the accessor is configured with an SQL query that stores the incoming data appropriately. Purchase order An application of the data exchange given above is a purchase order. In this case the accessor Xbean is configured to perform an SQL query to obtain the data from various tables. The translator is configured to translate the data to conform to the standard DTD for a purchase order and so on. 3

Distributed work flow With a rich set of configured Xbeans that represent control flow and interact with users, Xbeans can be configured to create distributed work flow applications. Web news channels Many web sites are now publishing news and other information as XML of various DTDs so that other web sites can rebroadcast it. Such distributed service could be implemented using the appropriate set of Xbeans. Xbean interfaces To be an Xbean, at least one of two simple Java interfaces must be supported. Any Java bean that implements at least one of these interfaces is an Xbean. The interfaces extend the Java event interfaces. The interfaces are slight variations of the interfaces defined by IBM in their AlphaWorks XML Productivity Kit for Java. The interfaces were changed to better support distributed applications. The DOMListener interface, as given in Figure 5, defines a single operation, documentready (DOMEvent evt), for passing the XML document to the Xbean. public interface DOMListener extends EventListener { public void documentready( DOMEvent evt) throws XbeansException; } Figure 5. The DOMListener interface The DOMSource interface, as given in Figure 6, defines two operations, getdomlistener() and setdom- Listener(DOMListener next), for getting and setting the next Xbean, i.e. the Xbean that will receive the output of the Xbean. The DOMSource interface does not directly support the addition of multiple listeners, most Xbeans only support the registration of a single listener to avoid hidden concurrency issues. The parallelizer Xbean supports multiple listeners, making the concurrency issues apparent at configuration time. public interface DOMSource { public void setdomlistener( DOMListener DOMListener); public DOMListener getdomlistener(); } Source and sink Xbeans Figure 6. DOMSource interface As illustrated in Figure 7, an Xbean that implements the DOMSource interface and uses the DOMListener interface is called a "source Xbean", that is it is a source of XML data. 4

Figure 7. A "source Xbean" implements the DOMSource interface and uses the DOMListener interface An Xbean that implements the DOMListener interface is called a "sink Xbean", that is it receives XML data. Figure 8. Any Java Bean that implements the DOMListener interface is a "sink Xbean" For maximum flexibility, most Xbeans are both sources and sinks of XML data. (See Figure 2.) Configuring Xbeans into distributed applications Source Xbeans have a DOMListener property, as specified in the DOMSource interface. Thus connecting Xbeans simply means setting the property to be the next Xbean. Source Xbeans invoke documentready on the next Xbean. Xbeans can be configured using the standard Java Bean mechanisms of property editors and customizers. Using a Java Bean design tool, such as IBM s Visual Age for Java, Inprise s JBuilder, Symantec s Visual Cafe, FreeBuilder or NetBeans, a developer can visually instantiate, customize and connect Xbeans. Complete distributed applications can be created, often without writing any code. Besides Java IDE design tools, more simplified tools that only allow the configuration and customization of Xbeans are desirable since they allow non-java experts to configure and customize Xbeans into useful application channels. Generic Xbeans Generic Xbeans process any kind of XML document using the DOM API. Many generic Xbeans are configured using the standard Java Bean mechanisms of property editors and customizers. Document type specific Xbeans Xbeans can also be specific to a particular XML document type, that is it can be programmed to only work on XML documents whose type is known at compile time. While less general, they can still be part of a channel. Type specific Xbeans must check the type of the incoming XML document to ensure type integrity. Generic Xbeans can receive and process the output of a type specific Xbean. Xbeans.org Xbeans.org is an open source project. The goal of Xbeans.org is to provide a rich repository of freely available Xbeans. The first version of Xbeans is available from the web site. Since Xbeans are clearly partitioned pieces of functionality with two well defined interfaces, independent and parallel development of Xbeans is greatly simplified. Unlike some open source projects, there is not a lot of coordination and project management required. Xbean.org is looking for contributors of the Xbeans outlined here as well as any useful Xbean imaginable. Bibliography 5

[XML98] [NewsML] [DOM98] [JBeans] [UNIX] [Mar96] [Alpha] [VA] [IJB] [SVC] [FBJ] [NBDS] [Mar00] [Xbeans] Extensible Markup Language (XML) 1.0 W3C Recommendation 10-February-1998. http://www.w3.org/tr/1998/rec-xml-19980210 NewsML - Markup for the third millennium, International Press Telecommunications Council web site: http://www.iptc.org Document Object Model (DOM) Level 1 Specification Version 1.0 W3C Recommendation 1 October, 1998. http://www.w3.org/tr/rec-dom-level-1 JavaBeans Specifications for Java 2, Sun Microsystems. http://java.sun.com/beans/glasgow The UNIX Operating System. AT&T Bell Labs. Bruce Martin, Yeturu Aahlad, Mod Marathe and Chung Le. Asynchronous Notifications Among Distributed Objects. In Proceedings of the 2nd USENIX Conference on Object-Oriented Technologies and Systems, June 17, 1996, Toronto, Canada. AlphaWorks XML Productivity Kit for Java. IBM s Visual Age for Java Software Product, International Business Machines. http://www.ibm.com Inprise s Jbuilder 3.0 Software Product, Inprise Corporation. http://www.inprise.com/jbuilder Symantec s Visual Café Software Product, http://www.symantec.com FreeBuilder Java IDE Software, http://www.freebuilder.org/index_org.html NetBeans Developer Software Product. Sun Microsystems. http://www.netbeans.com Bruce Martin, Build distributed applications with Java and XML JavaWorld, February, 2000. http://www.javaworld.com/javaworld/jw-02-2000/jw-02-ssj-xml.html The Xbeans.org web site. http://www.xbeans.org 6

Author Bruce Martin Software Guru jguru Postal Address: 2755 Campus Drive, Suite 130 94403 San Mateo California USA Telephon: (650) 577-8101 Fax: (650) 577-8102 E-mail: martin@jguru.com Web: www.jguru.com Bruce Martin - Bruce is one of the pioneers of distributed object computing. At Hewlett Packard Laboratories in the early 90s, he designed and implemented an interface definition language that became the basis for HP s original CORBA submission. At Sun Microsystems, he was one of Sun s CORBA architects and was the primary author of five of the OMG s CORBA Services specifications. At Inprise Corporation, Bruce was an architect and developer of Inprise s first CORBA-based Java Application Server. Bruce has extensive practical experience with Java, XML and the DOM. Bruce is now a software guru at jguru. He is championing xbeans.org, an open-source project to create a repository of Java Beans that process XML and can be easily composed into distributed applications. Bruce has an excellent ability to convey both the conceptual basis of a technology and the practical nuts and bolts use of it. He has given talks around the world on distributed systems, advanced transaction models, object oriented programming, and distributed object technologies at both academic conferences and industrial events. Bruce has written many papers for conferences, journals, and books. He received Ph.D. and Masters degrees in Computer Science from the University of California at San Diego, and a Bachelors degree in Computer Science from the University of California at Berkeley. 7