newton
Newton
 

Provisioning Service

Overview

The provisioner service is used to install an SCA composite in a Newton instance somewhere within a Newton fabric.

When an SCA composite is submitted to the provisioner, it first sends a hosting requirement containing the composite definition to each existing Newton instance within the fabric. Each Newton instance then assesses the composite and responds with a “cost” to host the composite. The provisioner then installs the composite in the Newton instance that offers the lowest cost and for the highest value.

The provisioner is designed to work in highly dynamic infrastructures where instances may come and go. If a Newton instance that was previously hosting a composite either ejects the composite, fails or is shutdown then the provisioner will simply re-negotiate with the remaining instances to find a suitable fall back position.

Periodically if there is nothing else for the provisioner to do it will attempt to re-negotiate composites that are already installed. If a “better” host is found for a composite then the provisioner will instantiate a new instance of the composite on the new container and garbage collect the old instance.

Future Work

Currently the notion of which instance is “better” than another one is handled via a pluggable Java API called an Evaluator. However this is a global view of “better” which may not be valid across all types of composite. Much better to allow each composite to define it's own notion of better (falling back to some default view if not specified?) and negotiate on this basis.

This will require a mechanism to mark up in the SCA composite the view of “better” and an implementation of an evaluator that knows how to read this marked up info and evaluate returned containers accordingly.