Apache VCL logo Apache Software Foundation logo
Apache current event

Modularized Architecture

Background

The VCL backend code was significantly reworked in version 2.0 to utilize a “modularized” framework.  This framework allows certain parts of the code to be separated from the core code through the implementation of modules.

VCL interacts with external technologies including:

The technology being used may vary based on the VCL deployment, management node, image, computer, and so on.  Modules make configuring VCL to use a certain technology easy while simplifying the core code.

The advantages of implementing modules are not limited to external technologies.  Modules may be implemented for functions applicable only to VCL, but may vary based on the environment.  For example, research is being conducted to compare different algorithms which are used to select the image that is loaded on a computer after a reservation is complete.  A module is created for each algorithm, and configuring a management node to use a certain algorithm is as simple as changing one value in the database.

Object Orientation and Inheritance

Object orientation and inheritance are used in the VCL modular framework, allowing modules to access functionality from the classes which they inherit from.  This relieves module developers from having to worry about many underlying details and reduces code duplication.

The following diagram shows how inheritance is organized: !inheritance.jpg|align=center! Figure: VCL module inheritance organization   A few notes about the diagram:

{color:#6600ff}{}Explain:{color}

Advantages

{color:#6600ff}{}Explain: {color}

Core Modules

  {color:#6600ff}{}Explain:{color}

vcld (VCL::vcld)

{color:#6600ff}{}Explain:{color}

DataStructure.pm (VCL::DataStructure)

{color:#6600ff}{}Explain:{color}

utils.pm (VCL::utils)

{color:#6600ff}{}Explain:{color}

Module.pm (VCL::Module)

State.pm (VCL::Module::State)

Provisioning.pm (VCL::Module::Provisioning)

OS.pm (VCL::Module::OS)

Implementation Details

Working with Inheritance

{color:#6600ff}{}Explain:{color}

Including Non-Inherited Modules

 {color:#6600ff}{}Explain:{color}

Module Initialization

{color:#6600ff}{}Explain how modules can implement initialize() subs which are automatically called{}{color}

Database Configuration for Modules

{color:#6600ff}{}Explain module table, computer.moduleid, managementnode.predictivemoduleid{}{color}

Cross-Module Access

{color:#6600ff}{}Explain why some modules shouldn’t have access to others, which is why Module.pm doesn’t make os() and provisioner() available{}{color}

Required & Optional Module Subroutines

{color:#6600ff}{}Explain:{color}

Package Organization

{color:#6600ff}{}Explain:{color}