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

CDDLM Configuration Description Language (CDL)

  • Upload
    burton

  • View
    23

  • Download
    0

Embed Size (px)

DESCRIPTION

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 - PowerPoint PPT Presentation

Citation preview

Page 1: CDDLM Configuration Description Language (CDL)

CDDLM Configuration Description Language (CDL)

Jun TatemuraNEC Laboratories America

GGF13, March 15 2005

Page 2: CDDLM Configuration Description Language (CDL)

CDL Core concept overview CDL FAQ from draft reviews

Essential questions regarding CDL design philosophy

Page 3: CDDLM Configuration Description Language (CDL)

User (who deploys)

Use of CDL in Deployment Example: Three-tier web applications

Component provider

Appserver

Appserver

Appserver

DBserver

DBserver

DBserver

Webserver

Webserver

WebserverComponent

object

Componentobject

ComponentobjectResource

Broker

CDLTemplate

ApplicationWrapper

Provider (developer)provides

provides

(schema, default values,…)

CDLTemplateCDL

TemplateCDL TemplateFor 3tier app

refers to

(application structure,…)

CDLFor a specificdeployment

request

refers to

discovered resourcesagreed values

discovery and agreement

Deployment APIsubmit

Page 4: CDDLM Configuration Description Language (CDL)

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

Page 5: CDDLM Configuration Description Language (CDL)

Prototype References

@cdl:extends=xsd:QName

<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>

<cdl:configuration xmlns:tmpl="urn:tmp-uri1">

<Tomcat cdl:extends="tmpl:Tomcat"> <hostname>myweb.com</hostname></Tomcat></cdl:configuration>

<Tomcat> <hostname>myweb.com</hostname> <port>8080</port> <maxThreads>200</maxThreads></Tomcat>

Page 6: CDDLM Configuration Description Language (CDL)

Value References @cdl:ref=cdl:pathType

<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>

<WebApp> <application/> <applicationPath/> <dbname/> <data/> <dbuser/> <dbpassword/> <DB cdl:extends="DBServer"> <data cdl:ref="/data"/> <username cdl:ref="/dbuser"/> <password cdl:ref="/dbpassword"/> </DB>

Page 7: CDDLM Configuration Description Language (CDL)

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>

Page 8: CDDLM Configuration Description Language (CDL)

Laziness Annotation

@cdl:lazy=“xsd:boolean”

<server> <port cdl:lazy="true"/></server>

<app> <p cdl:ref="…" cdl:lazy="true"/></app>

Lazy Property(provide side annotation)

Lazy Reference(consumer side annotation)

Page 9: CDDLM Configuration Description Language (CDL)

CDL Document cdl import types configuratio

n 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>

Page 10: CDDLM Configuration Description Language (CDL)

CDL FAQ

Inheritance (prototype references) Value references Data Types

Page 11: CDDLM Configuration Description Language (CDL)

Inheritance [Q1]

Why Inheritance? Isn’t inheritance just a feature of

front-end systems? CDDLM could receive a CDL document after inheritance resolved.

Page 12: CDDLM Configuration Description Language (CDL)

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

Page 13: CDDLM Configuration Description Language (CDL)

Inheritance [Q2]

Why not inherit a deep tree? Prototype resolution only inherits

immediate children. We may want to overload data within a deep structure.

a

c

f

a

b

e

c d

f

1001030

1 20

extends a

b

e

c d

f

10030

1 20

Page 14: CDDLM Configuration Description Language (CDL)

Inheritance [A2] (1)

It will be difficult to override a property with structured data

a

c

g

a

b

e

c d

f

1001030

1 20

extends

h

200

a

b c d

1 20g

100

h

200

a

b

e

c d

f

1030

1 20

g

100

h

200?

Page 15: CDDLM Configuration Description Language (CDL)

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>

Page 16: CDDLM Configuration Description Language (CDL)

list2list1

Inheritance [Q3]

Why inheritance is defined on an ordered list What makes a difference between

property set inheritance and property list inheritance

a

b

c

d

c

e

a

f

a

b

c

d

e

f

extends

Page 17: CDDLM Configuration Description Language (CDL)

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

Page 18: CDDLM Configuration Description Language (CDL)

Value references [Q1]

Why do we need cdl:refroot

<a> <b …/> <c …/></a><e> <b cdl:ref=“/a/b”/></e>

We may use:

<a> <b …/> <c …/></a><e> <b cdl:refroot=“a” cdl:ref=“/b”/></e>

We now use:

Page 19: CDDLM Configuration Description Language (CDL)

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)

<a> <b cdl:ref=“/a/c”/> <c>100</c></a><e cdl:extends=“a”> <c>200</c></e>

<e> <b cdl:ref=“/a/c”/> <c>200</c></e>

<e> <b cdl:ref=“/e/c”/> <c>200</c></e>

?

<a> <b cdl:refroot=“a” cdl:ref=“/c”/> <c>100</c></a>

<a> <b cdl:ref=“/c”/> <c>100</c></a>

Page 20: CDDLM Configuration Description Language (CDL)

Value references [Q2]

Why lazy references Isn’t a lazy property (provider-side

annotation) enough? Why do we need a consumer-side laziness annotation?

<server> <port cdl:lazy=“true”/></server>

<app> <p1 cdl:ref=“…” cdl:lazy=“true”/></app>

<p cdl:ref=“…”/>

<app0> <p …/></app0>

Lazy property

Lazy reference

Page 21: CDDLM Configuration Description Language (CDL)

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”

Page 22: CDDLM Configuration Description Language (CDL)

Data Types [Q1]

Is CDL yet another schema language? Are you trying to replace XML

Schema?

Page 23: CDDLM Configuration Description Language (CDL)

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

Page 24: CDDLM Configuration Description Language (CDL)

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>

Page 25: CDDLM Configuration Description Language (CDL)

Generating XML Schema for Validation A CDL processor may optionally

generate XSDs for unresolved and/or resolved configuration data

CDLCDL

XSD

CDL processor

CDLXSD

validates

refers-to

refers-to

Resolution result

XSD for unresolved data (source data)XSD

validates

XSD for resolved data (result data)

Page 26: CDDLM Configuration Description Language (CDL)

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>

Page 27: CDDLM Configuration Description Language (CDL)

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>

Page 28: CDDLM Configuration Description Language (CDL)

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)