1 / 28

CDDLM Configuration Description Language (CDL)

CDDLM Configuration Description Language (CDL). Jun Tatemura NEC Laboratories America GGF13, March 15 2005. CDL Core concept overview CDL FAQ from draft reviews Essential questions regarding CDL design philosophy. Application Wrapper Provider (developer). provides. refers to. CDL

burton
Download Presentation

CDDLM Configuration Description Language (CDL)

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. CDDLM Configuration Description Language (CDL) Jun Tatemura NEC Laboratories America GGF13, March 15 2005

  2. CDL Core concept overview • CDL FAQ from draft reviews • Essential questions regarding CDL design philosophy

  3. Application Wrapper Provider (developer) provides refers to CDL Template CDL Template Component provider CDL Template provides CDL Template For 3tier app (schema, default values,…) Web server Component object Web server (application structure,…) Web server refers to CDL For a specific deployment request submit App server Deployment API Component object App server App server discovered resources agreed values DB server DB server Component object DB server discovery and agreement Resource Broker Use of CDL in Deployment • Example: Three-tier web applications User (who deploys)

  4. CDDLM XML-based CDL • Configuration: Property Lists <webserver> <hostname>example.com</hostname> <port>80</port> </webserver> • CDL Notations • @cdl:extends – inheritance of prototype • @cdl:ref – value reference • @cdl:type – data type annotation • @cdl:lazy – lazy (runtime) value resolution

  5. Prototype References • @cdl:extends=xsd:QName <cdl:configuration xmlns:tmpl="urn:tmp-uri1"> <Tomcat cdl:extends="tmpl:Tomcat"> <hostname>myweb.com</hostname> </Tomcat> </cdl:configuration> <cdl:cdl targetNamespace="urn:tmp-uri1"> <cdl:configuration> <WebServer> <hostname /> <port>80</port> </WebServer> <Tomcat cdl:extends="WebServer"> <port>8080</port> <maxThreads>200</maxThreads> </Tomcat> </cdl:configuration> </cdl:cdl> <Tomcat> <hostname>myweb.com</hostname> <port>8080</port> <maxThreads>200</maxThreads> </Tomcat>

  6. Value References • @cdl:ref=cdl:pathType <WebApp> <application/> <applicationPath/> <dbname/> <data/> <dbuser/> <dbpassword/> <DB cdl:extends="DBServer"> <data cdl:ref="/data"/> <username cdl:ref="/dbuser"/> <password cdl:ref="/dbpassword"/> </DB> <Web cdl:extends="WebServer"> <application cdl:ref="/application"/> <applicationPath cdl:ref="/applicationPath"/> <dbconnection cdl:extends="DBConnection"> <JNDIName cdl:ref="/dbname"/> <hostname cdl:ref="/DB/hostname"/> <port cdl:ref="/DB/port"/> <username cdl:ref="/DB/username"/> <password cdl:ref="/DB/password"/> </dbconnection> </Web> </WebApp>

  7. Schema Annotations • @cdl:type • @cdl:use <WebServer> <hostname cdl:type="xsd:string"cdl:use="optional"/> <port cdl:type="xsd:positiveInteger"cdl:use="required">80</port> </WebServer>

  8. Laziness Annotation • @cdl:lazy=“xsd:boolean” Lazy Reference (consumer side annotation) Lazy Property (provide side annotation) <server> <port cdl:lazy="true"/> </server> <app> <p cdl:ref="…"cdl:lazy="true"/> </app>

  9. CDL Document • cdl • import • types • configuration • system <cdl:cdl targetNameSpace=xsd:AnyURI?> <cdl:documentation …/>? <cdl:import …/>* <cdl:types>? <cdl:documentation …/>? <-- schema definition -->* <-- extensibility element -->* </cdl:types> <cdl:configuration>? <cdl:documentation …/>? <-- PropertyList -->* </cdl:configuration> <cdl:system>? <cdl:documentation …/>? <-- PropertyList -->* </cdl:system> <-- extensibility element -->* </cdl:cdl>

  10. CDL FAQ • Inheritance (prototype references) • Value references • Data Types

  11. Inheritance [Q1] • Why Inheritance? • Isn’t inheritance just a feature of front-end systems? CDDLM could receive a CDL document after inheritance resolved.

  12. Inheritance [A1] • [A] Inheritance is used between component providers and component users. Standardization is thus required. • Component description from a provider • describes properties that are supported as a prototype • Names, types, default values, optionality, laziness • A component provider • Inherits the prototype to give • property values, composite structures of components • Note: CDL provides declarative description through prototype-based inheritance + immutable property lists

  13. Inheritance [Q2] • Why not inherit a deep tree? • Prototype resolution only inherits immediate children. We may want to overload data within a deep structure. extends a a a b c d b c d c 1 20 1 20 e f e f f 100 30 100 30 10

  14. a b c d 1 20 e f g h a 30 10 100 200 b c d 1 20 g h 100 200 Inheritance [A2] (1) • It will be difficult to override a property with structured data extends a a ? b c d c 1 20 e f g h 100 200 30 10

  15. Inheritance [A2] (2) • Parameterization <ServerSet> <ashost/> <dbhost/> <AppServer> … <host cdl:ref=“/ashost”/> … </AppServer> <DbServer> … <host cdl:ref=“/dbhost”/> … </DbServer> </ServerSet> <MyServer cdl:extends=“ServerSet”> <ashost>localhost</ashost> <dbhost>localhost</dbhost> </MyServer>

  16. a c a b e b c a c d f d e f Inheritance [Q3] • Why inheritance is defined on an ordered list • What makes a difference between property set inheritance and property list inheritance extends list1 list2

  17. Inheritance [A3] • [A] The CDDLM Component Model needs an ordered tree • [A] XML is an ordered tree. A user of CDL may want to have ordered property lists (the Component Model is an example) • cdl:extends corresponds to xsd:extension of xsd:sequence

  18. Value references [Q1] • Why do we need cdl:refroot We now use: We may use: <a> <b …/> <c …/> </a> <e> <b cdl:refroot=“a”cdl:ref=“/b”/> </e> <a> <b …/> <c …/> </a> <e> <b cdl:ref=“/a/b”/> </e>

  19. Value references [A1] • [A] it will be also complicated when it is combined with prototype resolution • Most references will be within a tree (i.e., no need of cdl:refroot) <e> <b cdl:ref=“/a/c”/> <c>200</c> </e> <a> <b cdl:refroot=“a” cdl:ref=“/c”/> <c>100</c> </a> <a> <b cdl:ref=“/a/c”/> <c>100</c> </a> <e cdl:extends=“a”> <c>200</c> </e> ? <a> <b cdl:ref=“/c”/> <c>100</c> </a> <e> <b cdl:ref=“/e/c”/> <c>200</c> </e>

  20. Value references [Q2] • Why lazy references • Isn’t a lazy property (provider-side annotation) enough? Why do we need a consumer-side laziness annotation? Lazy property <server> <port cdl:lazy=“true”/> </server> <p cdl:ref=“…”/> Lazy reference <app> <p1 cdl:ref=“…” cdl:lazy=“true”/> </app> <app0> <p …/> </app0>

  21. Value Reference [A2] • [A] an example: a reference to a system environment property (e.g., current time). The consumer side wants to control resolution timing <deploymentTime cdl:refroot=“sys:sytemProperties” cdl:ref=“/time” cdl:lazy=“true”/> Note: CDL itself does not define “system properties”

  22. Data Types [Q1] • Is CDL yet another schema language? • Are you trying to replace XML Schema?

  23. Data Types [A1] • CDL is designed to leverage (not replace) XML Schema • How to achieve schema validation in CDL • CDL: Prototype-based inheritance to generate configuration data in a flexible and dynamic manner • Challenge: how to make use of XML Schema to validate dynamically extensible data • Note: Schema validation is optional in CDL

  24. Solution: @cdl:type Attribute for Type Annotation • @cdl:type=“qname” • Type specification for property values • Source data can be validated with @cdl:type • Resolved data can be validated with @cdl:type (type check) and @cdl:use (optionality check) <cdl:configuration> <WebServer> <hostname cdl:type=“xsd:string”/> <port cdl:type=“xsd:int”/> </WebServder> </cdl:configuration>

  25. Generating XML Schema for Validation • A CDL processor may optionally generate XSDs for unresolved and/or resolved configuration data XSD refers-to XSD for unresolved data (source data) CDL validates CDL XSD refers-to CDL processor XSD for resolved data (result data) Resolution result XSD CDL validates

  26. Example of Validation • After reference resolution <a> <a1 cdl:type=“t1” cdl:use=“required”>v1</a1> <a2 cdl:type=“t2” cdl:use=“optional” /> <a3 cdl:type=“t3” cdl:use=“optional” >v3</a3> </a> • A CDL processor may generate • Configuration data <a><a1>v1</a1><a2/><a3>v3</a3></a> • XSD for the configuration data <xsd:complexType name=“aType”> <sequence><element name=“a1” type=“t1”…> …</sequence> </xsd:complexType>

  27. Data types [Q2] • How to use cdl:types and cdl:import • Should data types be defined internally (using cdl:types) or externally (importing with cdl:import)? <cdl:cdl …> <cdl:import …/> <cdl:types> …. </cdl:types> … </cdl:cdl>

  28. Data Types [A2] • [A] cdl:type is used when data types are defined within the namespace of the configuration data <cdl:cdl targetNamespace=uri1> <cdl:import …/> <cdl:type> … </cdl:type> <cdl:configuration> <a …/> … </cdl:configuration> </cdl:cdl> Referred to with the same namespace (uri1)

More Related