Presentation is loading. Please wait.

Presentation is loading. Please wait.

ESO - Garching 08 – 09 March, 2004 1st ALMA Common Software Workshop XML « Data by Value » Transport.

Similar presentations


Presentation on theme: "ESO - Garching 08 – 09 March, 2004 1st ALMA Common Software Workshop XML « Data by Value » Transport."— Presentation transcript:

1 ESO - Garching 08 – 09 March, 2004 1st ALMA Common Software Workshop XML « Data by Value » Transport

2 ALMA Project 2Garching, 08-09 March 20041st ALMA Common Software Workshop XML Data by Value Overview Subsystem2 Application obj.getFoo() Subsystem1 obj.getFoo() transport by value local object remote object fine-grained remote calls degrade performance; more runtime coupling among computers

3 ALMA Project 3Garching, 08-09 March 20041st ALMA Common Software Workshop XML Data by Value Eligible Data Reasonably small chunks of nested object data, e.g. “User”, “ObservingProject”, “CorrelatorConfig” Simple parameters as IDL data types, not XML Bulk data (from correlator, pipelines) transported in binary format, not considered here. Lists of value objects don’t need to be defined as new value object types; use CORBA sequences of existing value objects instead.

4 ALMA Project 4Garching, 08-09 March 20041st ALMA Common Software Workshop Why XML? Well-accepted open standard XML can also be used for persistence (Database or file system) without writing much extra code XML also for non-CORBA-Transport (email, …) XML Schema offers constraint declaration and thus enables automatic validation We can always deal with XML “by hand”. –important for early use of ALMA software when some data producers are not yet available. –test code can easily inject XML data

5 ALMA Project 5Garching, 08-09 March 20041st ALMA Common Software Workshop Developers describe their data model in XML schemas XML Schema truncated example

6 ALMA Project 6Garching, 08-09 March 20041st ALMA Common Software Workshop Binding Classes Concept A binding class object represents an XML node in memory; we would thus have a SchedBlock class. Binding class source code is generated from the XML schemas as part of the software build process Classes contain code for de-/serialization from and to XML Type-safe get()/set() methods ensure that data conflicts be noticed at compile time. Huge advantage over generic handling of XML data (as done by DOM or SAX). Classes contain validation code to enforce schema constraints

7 ALMA Project 7Garching, 08-09 March 20041st ALMA Common Software Workshop Binding Classes Example package alma.entity.xmlbinding.schedblock; public class SchedBlock extends alma.entity.xmlbinding.obsproject.ObsUnitT implements java.io.Serializable { // just a few of the generated methods public void addObsTarget(TargetT vObsTarget) {…} public java.util.Enumeration enumerateObsTarget() {…} public alma.entity.xmlbinding.obsproject.ImagingProcedureT getSchedBlockImaging() {…} }

8 ALMA Project 8Garching, 08-09 March 20041st ALMA Common Software Workshop Invisible XML Serialization type-safe data access container Comp container Comp Flat-XML API seen from outside: XML-string Transparent-XML API implemented by component: SchedBlock binding class, type- safe data access De-/Serialization layer (dynamic) XML

9 ALMA Project 9Garching, 08-09 March 20041st ALMA Common Software Workshop Invisible XML Serialization Standard and XML-binding-aware Interfaces


Download ppt "ESO - Garching 08 – 09 March, 2004 1st ALMA Common Software Workshop XML « Data by Value » Transport."

Similar presentations


Ads by Google