ESO - Garching 23 June – 02 July, 2003 ACS Course Transparent XML De-/Serialization in Java H. Sommer.

Slides:



Advertisements
Similar presentations
ESO - Tokyo July, 2005 ALMA Common Software Training- Course Session 1b Distributed Systems G.Chiozzi.
Advertisements

COM vs. CORBA.
RPC Robert Grimm New York University Remote Procedure Calls.
The Spring System (and its trusty sidekick, Subcontract) Sun Microsystems.
NRAO/ESO videocon, Feb.12, 2004 ACS ALMA Common software G.Chiozzi and the ACS team.
CS 571. Web services Web service: "a software system designed to support interoperable machine-to-machine interaction over a network“ – W3C In short,
DISTRIBUTED FILE SYSTEM USING RMI
A First Java ORB Application 1  Object Request Broker (ORB)  This is the object manager in CORBA  Mechanisms for specifying interfaces  Interface Definition.
Apache Axis: A Set of Java Tools for SOAP Web Services.
7 th ACS Workshop 2010 Antofagasta, Chile ACS Project Lifecycle Matias Mora (based on presentation by G. Chiozzi and J. Ibsen)
II. Middleware for Distributed Systems
Communication in Distributed Systems –Part 2
Web Applications Basics. Introduction to Web Web features Clent/Server HTTP HyperText Markup Language URL addresses Web server - a computer program that.
UNIT-V The MVC architecture and Struts Framework.
Lesley Bross, August 29, 2010 ArcGIS 10 add-in glossary.
Container-component model and XML in ALMA ACS Heiko Sommer (ESO), Gianluca Chiozzi (ESO), Klemen Zagar (Cosylab) and Markus Völter.
1 3. Implementing Web Services 1.Create SOAP proxy interfaces and WSDL based service descriptions 2.Register/publish services 3.Stores service descriptions.
ESO - Garching 23 June – 02 July, 2003 ACS Course Data entities and XML serialization H. Sommer.
Understanding the CORBA Model. What is CORBA?  The Common Object Request Broker Architecture (CORBA) allows distributed applications to interoperate.
6st ACS Workshop UTFSM ACS Course Component, Container, Lifecycle Management 6st ACS Workshop UTFSM, Valparaiso, Chile H. Sommer, G. Chiozzi.
ALMA Common Software Basic Track Software Engineering Basics.
ACS Error System Using it in JAVA Sohaila Lucero NRAO.
CSCI 6962: Server-side Design and Programming Web Services.
Information Management NTU Interprocess Communication and Middleware.
ALMA Integrated Computing Team Coordination & Planning Meeting #1 Santiago, April 2013 Relational APDM & Relational ASDM models effort done in online.
Garching January, 2007 Configuration Database and Deployment of ACS components Bogdan Jeram, changes by Heiko Sommer European Southern.
Slide 1 Extending Tuscany Raymond Feng Apache Tuscany committer.
Abhishek Bachchan Vishal Patangia
ACS Error System APIs: C++ Bogdan Jeram European Southern Observatory July 2005ESO.
Integrating Digital Libraries by CORBA, XML and Servlet Integrating Digital Libraries by CORBA, XML and Servlet Wing Hang Cheung, Michael R. Lyu and Kam.
RMI remote method invocation. Traditional network programming The client program sends data to the server in some intermediary format and the server has.
RMI Remote Method Invocation Distributed Object-based System and RPC Together 2-Jun-16.
By: PHANIDEEP NARRA. OVERVIEW Definition Motivation.NET and J2EE Architectures Interoperability Problems Interoperability Technologies Conclusion and.
ACS Component Simulator J. Ibsen European Southern Observatory Garching – January 2007ESO.
CSC 480 Software Engineering Lecture 18 Nov 6, 2002.
ESO - Garching 23 June – 02 July, 2003 ACS Course JUnit for Java Unit Testing H. Sommer.
CS536 Semantic Analysis Introduction with Emphasis on Name Analysis 1.
1 Engineering Web Based Legacy Systems By Kanchana Eramudugoda Distributed Computing – CS843.
Apr. 8, 2002Calibration Database Browser Workshop1 Database Access Using D0OM H. Greenlee Calibration Database Browser Workshop Apr. 8, 2002.
Persistent State Service 1  Concept  Persistence is the ability of an object state to survive termination of the process in which the object executes.
Slide 1 Extending Tuscany Raymond Feng Apache Tuscany committer.
Modern Programming Language. Web Container & Web Applications Web applications are server side applications The most essential requirement.
1 Java Server Pages A Java Server Page is a file consisting of HTML or XML markup into which special tags and code blocks are inserted When the page is.
1st ACS Workshop UTFSM, Valparaiso, Chile ACS Course The Big Picture of ACS H. Sommer, G.Chiozzi.
D. Duellmann - IT/DB LCG - POOL Project1 The LCG Dictionary and POOL Dirk Duellmann.
CEN6502, Spring Understanding the ORB: Client Side Structure of ORB (fig 4.1) Client requests may be passed to ORB via either SII or DII SII decide.
SOAP RMI Aleksander Slominski, Madhusudhan Govindaraju, Randall Bramley, Dennis Gannon Indiana University Extreme! Lab A New-Old Programming Model for.
ACS on VxWorks B.Gustafsson European Southern Observatory ESO Feb ESO.
ESO - Garching 08 – 09 March, st ALMA Common Software Workshop XML « Data by Value » Transport.
Introduction to UML and Rational Rose UML - Unified Modeling Language Rational Rose 98 - a GUI tool to systematically develop software through the following.
The Java API for XML-Based Web Services. A Web Service example in Java SOAP-awareServlet (e.g. Apache Axis2) SOAP-awareServlet Any class processing the.
Topic 4: Distributed Objects Dr. Ayman Srour Faculty of Applied Engineering and Urban Planning University of Palestine.
Notification Channel - Java API
CSE 451: Operating Systems Winter 2006 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Interpreter Style Examples
Lecture 4: RPC Remote Procedure Call Coulouris et al: Chapter 5
Understanding and Designing with EJB
CSE 451: Operating Systems Winter 2007 Module 20 Remote Procedure Call (RPC) Ed Lazowska Allen Center
Lecture 4: RPC Remote Procedure Call CDK: Chapter 5
Building a CORBA Server
Objectives In this lesson you will learn about: Need for servlets
CSE 451: Operating Systems Winter 2004 Module 19 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Autumn 2009 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
WebServices Using JAX-RPC
CSE 451: Operating Systems Autumn 2010 Module 21 Remote Procedure Call (RPC) Ed Lazowska Allen Center
CSE 451: Operating Systems Messaging and Remote Procedure Call (RPC)
CORBA and COM TIP Two practical techniques for object composition
Presentation transcript:

ESO - Garching 23 June – 02 July, 2003 ACS Course Transparent XML De-/Serialization in Java H. Sommer

ALMA Project 2Garching, 23 June – 02 July 2003ALMA Common Software course XML Invisible container Comp container Comp XML Comp Flat-XML API seen from outside: XmlEntityStruct Transparent-XML API implemented by component: SchedBlock De-/Serialization layer (dynamic) XML

ALMA Project 3Garching, 23 June – 02 July 2003ALMA Common Software course XML Invisible easy programming Java component implementation code can work with binding classes directly, without having to convert parameters in the functional interface methods Same for (Java) clients of the component: they see the component with an interface that takes binding classes, rather than flat XML (i.e. XmlEntityStruct) It’s still possible to use the plain CORBA component interface, e.g. from a client that’s not written in Java

ALMA Project 4Garching, 23 June – 02 July 2003ALMA Common Software course XML Invisible how it works Custom IDL compiler recognizes XML-entity typedefs in IDL and constructs “inner” interface that uses binding classes instead of XmlEntityStructs. Container can map between the CORBA-IF and the inner IF at runtime, by serializing and deserializing binding objects to/from XmlEntityStructs Communication between components inside a container can be optimized to cut out XML serialization completely – binding objects are passed in memory.

ALMA Project 5Garching, 23 June – 02 July 2003ALMA Common Software course Schema + IDL Implementation code sees only binding classes SchedBlock XML document Client component Server component “SchedBlock.xsd” <xsd:element name=“SchedBlock”> meta level instance level typedef XmlEntityStruct SchedBlock; void takeSchedBlock( SchedBlock sb ) Complex data type defined as XML schema implements Operation defined in CORBA IDL ref 1..n 0..1

ALMA Project 6Garching, 23 June – 02 July 2003ALMA Common Software course Custom IDL compiler ACS IDL compiler Makefile mapping info: “ObsProject” -> alma.data.ObsProject Transparent-XML “MyInterfaceJ” alma.data.ObsProject getObsProject() CORBA IDL compiler typedef xmlstring ObsProject; … ObsProject getObsProject() IDL IF Flat-XML “MyInterface” XmlEntityStruct getObsProject() together in one JAR file

ALMA Project 7Garching, 23 June – 02 July 2003ALMA Common Software course Example: IDL from jcontexmpl/idl/XmlComponent.idl typedef xmlentity::XmlEntityStruct ObsProposal; typedef xmlentity::XmlEntityStruct SchedBlock; typedef sequence SchedBlockSeq; interface XmlComponent { ObsProposal createObsProposal(); SchedBlockSeq getAllSchedBlocks(); void xmlInOutMethod(in ObsProposal opsPropIn, out SchedBlock schedBlockOut); … }

ALMA Project 8Garching, 23 June – 02 July 2003ALMA Common Software course Example: XmlComponent IF created by the CORBA IDL compiler public interface XmlComponentOperations { alma.xmlentity.XmlEntityStruct createObsProposal(); alma.xmlentity.XmlEntityStruct[] getAllSchedBlocks(); void xmlInOutMethod(alma.xmlentity.XmlEntityStruct opsPropIn, alma.xmlentity.XmlEntityStructHolder schedBlockOut); }

ALMA Project 9Garching, 23 June – 02 July 2003ALMA Common Software course Example: XmlComponent IF created by the ACS IDL compiler public interface XmlComponentJ { public alma.xmljbind.test.obsproposal.ObsProposal createObsProposal(); public alma.xmljbind.test.schedblock.SchedBlock[] getAllSchedBlocks(); public void xmlInOutMethod(alma.xmljbind.test.obsproposal.ObsProp osal opsPropIn, alma.demo.SchedBlockHolder schedBlockOut); ACS IDL compiler adds a “J”

ALMA Project 10Garching, 23 June – 02 July 2003ALMA Common Software course Example: Component Implementation package alma.demo.XmlComponentImpl; public class XmlComponentImpl extends ComponentImplBase implements XmlComponentJ { public ObsProposal createObsProposal() { ObsProposal obsProp = new ObsProposal(); obsProp.setPerformanceGoals(“whatever."); return obsProp; }

ALMA Project 11Garching, 23 June – 02 July 2003ALMA Common Software course Client side (components acting as clients, or non-component clients) ContainerServices#getComponent returns the „flat-XML“ interface org.omg.CORBA.Object compObj = serv.getComponent("XMLCOMP1"); XmlComponent xmlComp = alma.demo.XmlComponentHelper.narrow(compObj); Wrap it using ContainerServices#createXmlBindingWrapper(..): XmlComponentJ xmlCompJ = (XmlComponentJ) cserv.createXmlBindingWrapper( XmlComponentJ.class, xmlComp, XmlComponentOperations.class); “flat-XML” IF component reference “transparent- XML” IF

ALMA Project 12Garching, 23 June – 02 July 2003ALMA Common Software course Example: Makefile IDL compilation (as usual) IDL_FILES = HelloLamp XmlComponent Triggers ACS-IDL compiler and maps IDL-typedefs to Java-XML binding classes XML_IDL= "ObsProposal=alma.xmljbind.test.obsproposal.ObsProposal; \ SchedBlock=alma.xmljbind.test.schedblock.SchedBlock“ No need for any XSDBIND since we reuse the binding classes from the module acstestentities, which are on the classpath.

ALMA Project 13Garching, 23 June – 02 July 2003ALMA Common Software course define/src/Makefile XSDBIND = systementities IDL_FILES = xmlentity acstestentities/src/Makefile XSDBIND = acsTestEntities XSDBIND_INCLUDE = systementities define idl lib systementities.xml CommonEntity.xsd GeneralIncludes.xsd xmlentity.idl systementities.jar xmlentity.jar acstestentities idl lib acsTestEntities.xml TestObsProject.xsd TestObsProposal.xsd TestSchedBlock acsTestEntities.jar jcontexmpl/src/Makefile IDL_FILES = HelloLamp XmlComponent XML_IDL = \ "ObsProposal=alma.xmljbind.test.obsproposal.ObsProposal; \ SchedBlock=alma.xmljbind.test.schedblock.SchedBlock” jcontexmpl idl lib HelloLamp.idl XmlComponent.idl HelloLamp.jar XmlComponent.jar IDL #include Inter-module referencing through INTROOT, ACSROOT Schema-to-Java class mappings for imported schemas Connects IDL entity class references, e.g. the “SchedBlock” typedef typedef xmlentity::XmlEntityStruct SchedBlock; with the corresponding Java binding classes.

ALMA Project 14Garching, 23 June – 02 July 2003ALMA Common Software course Remarks Transparent de-/serialisation works also for Java clients or components when the other part is not Java; Transport is done using plain CORBA –Stability –Accessible by any software even if it‘s not aware of binding classes Using this transparent-XML mechanism is not mandatory. On both the client and server side of a component call, the entire interface or even individual methods can use unparsed XML: –Always if there‘s no binding class support for that language –To use a specific XML parser, or to just forward XML without parsing it at all