Notes
Slide Show
Outline
1
Generating Configuration Files:
The Director’s Cut
  • Jon Finke
  • Rensselaer Polytechnic Institute
2
New (old) Way
  • File format logic stored in DB
    • Changes made centrally
  • Generic file extraction program
    • No changes after installation
    • Platform independence
  • Code sharing with web applications
  • PL/SQL programs are shorter
    • Faster to write

3
New (old) Model
4
(old) Conclusions
  • Cuts development time
    • Standard development environment
    • Host interface written once
    • Code sharing with web routines
    • All work done centrally
    • PL/SQL well integrated to Database
  • Platform independence



5
(old) Futures
  • GET from program
  • PUT to program
  • Boilerplate management
  • Call file generation from Web
    • Faster development for web pages
    • Alternate Boilerplate testing
  • More platforms


6
This works well, but….
  • Boiler plate approach too limited.
    • Only applied to the web stuff anyway
  • PL/SQL programmers needed presentation skills.
  • PL/SQL programmers required for layout changes.
  • Data extraction too closely coupled with data presentation.


7
XML to the Rescue
  • eXtensible Markup Language
    • Derived from SGML
    • Resembles HTML
  • Many Uses
    • Document Preparation
    • Business to Business Info Transfer
    • Configuration Files

8
/etc/passwd data
  • <pw_entry platform="BASE">
  •       <username>ahoj</username>
  •       <unixuid>57458</unixuid>
  •       <gid>4000</gid>
  •       <gecos>Julie Erin Aho</gecos>
  •       <homedir>/home/58/ahoj</homedir>
  •       <shell>usr/bin/session</shell>
  •       <person_id>91319238</person_id>
  •       <user_type>Student</user_type>
  • </pw_entry>
9
Along with XSL Transforms
  • Selects and Transforms XML data into other formats.
  • Many Options
    • Built into Oracle
    • Development Kits
      • JAVA, Pearl, Python, C++
    • GUI Development Environments
    • Web Server/Browser Support


10
XSL Transform
  •   <xsl:template match="/">
  •     <xsl:for-each select="/etc_passwd/pw_entry“[platform=“BASE”
  • or platform=“AIX”]>
  •       <xsl:sort select="unixuid" order="ascending" />
  •       <xsl:value-of select="username"/>:*:
    • <xsl:value-of select="unixuid"/>:
    • <xsl:value-of select="gid"/>:
    • <xsl:value-of select="gecos"/>:
    • <xsl:value-of select="homedir"/>:
    • <xsl:value-of select="shell"/>
  •     </xsl:for-each>
  •   </xsl:template>
11
 
12
Search for Validation
  • <!DOCTYPE etc_passwd [
  • <!ELEMENT etc_passwd (pw_entry)*>
  • <!ELEMENT pw_entry (username, unixuid, gid, gecos?, homedir?, shell?, person_id?, user_type)>
  • <!ATTLIST pw_entry platform CDATA #REQUIRED>
  • <!ELEMENT username (#PCDATA) >
  • <!ELEMENT unixuid (#PCDATA) >
  • <!ELEMENT gid (#PCDATA) >
  • <!ELEMENT gecos (#PCDATA)>
  • <!ELEMENT homedir (#PCDATA)>
  • <!ELEMENT shell (#PCDATA)>
  • <!ELEMENT person_id (#PCDATA)>
  • <!ELEMENT user_type (#PCDATA) >


13
XML is Not Oracle Specific
  • Vender Independent Data Format
  • Transformable to desired formats via XSL
  • Being used for configuration information
    • JBoss
    • Data Center Markup Language (DCML)
    • Common Interface Model (CIM)
    • IETF Network Configuration (netconf)
    • Past LISA Papers

14
Futures
  • Dynamic Web Page Generation
    • Generate File Model Too Slow
    • JBoss (Development Environment)
  • Static Web Page Generation
  • Online Documentation (PDF)
  • Configuration Files
    • DHCP
    • Monitoring (Big Brother, etc)
15
Other Resources
  • World Wide Web Consortium
    • http://www.w3.org/
  • W3 Schools
    • http://www.w3schools.com/
  • Oracle Technology Network
    • http://otn.oracle.com/tech/xml/
  • Data Center Markup Language
    • http://www.dcml.org
16
Conclusions
  • Original approach works well
  • XML enhancement makes it even better
  • XML is worth learning
  • If you have Oracle, use the XML support!
  • I need to learn a lot more XML…
17
Generating Configuration Files:
The Director’s Cut
  • Jon Finke
  • Rensselaer Polytechnic Institute
  • finkej@rpi.edu
  • http://www.rpi.edu/~finkej