Presentation is loading. Please wait.

Presentation is loading. Please wait.

Container-component model and XML in ALMA ACS Heiko Sommer (ESO), Gianluca Chiozzi (ESO), Klemen Zagar (Cosylab) and Markus Völter.

Similar presentations


Presentation on theme: "Container-component model and XML in ALMA ACS Heiko Sommer (ESO), Gianluca Chiozzi (ESO), Klemen Zagar (Cosylab) and Markus Völter."— Presentation transcript:

1 Container-component model and XML in ALMA ACS Heiko Sommer (ESO), Gianluca Chiozzi (ESO), Klemen Zagar (Cosylab) and Markus Völter

2 2SPIE 22 June 2004Container-component model and XML in ALMA ACS CORBA ORBs, Stubs, Skeletons naming service Overview CORBA… appli- cation appli- cation appli- cation appli- cation config log- service

3 3SPIE 22 June 2004Container-component model and XML in ALMA ACS CORBA ORB Manager, CDB Overview …tamed by ACS… container comp container comp

4 4SPIE 22 June 2004Container-component model and XML in ALMA ACS CORBA ORB Manager, CDB Overview XML exchange like in web services… container comp XML comp container comp

5 5SPIE 22 June 2004Container-component model and XML in ALMA ACS CORBA ORB Manager, CDB Overview … but with type-safe data access container comp XML comp container comp

6 6SPIE 22 June 2004Container-component model and XML in ALMA ACS Container / CORBA container comp functional component interface generated from CORBA IDL: Operations with IDL data types as parameters. component POA (tie) comp impl container main() ORB sealant dynamic impl lifecycle IF CORBA IIOP container POA

7 7SPIE 22 June 2004Container-component model and XML in ALMA ACS What’s missing in CORBA? CORBA architecture favors relatively tight coupling –data embedded in remotely accessible objects –only fine-grained data transported by value CORBA IDL has only limited support for by-value transport of hierarchical data (nested structs, valuetypes) Serialization format is not suitable for persistence

8 8SPIE 22 June 2004Container-component model and XML in ALMA ACS How about Web Services? Web Services aim at looser coupling of system components than CORBA Hierarchical data can be sent in message parameters, coded as XML XML (WSDL) for data type and interface definition XML representation of data reusable for persistence

9 9SPIE 22 June 2004Container-component model and XML in ALMA ACS Web Services go too far… †Loss of static type checking †Made for business-to-business communication (“middleware for middlewares”), not within one project that can afford complete builds †client side coding is proprietary to the WS framework †text-based protocol is too inefficient for many kinds of data exchange in our domain

10 10SPIE 22 June 2004Container-component model and XML in ALMA ACS XML strings over CORBA “The Middle Way” keep CORBA as the underlying middleware use XML data as string arguments of CORBA IDL-defined operations data definition in XML schema coexistence with CORBA binary types comp XML operation1(in string SchedBlock sb) operation2(out float[] largeBinaryData) No type safety yet! XML schema IDL def

11 11SPIE 22 June 2004Container-component model and XML in ALMA ACS Textual XML not type-safe! comp

12 12SPIE 22 June 2004Container-component model and XML in ALMA ACS Type-safe XML Representation †generic representation of XML data (string, DOM) always prohibits static type checking restore type-safety by using generated classes that match the particular XML data (as defined in the XML schema) : XML Binding Classes

13 13SPIE 22 June 2004Container-component model and XML in ALMA ACS XML Binding Classes Type-safe XML Representation Binding Class Generator (Castor) XML schema <xsd:element name=“SchedBlock”> + Nested Child elements (Java) Binding Classes buildtime runtime 1..n 0..1 XML serializeparse string typed Java objects string

14 14SPIE 22 June 2004Container-component model and XML in ALMA ACS

15 15SPIE 22 June 2004Container-component model and XML in ALMA ACS Type-safe XML exchange Conceptual View transparent-XML interface: XML data appears as a tree of native- language binding classes mapper instantiates binding classes from XML strings and back between collocated components, binding objects can be sent directly container comp XML mapper flat-XML interface seen from outside XML data transported as a string over CORBA container comp mapper

16 16SPIE 22 June 2004Container-component model and XML in ALMA ACS <xsd:element name=“SchedBlock”> <xsd:element name="schedBlockImaging“ type="prj:ImagingProcedureT“ maxOccurs="unbounded" /> buildtime runtime Complex data type defined as XML schema typedef XmlString SchedBlock; interface MyComp { void myOperation( SchedBlock sb) } Operation defined in IDL ref 1..n 0..1 interface MyComp { void myOperation( bind.SchedBlock sb) } Generated Java Interface Server component comp implements SchedBlock Binding Class Instances Client component comp

17 17SPIE 22 June 2004Container-component model and XML in ALMA ACS Build Process ACS IDL compiler Makefile mapping info: “SchedBlock -> alma.bind.SchedBlock” alma.data.ObsProject getObsProject CORBA IDL compiler typedefxmlstring ObsProject; … getObsProject() IDL IF XmlEntityStruct getObsProject together in one JAR file ACS IDL compiler Makefile mapping info: alma.bind.SchedBlock getThatSB() CORBA IDL compiler typedef XmlString SchedBlock; … getThatSB() IDL IF flat-XML “MyInterface” XmlString getThatSB() together in one JAR file transparent-XML “MyInterfaceJ”

18 18SPIE 22 June 2004Container-component model and XML in ALMA ACS Design View showing CORBA flat-XML functional IF (CORBA) skeleton (tie) (CORBA) stub (CORBA) skeleton impl (ACS, dynamic XML mapper) impl transparent- XML IF (ACS) server component delegates impl client proxy (ACS, dynamic XML mapper) delegates client component calls CORBA remoting impl. impl delegates server container client container impl XML

19 19SPIE 22 June 2004Container-component model and XML in ALMA ACS Summary Enable components (different languages) to exchange hierarchical data in a type-safe manner Container/component model hides the gory details from the components Fully CORBA compliant (not just for ACS components as clients)


Download ppt "Container-component model and XML in ALMA ACS Heiko Sommer (ESO), Gianluca Chiozzi (ESO), Klemen Zagar (Cosylab) and Markus Völter."

Similar presentations


Ads by Google